From aa405f0c918f35f9849bff2ed180b245876dd148 Mon Sep 17 00:00:00 2001 From: gitctrlx <76150709+gitctrlx@users.noreply.github.com> Date: Sat, 6 Sep 2025 05:32:25 +0000 Subject: [PATCH] chore(dc_rest): Regen client v"10" on 2025-09-06 --- Cargo.toml | 3 +- README.md | 46 +- docs/ActionRowComponentForMessageRequest.md | 1 + docs/ActionRowComponentForModalRequest.md | 1 + docs/ActionRowComponentResponse.md | 2 +- docs/BaseCreateMessageCreateRequest.md | 1 + docs/BasicGuildMemberResponse.md | 21 + docs/BasicMessageResponse.md | 3 +- ...Request.md => BotAddGuildMemberRequest.md} | 2 +- docs/BotPartnerSdkTokenRequest.md | 12 + ...GuildRequest.md => BulkBanUsersRequest.md} | 2 +- docs/ButtonComponentForMessageRequest.md | 3 +- ...ChannelSelectComponentForMessageRequest.md | 2 + docs/ChannelSelectComponentForModalRequest.md | 20 + ...Request.md => ComponentEmojiForRequest.md} | 2 +- docs/ContainerComponentForMessageRequest.md | 1 + docs/CreateChannelInvite200Response.md | 13 + docs/CreateGuildRequestChannelItem.md | 30 - docs/CreateLobbyRequest.md | 1 + docs/CreateOrJoinLobbyRequest.md | 1 + ...ildRoleRequest.md => CreateRoleRequest.md} | 2 +- docs/CreatedThreadResponse.md | 2 +- docs/CustomClientThemeResponse.md | 14 + docs/CustomClientThemeShareRequest.md | 14 + docs/DefaultApi.md | 204 +- docs/DefaultKeywordRuleResponse.md | 6 +- docs/DiscordIntegrationResponse.md | 4 +- docs/EmbeddedActivityInstance.md | 2 +- docs/ExternalConnectionIntegrationResponse.md | 4 +- docs/FileComponentForMessageRequest.md | 1 + docs/FriendInviteResponse.md | 2 +- docs/GroupDmInviteResponse.md | 4 +- docs/GuildCreateRequest.md | 24 - docs/GuildHomeSettingsResponse.md | 4 +- docs/GuildInviteResponse.md | 8 +- docs/GuildMemberResponse.md | 1 + ...dMfaLevelRequest.md => GuildMfaRequest.md} | 2 +- docs/GuildResponse.md | 6 +- docs/GuildRoleColorsResponse.md | 2 +- docs/GuildRoleResponse.md | 2 +- docs/GuildSubscriptionIntegrationResponse.md | 4 +- docs/GuildTemplateChannelTags.md | 1 + docs/GuildWithCountsResponse.md | 6 +- docs/InviteGuildResponse.md | 2 +- docs/KeywordRuleResponse.md | 6 +- docs/LabelComponentForModalRequest.md | 15 + .../LabelComponentForModalRequestComponent.md | 16 + docs/ListChannelInvites200ResponseInner.md | 31 +- ...Request.md => LobbyGuildInviteResponse.md} | 5 +- docs/LobbyResponse.md | 3 +- .../MediaGalleryComponentForMessageRequest.md | 1 + docs/MentionSpamRuleResponse.md | 6 +- docs/MentionSpamTriggerMetadata.md | 2 +- docs/MentionSpamTriggerMetadataResponse.md | 2 +- ...ionableSelectComponentForMessageRequest.md | 2 + ...ntionableSelectComponentForModalRequest.md | 19 + docs/MessageCreateRequest.md | 1 + docs/MessageReferenceResponse.md | 2 +- docs/MessageResponse.md | 3 +- docs/MessageSnapshotResponse.md | 2 +- docs/MinimalContentMessageResponse.md | 1 - docs/MlSpamRuleResponse.md | 6 +- docs/ModalInteractionCallbackRequestData.md | 2 +- ...ctionCallbackRequestDataComponentsInner.md | 13 + docs/PartialDiscordIntegrationResponse.md | 2 +- ...alExternalConnectionIntegrationResponse.md | 2 +- ...ialGuildSubscriptionIntegrationResponse.md | 2 +- docs/PinnedMessagesResponse.md | 2 +- docs/PollAnswerDetailsResponse.md | 2 +- docs/PollResultsEntryResponse.md | 2 +- docs/PollResultsResponse.md | 2 +- docs/PrivateGroupChannelResponse.md | 2 +- docs/PrivateGuildMemberResponse.md | 1 + docs/PruneGuildRequest.md | 2 +- docs/RatelimitedResponse.md | 14 + docs/ResolvedObjectsResponse.md | 8 +- docs/RoleSelectComponentForMessageRequest.md | 2 + docs/RoleSelectComponentForModalRequest.md | 19 + docs/SdkMessageRequest.md | 1 + docs/SectionComponentForMessageRequest.md | 1 + docs/SeparatorComponentForMessageRequest.md | 1 + docs/SettingsEmojiResponse.md | 2 +- docs/SpamLinkRuleResponse.md | 6 +- docs/StageInstanceResponse.md | 2 +- .../StringSelectComponentForMessageRequest.md | 4 +- docs/StringSelectComponentForModalRequest.md | 19 + ...est.md => StringSelectOptionForRequest.md} | 4 +- docs/TextDisplayComponentForMessageRequest.md | 1 + docs/TextDisplayComponentForModalRequest.md | 13 + docs/TextInputComponentForModalRequest.md | 3 +- docs/ThreadResponse.md | 2 +- docs/ThreadSearchResponse.md | 4 +- docs/ThreadsResponse.md | 2 +- docs/ThumbnailComponentForMessageRequest.md | 1 + ...Inner.md => UpdateRolePositionsRequest.md} | 2 +- ...oleItem.md => UpdateRoleRequestPartial.md} | 4 +- ... => UpdateSelfVoiceStateRequestPartial.md} | 2 +- ...t.md => UpdateVoiceStateRequestPartial.md} | 2 +- docs/UserNameplateResponse.md | 6 +- docs/UserSelectComponentForMessageRequest.md | 2 + docs/UserSelectComponentForModalRequest.md | 19 + src/apis/configuration.rs | 4 +- src/apis/default_api.rs | 24056 ++++++++-------- src/apis/mod.rs | 1 - src/lib.rs | 1 + src/models/account_response.rs | 2 +- ...ction_row_component_for_message_request.rs | 5 +- ...nt_for_message_request_components_inner.rs | 2 +- .../action_row_component_for_modal_request.rs | 5 +- src/models/action_row_component_response.rs | 10 +- ...row_component_response_components_inner.rs | 2 +- src/models/activities_attachment_response.rs | 2 +- src/models/add_group_dm_user_201_response.rs | 2 +- src/models/add_group_dm_user_request.rs | 2 +- src/models/add_lobby_member_request.rs | 2 +- .../application_command_attachment_option.rs | 2 +- ...tion_command_attachment_option_response.rs | 14 +- ...n_command_autocomplete_callback_request.rs | 2 +- ...mand_autocomplete_callback_request_data.rs | 2 +- .../application_command_boolean_option.rs | 2 +- ...ication_command_boolean_option_response.rs | 14 +- .../application_command_channel_option.rs | 2 +- ...ication_command_channel_option_response.rs | 18 +- .../application_command_create_request.rs | 2 +- ...on_command_create_request_options_inner.rs | 2 +- .../application_command_integer_option.rs | 2 +- ...ication_command_integer_option_response.rs | 22 +- ...n_command_interaction_metadata_response.rs | 10 +- .../application_command_mentionable_option.rs | 2 +- ...ion_command_mentionable_option_response.rs | 14 +- .../application_command_number_option.rs | 2 +- ...lication_command_number_option_response.rs | 30 +- ...plication_command_option_integer_choice.rs | 2 +- ..._command_option_integer_choice_response.rs | 6 +- ...pplication_command_option_number_choice.rs | 2 +- ...n_command_option_number_choice_response.rs | 6 +- ...pplication_command_option_string_choice.rs | 2 +- ...n_command_option_string_choice_response.rs | 6 +- ...plication_command_patch_request_partial.rs | 2 +- src/models/application_command_permission.rs | 2 +- src/models/application_command_response.rs | 26 +- ...lication_command_response_options_inner.rs | 2 +- src/models/application_command_role_option.rs | 2 +- ...pplication_command_role_option_response.rs | 14 +- .../application_command_string_option.rs | 2 +- ...lication_command_string_option_response.rs | 30 +- ...ication_command_subcommand_group_option.rs | 2 +- ...ommand_subcommand_group_option_response.rs | 18 +- .../application_command_subcommand_option.rs | 2 +- ...command_subcommand_option_options_inner.rs | 2 +- ...tion_command_subcommand_option_response.rs | 18 +- ...ubcommand_option_response_options_inner.rs | 2 +- .../application_command_update_request.rs | 2 +- src/models/application_command_user_option.rs | 2 +- ...pplication_command_user_option_response.rs | 14 +- src/models/application_form_partial.rs | 2 +- .../application_form_partial_description.rs | 2 +- ..._partial_integration_types_config_value.rs | 2 +- .../application_incoming_webhook_response.rs | 6 +- ...lication_integration_type_configuration.rs | 2 +- ...integration_type_configuration_response.rs | 6 +- .../application_o_auth2_install_params.rs | 2 +- ...ication_o_auth2_install_params_response.rs | 2 +- src/models/application_response.rs | 46 +- ..._role_connections_metadata_item_request.rs | 2 +- ...role_connections_metadata_item_response.rs | 2 +- ...plication_user_role_connection_response.rs | 2 +- src/models/attachment_response.rs | 42 +- src/models/audit_log_entry_response.rs | 10 +- .../audit_log_object_change_response.rs | 2 +- src/models/ban_user_from_guild_request.rs | 2 +- .../base_create_message_create_request.rs | 5 +- ...message_create_request_components_inner.rs | 2 +- src/models/basic_application_response.rs | 10 +- src/models/basic_guild_member_response.rs | 90 + src/models/basic_message_response.rs | 67 +- ...basic_message_response_components_inner.rs | 2 +- ...c_message_response_interaction_metadata.rs | 2 +- src/models/basic_message_response_nonce.rs | 2 +- src/models/block_message_action.rs | 2 +- src/models/block_message_action_metadata.rs | 2 +- .../block_message_action_metadata_response.rs | 6 +- src/models/block_message_action_response.rs | 2 +- src/models/bot_account_patch_request.rs | 2 +- ...est.rs => bot_add_guild_member_request.rs} | 10 +- src/models/bot_partner_sdk_token_request.rs | 63 + ...d_request.rs => bulk_ban_users_request.rs} | 10 +- src/models/bulk_ban_users_response.rs | 2 +- src/models/bulk_delete_messages_request.rs | 2 +- src/models/bulk_lobby_member_request.rs | 2 +- ...ulk_update_guild_channels_request_inner.rs | 2 +- .../button_component_for_message_request.rs | 7 +- src/models/button_component_response.rs | 18 +- src/models/channel_follower_response.rs | 2 +- .../channel_follower_webhook_response.rs | 14 +- .../channel_permission_overwrite_request.rs | 2 +- .../channel_permission_overwrite_response.rs | 2 +- ...el_select_component_for_message_request.rs | 8 +- ...nnel_select_component_for_modal_request.rs | 87 + .../channel_select_component_response.rs | 18 +- src/models/channel_select_default_value.rs | 2 +- .../channel_select_default_value_response.rs | 2 +- src/models/command_permission_response.rs | 2 +- src/models/command_permissions_response.rs | 2 +- ...uest.rs => component_emoji_for_request.rs} | 10 +- src/models/component_emoji_response.rs | 6 +- .../connected_account_guild_response.rs | 2 +- .../connected_account_integration_response.rs | 2 +- src/models/connected_account_response.rs | 10 +- ...container_component_for_message_request.rs | 5 +- ...nt_for_message_request_components_inner.rs | 2 +- src/models/container_component_response.rs | 2 +- ...ner_component_response_components_inner.rs | 2 +- .../create_application_emoji_request.rs | 2 +- ...reate_auto_moderation_rule_200_response.rs | 2 +- .../create_auto_moderation_rule_request.rs | 2 +- .../create_channel_invite_200_response.rs | 60 + src/models/create_channel_invite_request.rs | 2 +- src/models/create_entitlement_request_data.rs | 2 +- src/models/create_forum_thread_request.rs | 2 +- src/models/create_group_dm_invite_request.rs | 2 +- src/models/create_guild_channel_request.rs | 2 +- src/models/create_guild_emoji_request.rs | 2 +- src/models/create_guild_invite_request.rs | 2 +- .../create_guild_request_channel_item.rs | 117 - .../create_guild_scheduled_event_request.rs | 2 +- src/models/create_guild_template_request.rs | 2 +- .../create_interaction_response_request.rs | 2 +- src/models/create_lobby_request.rs | 17 +- ...te_message_interaction_callback_request.rs | 2 +- ...e_message_interaction_callback_response.rs | 2 +- src/models/create_or_join_lobby_request.rs | 17 +- .../create_or_update_thread_tag_request.rs | 2 +- src/models/create_private_channel_request.rs | 2 +- ...role_request.rs => create_role_request.rs} | 10 +- src/models/create_stage_instance_request.rs | 2 +- ...create_text_thread_with_message_request.rs | 2 +- ...ate_text_thread_without_message_request.rs | 2 +- src/models/create_thread_request.rs | 2 +- src/models/create_webhook_request.rs | 2 +- src/models/created_thread_response.rs | 30 +- src/models/custom_client_theme_response.rs | 69 + .../custom_client_theme_share_request.rs | 69 + .../default_keyword_list_trigger_metadata.rs | 2 +- ..._keyword_list_trigger_metadata_response.rs | 2 +- .../default_keyword_list_upsert_request.rs | 2 +- ...yword_list_upsert_request_actions_inner.rs | 2 +- ...ult_keyword_list_upsert_request_partial.rs | 2 +- src/models/default_keyword_rule_response.rs | 22 +- ...ult_keyword_rule_response_actions_inner.rs | 2 +- src/models/default_reaction_emoji_response.rs | 2 +- src/models/discord_integration_response.rs | 20 +- src/models/edit_lobby_channel_link_request.rs | 2 +- src/models/embedded_activity_instance.rs | 10 +- .../embedded_activity_instance_location.rs | 2 +- src/models/emoji_response.rs | 6 +- src/models/entitlement_response.rs | 2 +- src/models/entity_metadata_external.rs | 2 +- .../entity_metadata_external_response.rs | 2 +- src/models/error.rs | 2 +- src/models/error_details.rs | 2 +- src/models/error_response.rs | 2 +- src/models/execute_webhook_request.rs | 2 +- ...xternal_connection_integration_response.rs | 36 +- ...external_scheduled_event_create_request.rs | 2 +- ...l_scheduled_event_patch_request_partial.rs | 2 +- .../external_scheduled_event_response.rs | 10 +- .../file_component_for_message_request.rs | 5 +- src/models/file_component_response.rs | 2 +- src/models/flag_to_channel_action.rs | 2 +- src/models/flag_to_channel_action_metadata.rs | 2 +- ...lag_to_channel_action_metadata_response.rs | 2 +- src/models/flag_to_channel_action_response.rs | 2 +- src/models/follow_channel_request.rs | 2 +- src/models/forum_tag_response.rs | 2 +- src/models/friend_invite_response.rs | 42 +- src/models/gateway_bot_response.rs | 2 +- ...ateway_bot_session_start_limit_response.rs | 2 +- src/models/gateway_response.rs | 2 +- src/models/get_channel_200_response.rs | 2 +- .../get_entitlements_sku_ids_parameter.rs | 2 +- src/models/get_sticker_200_response.rs | 2 +- src/models/github_author.rs | 2 +- src/models/github_check_app.rs | 2 +- src/models/github_check_pull_request.rs | 2 +- src/models/github_check_run.rs | 2 +- src/models/github_check_run_output.rs | 2 +- src/models/github_check_suite.rs | 2 +- src/models/github_comment.rs | 2 +- src/models/github_commit.rs | 2 +- src/models/github_discussion.rs | 2 +- src/models/github_issue.rs | 2 +- src/models/github_release.rs | 2 +- src/models/github_repository.rs | 2 +- src/models/github_review.rs | 2 +- src/models/github_user.rs | 2 +- src/models/github_webhook.rs | 2 +- src/models/group_dm_invite_response.rs | 28 +- src/models/guild_audit_log_response.rs | 2 +- ...d_audit_log_response_integrations_inner.rs | 2 +- src/models/guild_ban_response.rs | 2 +- src/models/guild_channel_location.rs | 2 +- src/models/guild_channel_response.rs | 34 +- src/models/guild_create_request.rs | 99 - src/models/guild_home_settings_response.rs | 20 +- src/models/guild_incoming_webhook_response.rs | 14 +- src/models/guild_invite_response.rs | 76 +- src/models/guild_member_response.rs | 5 +- src/models/guild_mfa_level_response.rs | 2 +- ..._level_request.rs => guild_mfa_request.rs} | 10 +- src/models/guild_onboarding_response.rs | 2 +- src/models/guild_patch_request_partial.rs | 2 +- src/models/guild_preview_response.rs | 2 +- src/models/guild_product_purchase_response.rs | 2 +- src/models/guild_prune_response.rs | 2 +- src/models/guild_response.rs | 22 +- src/models/guild_role_colors_response.rs | 10 +- src/models/guild_role_response.rs | 14 +- src/models/guild_role_tags_response.rs | 2 +- src/models/guild_sticker_response.rs | 6 +- ...guild_subscription_integration_response.rs | 16 +- src/models/guild_template_channel_response.rs | 2 +- src/models/guild_template_channel_tags.rs | 5 +- src/models/guild_template_response.rs | 2 +- src/models/guild_template_role_response.rs | 2 +- .../guild_template_snapshot_response.rs | 2 +- src/models/guild_welcome_channel.rs | 2 +- .../guild_welcome_screen_channel_response.rs | 2 +- src/models/guild_welcome_screen_response.rs | 2 +- src/models/guild_with_counts_response.rs | 22 +- .../incoming_webhook_interaction_request.rs | 2 +- .../incoming_webhook_request_partial.rs | 2 +- ...or_interaction_callback_request_partial.rs | 2 +- ...incoming_webhook_update_request_partial.rs | 2 +- src/models/inner_errors.rs | 2 +- .../integration_application_response.rs | 10 +- ...mand_autocomplete_callback_integer_data.rs | 2 +- ...mmand_autocomplete_callback_number_data.rs | 2 +- ...mmand_autocomplete_callback_string_data.rs | 2 +- src/models/interaction_callback_response.rs | 6 +- .../interaction_callback_response_resource.rs | 2 +- src/models/interaction_response.rs | 10 +- src/models/invite_application_response.rs | 46 +- .../invite_channel_recipient_response.rs | 2 +- src/models/invite_channel_response.rs | 10 +- src/models/invite_guild_response.rs | 10 +- src/models/keyword_rule_response.rs | 22 +- src/models/keyword_trigger_metadata.rs | 2 +- .../keyword_trigger_metadata_response.rs | 2 +- src/models/keyword_upsert_request.rs | 2 +- src/models/keyword_upsert_request_partial.rs | 2 +- .../label_component_for_modal_request.rs | 72 + ...l_component_for_modal_request_component.rs | 63 + ...h_activity_interaction_callback_request.rs | 2 +- ..._activity_interaction_callback_response.rs | 2 +- .../list_application_emojis_response.rs | 2 +- ...uto_moderation_rules_200_response_inner.rs | 2 +- ...list_channel_invites_200_response_inner.rs | 83 +- ...ist_channel_webhooks_200_response_inner.rs | 2 +- ...t_guild_integrations_200_response_inner.rs | 2 +- ...ild_scheduled_events_200_response_inner.rs | 2 +- .../list_guild_soundboard_sounds_response.rs | 2 +- ...uest.rs => lobby_guild_invite_response.rs} | 19 +- src/models/lobby_member_request.rs | 2 +- src/models/lobby_member_response.rs | 2 +- src/models/lobby_message_response.rs | 2 +- src/models/lobby_response.rs | 17 +- ...a_gallery_component_for_message_request.rs | 5 +- .../media_gallery_component_response.rs | 2 +- src/models/media_gallery_item_request.rs | 2 +- src/models/media_gallery_item_response.rs | 2 +- src/models/mention_spam_rule_response.rs | 22 +- src/models/mention_spam_trigger_metadata.rs | 10 +- .../mention_spam_trigger_metadata_response.rs | 10 +- src/models/mention_spam_upsert_request.rs | 2 +- .../mention_spam_upsert_request_partial.rs | 2 +- ...le_select_component_for_message_request.rs | 8 +- ...or_message_request_default_values_inner.rs | 2 +- ...able_select_component_for_modal_request.rs | 84 + .../mentionable_select_component_response.rs | 14 +- ...component_response_default_values_inner.rs | 2 +- .../message_allowed_mentions_request.rs | 2 +- src/models/message_attachment_request.rs | 2 +- src/models/message_attachment_response.rs | 42 +- src/models/message_call_response.rs | 2 +- ...component_interaction_metadata_response.rs | 6 +- src/models/message_create_request.rs | 5 +- src/models/message_edit_request_partial.rs | 2 +- src/models/message_embed_author_response.rs | 14 +- src/models/message_embed_field_response.rs | 2 +- src/models/message_embed_footer_response.rs | 10 +- src/models/message_embed_image_response.rs | 22 +- src/models/message_embed_provider_response.rs | 6 +- src/models/message_embed_response.rs | 50 +- src/models/message_embed_video_response.rs | 22 +- src/models/message_interaction_response.rs | 10 +- .../message_mention_channel_response.rs | 2 +- ...message_reaction_count_details_response.rs | 2 +- src/models/message_reaction_emoji_response.rs | 6 +- src/models/message_reaction_response.rs | 2 +- src/models/message_reference_request.rs | 2 +- src/models/message_reference_response.rs | 10 +- src/models/message_response.rs | 71 +- ...message_role_subscription_data_response.rs | 2 +- src/models/message_snapshot_response.rs | 10 +- src/models/message_sticker_item_response.rs | 2 +- .../minimal_content_message_response.rs | 13 +- src/models/ml_spam_rule_response.rs | 22 +- src/models/ml_spam_upsert_request.rs | 2 +- src/models/ml_spam_upsert_request_partial.rs | 2 +- src/models/mod.rs | 78 +- .../modal_interaction_callback_request.rs | 2 +- ...modal_interaction_callback_request_data.rs | 6 +- ..._callback_request_data_components_inner.rs | 60 + ...al_submit_interaction_metadata_response.rs | 6 +- ...esponse_triggering_interaction_metadata.rs | 2 +- src/models/my_guild_response.rs | 2 +- src/models/new_member_action_response.rs | 10 +- .../o_auth2_get_authorization_response.rs | 6 +- src/models/o_auth2_get_keys.rs | 2 +- ..._get_open_id_connect_user_info_response.rs | 18 +- src/models/o_auth2_key.rs | 2 +- .../onboarding_prompt_option_request.rs | 2 +- .../onboarding_prompt_option_response.rs | 2 +- src/models/onboarding_prompt_response.rs | 2 +- .../partial_discord_integration_response.rs | 10 +- ...xternal_connection_integration_response.rs | 10 +- ...guild_subscription_integration_response.rs | 10 +- ...sdk_unmerge_provisional_account_request.rs | 2 +- src/models/pinned_message_response.rs | 2 +- src/models/pinned_messages_response.rs | 10 +- src/models/poll_answer_create_request.rs | 2 +- src/models/poll_answer_details_response.rs | 10 +- src/models/poll_answer_response.rs | 2 +- src/models/poll_create_request.rs | 2 +- src/models/poll_emoji.rs | 2 +- src/models/poll_emoji_create_request.rs | 2 +- src/models/poll_media.rs | 2 +- src/models/poll_media_create_request.rs | 2 +- src/models/poll_media_response.rs | 10 +- src/models/poll_response.rs | 2 +- src/models/poll_results_entry_response.rs | 10 +- src/models/poll_results_response.rs | 10 +- .../pong_interaction_callback_request.rs | 2 +- src/models/private_application_response.rs | 46 +- src/models/private_channel_location.rs | 2 +- src/models/private_channel_response.rs | 2 +- src/models/private_group_channel_response.rs | 14 +- src/models/private_guild_member_response.rs | 5 +- src/models/provisional_token_response.rs | 2 +- src/models/prune_guild_request.rs | 2 +- .../prune_guild_request_include_roles.rs | 2 +- src/models/purchase_notification_response.rs | 6 +- src/models/quarantine_user_action.rs | 2 +- src/models/quarantine_user_action_response.rs | 2 +- src/models/ratelimited_response.rs | 75 + src/models/resolved_objects_response.rs | 28 +- src/models/resource_channel_response.rs | 10 +- src/models/rich_embed.rs | 2 +- src/models/rich_embed_author.rs | 2 +- src/models/rich_embed_field.rs | 2 +- src/models/rich_embed_footer.rs | 2 +- src/models/rich_embed_image.rs | 2 +- src/models/rich_embed_provider.rs | 2 +- src/models/rich_embed_thumbnail.rs | 2 +- src/models/rich_embed_video.rs | 2 +- ...le_select_component_for_message_request.rs | 8 +- ...role_select_component_for_modal_request.rs | 84 + src/models/role_select_component_response.rs | 14 +- src/models/role_select_default_value.rs | 2 +- .../role_select_default_value_response.rs | 2 +- src/models/scheduled_event_response.rs | 10 +- src/models/scheduled_event_user_response.rs | 10 +- src/models/sdk_message_request.rs | 5 +- .../section_component_for_message_request.rs | 5 +- ...component_for_message_request_accessory.rs | 2 +- src/models/section_component_response.rs | 2 +- .../section_component_response_accessory.rs | 2 +- ...separator_component_for_message_request.rs | 5 +- src/models/separator_component_response.rs | 2 +- ...et_channel_permission_overwrite_request.rs | 2 +- ...application_command_permissions_request.rs | 2 +- src/models/settings_emoji_response.rs | 10 +- src/models/slack_webhook.rs | 2 +- src/models/soundboard_create_request.rs | 2 +- .../soundboard_patch_request_partial.rs | 2 +- src/models/soundboard_sound_response.rs | 6 +- src/models/soundboard_sound_send_request.rs | 2 +- src/models/spam_link_rule_response.rs | 22 +- src/models/stage_instance_response.rs | 10 +- .../stage_scheduled_event_create_request.rs | 2 +- ...e_scheduled_event_patch_request_partial.rs | 2 +- src/models/stage_scheduled_event_response.rs | 10 +- src/models/standard_sticker_response.rs | 2 +- .../sticker_pack_collection_response.rs | 2 +- src/models/sticker_pack_response.rs | 2 +- ...ng_select_component_for_message_request.rs | 12 +- ...ring_select_component_for_modal_request.rs | 84 + .../string_select_component_response.rs | 10 +- ...rs => string_select_option_for_request.rs} | 12 +- src/models/string_select_option_response.rs | 14 +- src/models/team_member_response.rs | 2 +- src/models/team_response.rs | 2 +- ...t_display_component_for_message_request.rs | 5 +- ...ext_display_component_for_modal_request.rs | 66 + src/models/text_display_component_response.rs | 2 +- .../text_input_component_for_modal_request.rs | 13 +- src/models/text_input_component_response.rs | 14 +- src/models/thread_member_response.rs | 6 +- src/models/thread_metadata_response.rs | 10 +- src/models/thread_response.rs | 30 +- src/models/thread_search_response.rs | 20 +- src/models/thread_search_tag_parameter.rs | 2 +- src/models/threads_response.rs | 14 +- ...thumbnail_component_for_message_request.rs | 5 +- src/models/thumbnail_component_response.rs | 2 +- src/models/unfurled_media_request.rs | 2 +- ...uest_with_attachment_reference_required.rs | 2 +- src/models/unfurled_media_response.rs | 2 +- .../update_application_emoji_request.rs | 2 +- ...pplication_user_role_connection_request.rs | 2 +- .../update_auto_moderation_rule_request.rs | 2 +- src/models/update_channel_request.rs | 2 +- .../update_default_reaction_emoji_request.rs | 2 +- src/models/update_dm_request_partial.rs | 2 +- src/models/update_group_dm_request_partial.rs | 2 +- .../update_guild_channel_request_partial.rs | 2 +- src/models/update_guild_emoji_request.rs | 2 +- src/models/update_guild_member_request.rs | 2 +- src/models/update_guild_onboarding_request.rs | 2 +- .../update_guild_scheduled_event_request.rs | 2 +- src/models/update_guild_sticker_request.rs | 2 +- src/models/update_guild_template_request.rs | 2 +- .../update_guild_widget_settings_request.rs | 2 +- ...te_message_interaction_callback_request.rs | 2 +- ...e_message_interaction_callback_response.rs | 2 +- src/models/update_my_guild_member_request.rs | 2 +- .../update_onboarding_prompt_request.rs | 2 +- ...er.rs => update_role_positions_request.rs} | 10 +- ...item.rs => update_role_request_partial.rs} | 16 +- ...pdate_self_voice_state_request_partial.rs} | 10 +- src/models/update_stage_instance_request.rs | 2 +- src/models/update_thread_request_partial.rs | 2 +- src/models/update_thread_tag_request.rs | 2 +- ... => update_voice_state_request_partial.rs} | 10 +- src/models/update_webhook_by_token_request.rs | 2 +- src/models/update_webhook_request.rs | 2 +- src/models/user_avatar_decoration_response.rs | 2 +- src/models/user_collectibles_response.rs | 2 +- .../user_communication_disabled_action.rs | 2 +- ..._communication_disabled_action_metadata.rs | 2 +- ...ation_disabled_action_metadata_response.rs | 2 +- ..._communication_disabled_action_response.rs | 2 +- src/models/user_guild_onboarding_response.rs | 2 +- src/models/user_nameplate_response.rs | 22 +- src/models/user_pii_response.rs | 14 +- src/models/user_primary_guild_response.rs | 2 +- src/models/user_response.rs | 10 +- ...er_select_component_for_message_request.rs | 8 +- ...user_select_component_for_modal_request.rs | 84 + src/models/user_select_component_response.rs | 14 +- src/models/user_select_default_value.rs | 2 +- .../user_select_default_value_response.rs | 2 +- src/models/vanity_url_error_response.rs | 2 +- src/models/vanity_url_response.rs | 2 +- src/models/voice_region_response.rs | 2 +- .../voice_scheduled_event_create_request.rs | 2 +- ...e_scheduled_event_patch_request_partial.rs | 2 +- src/models/voice_scheduled_event_response.rs | 10 +- src/models/voice_state_response.rs | 6 +- src/models/webhook_slack_embed.rs | 2 +- src/models/webhook_slack_embed_field.rs | 2 +- src/models/webhook_source_channel_response.rs | 2 +- src/models/webhook_source_guild_response.rs | 2 +- src/models/welcome_message_response.rs | 2 +- .../welcome_screen_patch_request_partial.rs | 2 +- src/models/widget_activity.rs | 2 +- src/models/widget_channel.rs | 2 +- src/models/widget_member.rs | 26 +- src/models/widget_response.rs | 2 +- src/models/widget_settings_response.rs | 2 +- 581 files changed, 14715 insertions(+), 14545 deletions(-) create mode 100644 docs/BasicGuildMemberResponse.md rename docs/{AddGuildMemberRequest.md => BotAddGuildMemberRequest.md} (95%) create mode 100644 docs/BotPartnerSdkTokenRequest.md rename docs/{BulkBanUsersFromGuildRequest.md => BulkBanUsersRequest.md} (92%) create mode 100644 docs/ChannelSelectComponentForModalRequest.md rename docs/{ComponentEmojiForMessageRequest.md => ComponentEmojiForRequest.md} (91%) create mode 100644 docs/CreateChannelInvite200Response.md delete mode 100644 docs/CreateGuildRequestChannelItem.md rename docs/{CreateGuildRoleRequest.md => CreateRoleRequest.md} (96%) create mode 100644 docs/CustomClientThemeResponse.md create mode 100644 docs/CustomClientThemeShareRequest.md delete mode 100644 docs/GuildCreateRequest.md rename docs/{SetGuildMfaLevelRequest.md => GuildMfaRequest.md} (92%) create mode 100644 docs/LabelComponentForModalRequest.md create mode 100644 docs/LabelComponentForModalRequestComponent.md rename docs/{CreateGuildFromTemplateRequest.md => LobbyGuildInviteResponse.md} (72%) create mode 100644 docs/MentionableSelectComponentForModalRequest.md create mode 100644 docs/ModalInteractionCallbackRequestDataComponentsInner.md create mode 100644 docs/RatelimitedResponse.md create mode 100644 docs/RoleSelectComponentForModalRequest.md create mode 100644 docs/StringSelectComponentForModalRequest.md rename docs/{StringSelectOptionForMessageRequest.md => StringSelectOptionForRequest.md} (73%) create mode 100644 docs/TextDisplayComponentForModalRequest.md rename docs/{BulkUpdateGuildRolesRequestInner.md => UpdateRolePositionsRequest.md} (91%) rename docs/{CreateGuildRequestRoleItem.md => UpdateRoleRequestPartial.md} (88%) rename docs/{UpdateSelfVoiceStateRequest.md => UpdateSelfVoiceStateRequestPartial.md} (92%) rename docs/{UpdateVoiceStateRequest.md => UpdateVoiceStateRequestPartial.md} (91%) create mode 100644 docs/UserSelectComponentForModalRequest.md create mode 100644 src/models/basic_guild_member_response.rs rename src/models/{add_guild_member_request.rs => bot_add_guild_member_request.rs} (94%) create mode 100644 src/models/bot_partner_sdk_token_request.rs rename src/models/{bulk_ban_users_from_guild_request.rs => bulk_ban_users_request.rs} (92%) create mode 100644 src/models/channel_select_component_for_modal_request.rs rename src/models/{component_emoji_for_message_request.rs => component_emoji_for_request.rs} (92%) create mode 100644 src/models/create_channel_invite_200_response.rs delete mode 100644 src/models/create_guild_request_channel_item.rs rename src/models/{create_guild_role_request.rs => create_role_request.rs} (95%) create mode 100644 src/models/custom_client_theme_response.rs create mode 100644 src/models/custom_client_theme_share_request.rs delete mode 100644 src/models/guild_create_request.rs rename src/models/{set_guild_mfa_level_request.rs => guild_mfa_request.rs} (93%) create mode 100644 src/models/label_component_for_modal_request.rs create mode 100644 src/models/label_component_for_modal_request_component.rs rename src/models/{create_guild_from_template_request.rs => lobby_guild_invite_response.rs} (85%) create mode 100644 src/models/mentionable_select_component_for_modal_request.rs create mode 100644 src/models/modal_interaction_callback_request_data_components_inner.rs create mode 100644 src/models/ratelimited_response.rs create mode 100644 src/models/role_select_component_for_modal_request.rs create mode 100644 src/models/string_select_component_for_modal_request.rs rename src/models/{string_select_option_for_message_request.rs => string_select_option_for_request.rs} (92%) create mode 100644 src/models/text_display_component_for_modal_request.rs rename src/models/{bulk_update_guild_roles_request_inner.rs => update_role_positions_request.rs} (93%) rename src/models/{create_guild_request_role_item.rs => update_role_request_partial.rs} (91%) rename src/models/{update_self_voice_state_request.rs => update_self_voice_state_request_partial.rs} (93%) rename src/models/{update_voice_state_request.rs => update_voice_state_request_partial.rs} (93%) create mode 100644 src/models/user_select_component_for_modal_request.rs diff --git a/Cargo.toml b/Cargo.toml index 1c19ee2..9292d2d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,6 @@ serde_with = { version = "^3.13", default-features = false, features = ["base64" serde_json = "^1.0" serde_repr = "^0.1" url = "^2.5" -async-trait = "^0.1" reqwest = { version = "^0.12", default-features = false, features = ["json", "multipart"] } reqwest-middleware = { version = "^0.4", features = ["json", "multipart"], optional = true } @@ -20,4 +19,4 @@ reqwest-middleware = { version = "^0.4", features = ["json", "multipart"], optio default = ["native-tls"] native-tls = ["reqwest/native-tls"] rustls = ["reqwest/rustls-tls"] -middleware = ["reqwest-middleware"] \ No newline at end of file +middleware = ["reqwest-middleware"] diff --git a/README.md b/README.md index 9c22965..c993eca 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Preview of the Discord v10 HTTP API specification. See https://discord.com/devel - API version: 10 - Package version: 10 -- Build date: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +- Build date: 2025-09-06T05:32:19.066280170Z[Etc/UTC] ## Installation @@ -31,6 +31,7 @@ Class | Method | HTTP request | Description *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* | [**bot_partner_sdk_token**](docs/DefaultApi.md#bot_partner_sdk_token) | **POST** /partner-sdk/token/bot | *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 | @@ -45,17 +46,17 @@ Class | Method | HTTP request | Description *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_linked_lobby_guild_invite_for_self**](docs/DefaultApi.md#create_linked_lobby_guild_invite_for_self) | **POST** /lobbies/{lobby_id}/members/@me/invites | +*DefaultApi* | [**create_linked_lobby_guild_invite_for_user**](docs/DefaultApi.md#create_linked_lobby_guild_invite_for_user) | **POST** /lobbies/{lobby_id}/members/{user_id}/invites | *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 | @@ -258,7 +259,6 @@ Class | Method | HTTP request | Description - [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) @@ -319,6 +319,7 @@ Class | Method | HTTP request | Description - [BaseCreateMessageCreateRequest](docs/BaseCreateMessageCreateRequest.md) - [BaseCreateMessageCreateRequestComponentsInner](docs/BaseCreateMessageCreateRequestComponentsInner.md) - [BasicApplicationResponse](docs/BasicApplicationResponse.md) + - [BasicGuildMemberResponse](docs/BasicGuildMemberResponse.md) - [BasicMessageResponse](docs/BasicMessageResponse.md) - [BasicMessageResponseComponentsInner](docs/BasicMessageResponseComponentsInner.md) - [BasicMessageResponseInteractionMetadata](docs/BasicMessageResponseInteractionMetadata.md) @@ -328,12 +329,13 @@ Class | Method | HTTP request | Description - [BlockMessageActionMetadataResponse](docs/BlockMessageActionMetadataResponse.md) - [BlockMessageActionResponse](docs/BlockMessageActionResponse.md) - [BotAccountPatchRequest](docs/BotAccountPatchRequest.md) - - [BulkBanUsersFromGuildRequest](docs/BulkBanUsersFromGuildRequest.md) + - [BotAddGuildMemberRequest](docs/BotAddGuildMemberRequest.md) + - [BotPartnerSdkTokenRequest](docs/BotPartnerSdkTokenRequest.md) + - [BulkBanUsersRequest](docs/BulkBanUsersRequest.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) @@ -341,12 +343,13 @@ Class | Method | HTTP request | Description - [ChannelPermissionOverwriteRequest](docs/ChannelPermissionOverwriteRequest.md) - [ChannelPermissionOverwriteResponse](docs/ChannelPermissionOverwriteResponse.md) - [ChannelSelectComponentForMessageRequest](docs/ChannelSelectComponentForMessageRequest.md) + - [ChannelSelectComponentForModalRequest](docs/ChannelSelectComponentForModalRequest.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) + - [ComponentEmojiForRequest](docs/ComponentEmojiForRequest.md) - [ComponentEmojiResponse](docs/ComponentEmojiResponse.md) - [ConnectedAccountGuildResponse](docs/ConnectedAccountGuildResponse.md) - [ConnectedAccountIntegrationResponse](docs/ConnectedAccountIntegrationResponse.md) @@ -358,17 +361,14 @@ Class | Method | HTTP request | Description - [CreateApplicationEmojiRequest](docs/CreateApplicationEmojiRequest.md) - [CreateAutoModerationRule200Response](docs/CreateAutoModerationRule200Response.md) - [CreateAutoModerationRuleRequest](docs/CreateAutoModerationRuleRequest.md) + - [CreateChannelInvite200Response](docs/CreateChannelInvite200Response.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) @@ -378,12 +378,15 @@ Class | Method | HTTP request | Description - [CreateOrJoinLobbyRequest](docs/CreateOrJoinLobbyRequest.md) - [CreateOrUpdateThreadTagRequest](docs/CreateOrUpdateThreadTagRequest.md) - [CreatePrivateChannelRequest](docs/CreatePrivateChannelRequest.md) + - [CreateRoleRequest](docs/CreateRoleRequest.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) + - [CustomClientThemeResponse](docs/CustomClientThemeResponse.md) + - [CustomClientThemeShareRequest](docs/CustomClientThemeShareRequest.md) - [DefaultKeywordListTriggerMetadata](docs/DefaultKeywordListTriggerMetadata.md) - [DefaultKeywordListTriggerMetadataResponse](docs/DefaultKeywordListTriggerMetadataResponse.md) - [DefaultKeywordListUpsertRequest](docs/DefaultKeywordListUpsertRequest.md) @@ -444,12 +447,12 @@ Class | Method | HTTP request | Description - [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) - [GuildMemberResponse](docs/GuildMemberResponse.md) - [GuildMfaLevelResponse](docs/GuildMfaLevelResponse.md) + - [GuildMfaRequest](docs/GuildMfaRequest.md) - [GuildOnboardingResponse](docs/GuildOnboardingResponse.md) - [GuildPatchRequestPartial](docs/GuildPatchRequestPartial.md) - [GuildPreviewResponse](docs/GuildPreviewResponse.md) @@ -491,6 +494,8 @@ Class | Method | HTTP request | Description - [KeywordTriggerMetadataResponse](docs/KeywordTriggerMetadataResponse.md) - [KeywordUpsertRequest](docs/KeywordUpsertRequest.md) - [KeywordUpsertRequestPartial](docs/KeywordUpsertRequestPartial.md) + - [LabelComponentForModalRequest](docs/LabelComponentForModalRequest.md) + - [LabelComponentForModalRequestComponent](docs/LabelComponentForModalRequestComponent.md) - [LaunchActivityInteractionCallbackRequest](docs/LaunchActivityInteractionCallbackRequest.md) - [LaunchActivityInteractionCallbackResponse](docs/LaunchActivityInteractionCallbackResponse.md) - [ListApplicationEmojisResponse](docs/ListApplicationEmojisResponse.md) @@ -500,6 +505,7 @@ Class | Method | HTTP request | Description - [ListGuildIntegrations200ResponseInner](docs/ListGuildIntegrations200ResponseInner.md) - [ListGuildScheduledEvents200ResponseInner](docs/ListGuildScheduledEvents200ResponseInner.md) - [ListGuildSoundboardSoundsResponse](docs/ListGuildSoundboardSoundsResponse.md) + - [LobbyGuildInviteResponse](docs/LobbyGuildInviteResponse.md) - [LobbyMemberRequest](docs/LobbyMemberRequest.md) - [LobbyMemberResponse](docs/LobbyMemberResponse.md) - [LobbyMessageResponse](docs/LobbyMessageResponse.md) @@ -515,6 +521,7 @@ Class | Method | HTTP request | Description - [MentionSpamUpsertRequestPartial](docs/MentionSpamUpsertRequestPartial.md) - [MentionableSelectComponentForMessageRequest](docs/MentionableSelectComponentForMessageRequest.md) - [MentionableSelectComponentForMessageRequestDefaultValuesInner](docs/MentionableSelectComponentForMessageRequestDefaultValuesInner.md) + - [MentionableSelectComponentForModalRequest](docs/MentionableSelectComponentForModalRequest.md) - [MentionableSelectComponentResponse](docs/MentionableSelectComponentResponse.md) - [MentionableSelectComponentResponseDefaultValuesInner](docs/MentionableSelectComponentResponseDefaultValuesInner.md) - [MessageAllowedMentionsRequest](docs/MessageAllowedMentionsRequest.md) @@ -548,6 +555,7 @@ Class | Method | HTTP request | Description - [MlSpamUpsertRequestPartial](docs/MlSpamUpsertRequestPartial.md) - [ModalInteractionCallbackRequest](docs/ModalInteractionCallbackRequest.md) - [ModalInteractionCallbackRequestData](docs/ModalInteractionCallbackRequestData.md) + - [ModalInteractionCallbackRequestDataComponentsInner](docs/ModalInteractionCallbackRequestDataComponentsInner.md) - [ModalSubmitInteractionMetadataResponse](docs/ModalSubmitInteractionMetadataResponse.md) - [ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata](docs/ModalSubmitInteractionMetadataResponseTriggeringInteractionMetadata.md) - [MyGuildResponse](docs/MyGuildResponse.md) @@ -589,6 +597,7 @@ Class | Method | HTTP request | Description - [PurchaseNotificationResponse](docs/PurchaseNotificationResponse.md) - [QuarantineUserAction](docs/QuarantineUserAction.md) - [QuarantineUserActionResponse](docs/QuarantineUserActionResponse.md) + - [RatelimitedResponse](docs/RatelimitedResponse.md) - [ResolvedObjectsResponse](docs/ResolvedObjectsResponse.md) - [ResourceChannelResponse](docs/ResourceChannelResponse.md) - [RichEmbed](docs/RichEmbed.md) @@ -600,6 +609,7 @@ Class | Method | HTTP request | Description - [RichEmbedThumbnail](docs/RichEmbedThumbnail.md) - [RichEmbedVideo](docs/RichEmbedVideo.md) - [RoleSelectComponentForMessageRequest](docs/RoleSelectComponentForMessageRequest.md) + - [RoleSelectComponentForModalRequest](docs/RoleSelectComponentForModalRequest.md) - [RoleSelectComponentResponse](docs/RoleSelectComponentResponse.md) - [RoleSelectDefaultValue](docs/RoleSelectDefaultValue.md) - [RoleSelectDefaultValueResponse](docs/RoleSelectDefaultValueResponse.md) @@ -614,7 +624,6 @@ Class | Method | HTTP request | Description - [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) @@ -630,12 +639,14 @@ Class | Method | HTTP request | Description - [StickerPackCollectionResponse](docs/StickerPackCollectionResponse.md) - [StickerPackResponse](docs/StickerPackResponse.md) - [StringSelectComponentForMessageRequest](docs/StringSelectComponentForMessageRequest.md) + - [StringSelectComponentForModalRequest](docs/StringSelectComponentForModalRequest.md) - [StringSelectComponentResponse](docs/StringSelectComponentResponse.md) - - [StringSelectOptionForMessageRequest](docs/StringSelectOptionForMessageRequest.md) + - [StringSelectOptionForRequest](docs/StringSelectOptionForRequest.md) - [StringSelectOptionResponse](docs/StringSelectOptionResponse.md) - [TeamMemberResponse](docs/TeamMemberResponse.md) - [TeamResponse](docs/TeamResponse.md) - [TextDisplayComponentForMessageRequest](docs/TextDisplayComponentForMessageRequest.md) + - [TextDisplayComponentForModalRequest](docs/TextDisplayComponentForModalRequest.md) - [TextDisplayComponentResponse](docs/TextDisplayComponentResponse.md) - [TextInputComponentForModalRequest](docs/TextInputComponentForModalRequest.md) - [TextInputComponentResponse](docs/TextInputComponentResponse.md) @@ -669,11 +680,13 @@ Class | Method | HTTP request | Description - [UpdateMessageInteractionCallbackResponse](docs/UpdateMessageInteractionCallbackResponse.md) - [UpdateMyGuildMemberRequest](docs/UpdateMyGuildMemberRequest.md) - [UpdateOnboardingPromptRequest](docs/UpdateOnboardingPromptRequest.md) - - [UpdateSelfVoiceStateRequest](docs/UpdateSelfVoiceStateRequest.md) + - [UpdateRolePositionsRequest](docs/UpdateRolePositionsRequest.md) + - [UpdateRoleRequestPartial](docs/UpdateRoleRequestPartial.md) + - [UpdateSelfVoiceStateRequestPartial](docs/UpdateSelfVoiceStateRequestPartial.md) - [UpdateStageInstanceRequest](docs/UpdateStageInstanceRequest.md) - [UpdateThreadRequestPartial](docs/UpdateThreadRequestPartial.md) - [UpdateThreadTagRequest](docs/UpdateThreadTagRequest.md) - - [UpdateVoiceStateRequest](docs/UpdateVoiceStateRequest.md) + - [UpdateVoiceStateRequestPartial](docs/UpdateVoiceStateRequestPartial.md) - [UpdateWebhookByTokenRequest](docs/UpdateWebhookByTokenRequest.md) - [UpdateWebhookRequest](docs/UpdateWebhookRequest.md) - [UserAvatarDecorationResponse](docs/UserAvatarDecorationResponse.md) @@ -688,6 +701,7 @@ Class | Method | HTTP request | Description - [UserPrimaryGuildResponse](docs/UserPrimaryGuildResponse.md) - [UserResponse](docs/UserResponse.md) - [UserSelectComponentForMessageRequest](docs/UserSelectComponentForMessageRequest.md) + - [UserSelectComponentForModalRequest](docs/UserSelectComponentForModalRequest.md) - [UserSelectComponentResponse](docs/UserSelectComponentResponse.md) - [UserSelectDefaultValue](docs/UserSelectDefaultValue.md) - [UserSelectDefaultValueResponse](docs/UserSelectDefaultValueResponse.md) diff --git a/docs/ActionRowComponentForMessageRequest.md b/docs/ActionRowComponentForMessageRequest.md index 83d5faa..a888642 100644 --- a/docs/ActionRowComponentForMessageRequest.md +++ b/docs/ActionRowComponentForMessageRequest.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **r#type** | **i32** | | +**id** | Option<**i32**> | | [optional] **components** | [**Vec**](ActionRowComponentForMessageRequest_components_inner.md) | | [[Back to Model list]](../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 index 48e6c77..ff8f26a 100644 --- a/docs/ActionRowComponentForModalRequest.md +++ b/docs/ActionRowComponentForModalRequest.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **r#type** | **i32** | | +**id** | Option<**i32**> | | [optional] **components** | [**Vec**](TextInputComponentForModalRequest.md) | | [[Back to Model list]](../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 index 8de5ec0..5c2dfb6 100644 --- a/docs/ActionRowComponentResponse.md +++ b/docs/ActionRowComponentResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **r#type** | **i32** | | **id** | **i32** | | -**components** | Option<[**Vec**](ActionRowComponentResponse_components_inner.md)> | | [optional] +**components** | [**Vec**](ActionRowComponentResponse_components_inner.md) | | [[Back to Model list]](../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 index a6e1c02..ef6eab2 100644 --- a/docs/BaseCreateMessageCreateRequest.md +++ b/docs/BaseCreateMessageCreateRequest.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **flags** | Option<**i32**> | | [optional] **attachments** | Option<[**Vec**](MessageAttachmentRequest.md)> | | [optional] **poll** | Option<[**models::PollCreateRequest**](PollCreateRequest.md)> | | [optional] +**shared_client_theme** | Option<[**models::CustomClientThemeShareRequest**](CustomClientThemeShareRequest.md)> | | [optional] **confetti_potion** | Option<[**serde_json::Value**](.md)> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BasicGuildMemberResponse.md b/docs/BasicGuildMemberResponse.md new file mode 100644 index 0000000..936c656 --- /dev/null +++ b/docs/BasicGuildMemberResponse.md @@ -0,0 +1,21 @@ +# BasicGuildMemberResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**avatar** | Option<**String**> | | [optional] +**avatar_decoration_data** | Option<[**models::UserAvatarDecorationResponse**](UserAvatarDecorationResponse.md)> | | [optional] +**banner** | Option<**String**> | | [optional] +**communication_disabled_until** | Option<**String**> | | [optional] +**flags** | **i32** | | +**joined_at** | **String** | | +**nick** | Option<**String**> | | [optional] +**pending** | **bool** | | +**premium_since** | Option<**String**> | | [optional] +**roles** | **Vec** | | +**collectibles** | Option<[**models::UserCollectiblesResponse**](UserCollectiblesResponse.md)> | | [optional] + +[[Back to Model list]](../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 index c4a92a7..5593c56 100644 --- a/docs/BasicMessageResponse.md +++ b/docs/BasicMessageResponse.md @@ -14,7 +14,6 @@ Name | Type | Description | Notes **edited_timestamp** | Option<**String**> | | [optional] **flags** | **i32** | | **components** | [**Vec**](BasicMessageResponse_components_inner.md) | | -**resolved** | Option<[**models::ResolvedObjectsResponse**](ResolvedObjectsResponse.md)> | | [optional] **stickers** | Option<[**Vec**](get_sticker_200_response.md)> | | [optional] **sticker_items** | Option<[**Vec**](MessageStickerItemResponse.md)> | | [optional] **id** | **String** | | @@ -36,7 +35,9 @@ Name | Type | Description | Notes **role_subscription_data** | Option<[**models::MessageRoleSubscriptionDataResponse**](MessageRoleSubscriptionDataResponse.md)> | | [optional] **purchase_notification** | Option<[**models::PurchaseNotificationResponse**](PurchaseNotificationResponse.md)> | | [optional] **position** | Option<**i32**> | | [optional] +**resolved** | Option<[**models::ResolvedObjectsResponse**](ResolvedObjectsResponse.md)> | | [optional] **poll** | Option<[**models::PollResponse**](PollResponse.md)> | | [optional] +**shared_client_theme** | Option<[**models::CustomClientThemeResponse**](CustomClientThemeResponse.md)> | | [optional] **interaction_metadata** | Option<[**models::BasicMessageResponseInteractionMetadata**](BasicMessageResponse_interaction_metadata.md)> | | [optional] **message_snapshots** | Option<[**Vec**](MessageSnapshotResponse.md)> | | [optional] diff --git a/docs/AddGuildMemberRequest.md b/docs/BotAddGuildMemberRequest.md similarity index 95% rename from docs/AddGuildMemberRequest.md rename to docs/BotAddGuildMemberRequest.md index 78c412b..3fa0c84 100644 --- a/docs/AddGuildMemberRequest.md +++ b/docs/BotAddGuildMemberRequest.md @@ -1,4 +1,4 @@ -# AddGuildMemberRequest +# BotAddGuildMemberRequest ## Properties diff --git a/docs/BotPartnerSdkTokenRequest.md b/docs/BotPartnerSdkTokenRequest.md new file mode 100644 index 0000000..4e0785c --- /dev/null +++ b/docs/BotPartnerSdkTokenRequest.md @@ -0,0 +1,12 @@ +# BotPartnerSdkTokenRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**external_user_id** | **String** | | +**preferred_global_name** | Option<**String**> | | [optional] + +[[Back to Model list]](../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/BulkBanUsersRequest.md similarity index 92% rename from docs/BulkBanUsersFromGuildRequest.md rename to docs/BulkBanUsersRequest.md index d9d475c..7d8b3c1 100644 --- a/docs/BulkBanUsersFromGuildRequest.md +++ b/docs/BulkBanUsersRequest.md @@ -1,4 +1,4 @@ -# BulkBanUsersFromGuildRequest +# BulkBanUsersRequest ## Properties diff --git a/docs/ButtonComponentForMessageRequest.md b/docs/ButtonComponentForMessageRequest.md index 2626058..11143de 100644 --- a/docs/ButtonComponentForMessageRequest.md +++ b/docs/ButtonComponentForMessageRequest.md @@ -5,13 +5,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **r#type** | **i32** | | +**id** | Option<**i32**> | | [optional] **custom_id** | Option<**String**> | | [optional] **style** | Option<**i32**> | | **label** | Option<**String**> | | [optional] **disabled** | Option<**bool**> | | [optional] **url** | Option<**String**> | | [optional] **sku_id** | Option<**String**> | | [optional] -**emoji** | Option<[**models::ComponentEmojiForMessageRequest**](ComponentEmojiForMessageRequest.md)> | | [optional] +**emoji** | Option<[**models::ComponentEmojiForRequest**](ComponentEmojiForRequest.md)> | | [optional] [[Back to Model list]](../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 index fedb878..209b375 100644 --- a/docs/ChannelSelectComponentForMessageRequest.md +++ b/docs/ChannelSelectComponentForMessageRequest.md @@ -5,11 +5,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **r#type** | **i32** | | +**id** | Option<**i32**> | | [optional] **custom_id** | **String** | | **placeholder** | Option<**String**> | | [optional] **min_values** | Option<**i32**> | | [optional] **max_values** | Option<**i32**> | | [optional] **disabled** | Option<**bool**> | | [optional] +**required** | Option<**bool**> | | [optional] **default_values** | Option<[**Vec**](ChannelSelectDefaultValue.md)> | | [optional] **channel_types** | Option<**Vec**> | | [optional] diff --git a/docs/ChannelSelectComponentForModalRequest.md b/docs/ChannelSelectComponentForModalRequest.md new file mode 100644 index 0000000..92f4c07 --- /dev/null +++ b/docs/ChannelSelectComponentForModalRequest.md @@ -0,0 +1,20 @@ +# ChannelSelectComponentForModalRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**r#type** | **i32** | | +**id** | Option<**i32**> | | [optional] +**custom_id** | **String** | | +**placeholder** | Option<**String**> | | [optional] +**min_values** | Option<**i32**> | | [optional] +**max_values** | Option<**i32**> | | [optional] +**disabled** | Option<**bool**> | | [optional] +**required** | Option<**bool**> | | [optional] +**default_values** | Option<[**Vec**](ChannelSelectDefaultValue.md)> | | [optional] +**channel_types** | Option<**Vec**> | | [optional] + +[[Back to Model list]](../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/ComponentEmojiForRequest.md similarity index 91% rename from docs/ComponentEmojiForMessageRequest.md rename to docs/ComponentEmojiForRequest.md index e59b019..2403ea1 100644 --- a/docs/ComponentEmojiForMessageRequest.md +++ b/docs/ComponentEmojiForRequest.md @@ -1,4 +1,4 @@ -# ComponentEmojiForMessageRequest +# ComponentEmojiForRequest ## Properties diff --git a/docs/ContainerComponentForMessageRequest.md b/docs/ContainerComponentForMessageRequest.md index 7230c76..456271c 100644 --- a/docs/ContainerComponentForMessageRequest.md +++ b/docs/ContainerComponentForMessageRequest.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **r#type** | **i32** | | +**id** | Option<**i32**> | | [optional] **accent_color** | Option<**i32**> | | [optional] **components** | [**Vec**](ContainerComponentForMessageRequest_components_inner.md) | | **spoiler** | Option<**bool**> | | [optional] diff --git a/docs/CreateChannelInvite200Response.md b/docs/CreateChannelInvite200Response.md new file mode 100644 index 0000000..b0c17a6 --- /dev/null +++ b/docs/CreateChannelInvite200Response.md @@ -0,0 +1,13 @@ +# CreateChannelInvite200Response + +## Enum Variants + +| Name | Description | +|---- | -----| +| FriendInviteResponse | | +| GroupDmInviteResponse | | +| GuildInviteResponse | | + +[[Back to Model list]](../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 deleted file mode 100644 index 51b8788..0000000 --- a/docs/CreateGuildRequestChannelItem.md +++ /dev/null @@ -1,30 +0,0 @@ -# CreateGuildRequestChannelItem - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**r#type** | Option<**i32**> | | [optional] -**name** | **String** | | -**position** | Option<**i32**> | | [optional] -**topic** | Option<**String**> | | [optional] -**bitrate** | Option<**i32**> | | [optional] -**user_limit** | Option<**i32**> | | [optional] -**nsfw** | Option<**bool**> | | [optional] -**rate_limit_per_user** | Option<**i32**> | | [optional] -**parent_id** | Option<**String**> | | [optional] -**permission_overwrites** | Option<[**Vec**](ChannelPermissionOverwriteRequest.md)> | | [optional] -**rtc_region** | Option<**String**> | | [optional] -**video_quality_mode** | Option<**i32**> | | [optional] -**default_auto_archive_duration** | Option<**i32**> | | [optional] -**default_reaction_emoji** | Option<[**models::UpdateDefaultReactionEmojiRequest**](UpdateDefaultReactionEmojiRequest.md)> | | [optional] -**default_thread_rate_limit_per_user** | Option<**i32**> | | [optional] -**default_sort_order** | Option<**i32**> | | [optional] -**default_forum_layout** | Option<**i32**> | | [optional] -**default_tag_setting** | Option<**String**> | | [optional] -**id** | Option<**String**> | | [optional] -**available_tags** | Option<[**Vec**](CreateOrUpdateThreadTagRequest.md)> | | [optional] - -[[Back to Model list]](../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 index c7675f2..f39eda2 100644 --- a/docs/CreateLobbyRequest.md +++ b/docs/CreateLobbyRequest.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **idle_timeout_seconds** | Option<**i32**> | | [optional] **members** | Option<[**Vec**](LobbyMemberRequest.md)> | | [optional] **metadata** | Option<**std::collections::HashMap**> | | [optional] +**flags** | Option<**i32**> | | [optional] [[Back to Model list]](../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 index 6424fe9..8968fee 100644 --- a/docs/CreateOrJoinLobbyRequest.md +++ b/docs/CreateOrJoinLobbyRequest.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes **lobby_metadata** | Option<**std::collections::HashMap**> | | [optional] **member_metadata** | Option<**std::collections::HashMap**> | | [optional] **secret** | **String** | | +**flags** | Option<**i32**> | | [optional] [[Back to Model list]](../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/CreateRoleRequest.md similarity index 96% rename from docs/CreateGuildRoleRequest.md rename to docs/CreateRoleRequest.md index 44b11ea..e191682 100644 --- a/docs/CreateGuildRoleRequest.md +++ b/docs/CreateRoleRequest.md @@ -1,4 +1,4 @@ -# CreateGuildRoleRequest +# CreateRoleRequest ## Properties diff --git a/docs/CreatedThreadResponse.md b/docs/CreatedThreadResponse.md index 9502922..90ad86c 100644 --- a/docs/CreatedThreadResponse.md +++ b/docs/CreatedThreadResponse.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes **video_quality_mode** | Option<**i32**> | | [optional] **permissions** | Option<**String**> | | [optional] **owner_id** | **String** | | -**thread_metadata** | Option<[**models::ThreadMetadataResponse**](ThreadMetadataResponse.md)> | | [optional] +**thread_metadata** | [**models::ThreadMetadataResponse**](ThreadMetadataResponse.md) | | **message_count** | **i32** | | **member_count** | **i32** | | **total_message_sent** | **i32** | | diff --git a/docs/CustomClientThemeResponse.md b/docs/CustomClientThemeResponse.md new file mode 100644 index 0000000..ac7148c --- /dev/null +++ b/docs/CustomClientThemeResponse.md @@ -0,0 +1,14 @@ +# CustomClientThemeResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**colors** | **Vec** | | +**gradient_angle** | **i32** | | +**base_mix** | **i32** | | +**base_theme** | **i32** | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CustomClientThemeShareRequest.md b/docs/CustomClientThemeShareRequest.md new file mode 100644 index 0000000..a923d8a --- /dev/null +++ b/docs/CustomClientThemeShareRequest.md @@ -0,0 +1,14 @@ +# CustomClientThemeShareRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**colors** | **Vec** | | +**gradient_angle** | **i32** | | +**base_mix** | **i32** | | +**base_theme** | Option<**i32**> | | [optional] + +[[Back to Model list]](../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 index 1a17bcb..0ad52d8 100644 --- a/docs/DefaultApi.md +++ b/docs/DefaultApi.md @@ -12,6 +12,7 @@ Method | HTTP request | Description [**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} | +[**bot_partner_sdk_token**](DefaultApi.md#bot_partner_sdk_token) | **POST** /partner-sdk/token/bot | [**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 | @@ -26,17 +27,17 @@ Method | HTTP request | Description [**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_linked_lobby_guild_invite_for_self**](DefaultApi.md#create_linked_lobby_guild_invite_for_self) | **POST** /lobbies/{lobby_id}/members/@me/invites | +[**create_linked_lobby_guild_invite_for_user**](DefaultApi.md#create_linked_lobby_guild_invite_for_user) | **POST** /lobbies/{lobby_id}/members/{user_id}/invites | [**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 | @@ -261,7 +262,7 @@ Name | Type | Description | Required | Notes ## add_guild_member -> models::GuildMemberResponse add_guild_member(guild_id, user_id, add_guild_member_request) +> models::GuildMemberResponse add_guild_member(guild_id, user_id, bot_add_guild_member_request) ### Parameters @@ -271,7 +272,7 @@ Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **guild_id** | **String** | | [required] | **user_id** | **String** | | [required] | -**add_guild_member_request** | [**AddGuildMemberRequest**](AddGuildMemberRequest.md) | | [required] | +**bot_add_guild_member_request** | [**BotAddGuildMemberRequest**](BotAddGuildMemberRequest.md) | | [required] | ### Return type @@ -467,9 +468,37 @@ Name | Type | Description | Required | Notes [[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) +## bot_partner_sdk_token + +> models::ProvisionalTokenResponse bot_partner_sdk_token(bot_partner_sdk_token_request) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**bot_partner_sdk_token_request** | [**BotPartnerSdkTokenRequest**](BotPartnerSdkTokenRequest.md) | | [required] | + +### Return type + +[**models::ProvisionalTokenResponse**](ProvisionalTokenResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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 -> models::BulkBanUsersResponse bulk_ban_users_from_guild(guild_id, bulk_ban_users_from_guild_request) +> models::BulkBanUsersResponse bulk_ban_users_from_guild(guild_id, bulk_ban_users_request) ### Parameters @@ -478,7 +507,7 @@ Name | Type | Description | Required | Notes Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **guild_id** | **String** | | [required] | -**bulk_ban_users_from_guild_request** | [**BulkBanUsersFromGuildRequest**](BulkBanUsersFromGuildRequest.md) | | [required] | +**bulk_ban_users_request** | [**BulkBanUsersRequest**](BulkBanUsersRequest.md) | | [required] | ### Return type @@ -615,7 +644,7 @@ Name | Type | Description | Required | Notes ## bulk_update_guild_roles -> Vec bulk_update_guild_roles(guild_id, bulk_update_guild_roles_request_inner) +> Vec bulk_update_guild_roles(guild_id, update_role_positions_request) ### Parameters @@ -624,7 +653,7 @@ Name | Type | Description | Required | Notes Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **guild_id** | **String** | | [required] | -**bulk_update_guild_roles_request_inner** | [**Vec**](bulk_update_guild_roles_request_inner.md) | | [required] | +**update_role_positions_request** | [**Vec**](UpdateRolePositionsRequest.md) | | [required] | ### Return type @@ -789,7 +818,7 @@ Name | Type | Description | Required | Notes ## create_channel_invite -> models::ListChannelInvites200ResponseInner create_channel_invite(channel_id, create_channel_invite_request) +> models::CreateChannelInvite200Response create_channel_invite(channel_id, create_channel_invite_request) ### Parameters @@ -802,7 +831,7 @@ Name | Type | Description | Required | Notes ### Return type -[**models::ListChannelInvites200ResponseInner**](list_channel_invites_200_response_inner.md) +[**models::CreateChannelInvite200Response**](create_channel_invite_200_response.md) ### Authorization @@ -873,34 +902,6 @@ Name | Type | Description | Required | Notes [[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 - -> models::GuildResponse create_guild(guild_create_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**guild_create_request** | [**GuildCreateRequest**](GuildCreateRequest.md) | | [required] | - -### Return type - -[**models::GuildResponse**](GuildResponse.md) - -### Authorization - -[BotToken](../README.md#BotToken) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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 > models::ApplicationCommandResponse create_guild_application_command(application_id, guild_id, application_command_create_request) @@ -989,38 +990,9 @@ Name | Type | Description | Required | Notes [[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 - -> models::GuildResponse create_guild_from_template(code, create_guild_from_template_request) - - -### Parameters - - -Name | Type | Description | Required | Notes -------------- | ------------- | ------------- | ------------- | ------------- -**code** | **String** | | [required] | -**create_guild_from_template_request** | [**CreateGuildFromTemplateRequest**](CreateGuildFromTemplateRequest.md) | | [required] | - -### Return type - -[**models::GuildResponse**](GuildResponse.md) - -### Authorization - -[BotToken](../README.md#BotToken) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -[[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 -> models::GuildRoleResponse create_guild_role(guild_id, create_guild_role_request) +> models::GuildRoleResponse create_guild_role(guild_id, create_role_request) ### Parameters @@ -1029,7 +1001,7 @@ Name | Type | Description | Required | Notes Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **guild_id** | **String** | | [required] | -**create_guild_role_request** | [**CreateGuildRoleRequest**](CreateGuildRoleRequest.md) | | [required] | +**create_role_request** | [**CreateRoleRequest**](CreateRoleRequest.md) | | [required] | ### Return type @@ -1197,6 +1169,63 @@ Name | Type | Description | Required | Notes [[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_linked_lobby_guild_invite_for_self + +> models::LobbyGuildInviteResponse create_linked_lobby_guild_invite_for_self(lobby_id) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**lobby_id** | **String** | | [required] | + +### Return type + +[**models::LobbyGuildInviteResponse**](LobbyGuildInviteResponse.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 + +[[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_linked_lobby_guild_invite_for_user + +> models::LobbyGuildInviteResponse create_linked_lobby_guild_invite_for_user(lobby_id, user_id) + + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**lobby_id** | **String** | | [required] | +**user_id** | **String** | | [required] | + +### Return type + +[**models::LobbyGuildInviteResponse**](LobbyGuildInviteResponse.md) + +### Authorization + +[BotToken](../README.md#BotToken) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 > models::LobbyResponse create_lobby(create_lobby_request) @@ -3002,7 +3031,7 @@ Name | Type | Description | Required | Notes ## get_entitlements -> Vec get_entitlements(sku_ids, application_id, user_id, guild_id, before, after, limit, exclude_ended, exclude_deleted, only_active) +> Vec get_entitlements(application_id, user_id, sku_ids, guild_id, before, after, limit, exclude_ended, exclude_deleted, only_active) ### Parameters @@ -3010,9 +3039,9 @@ Name | Type | Description | Required | Notes Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**sku_ids** | **String** | | [required] | **application_id** | **String** | | [required] | **user_id** | Option<**String**> | | | +**sku_ids** | Option<**String**> | | | **guild_id** | Option<**String**> | | | **before** | Option<**String**> | | | **after** | Option<**String**> | | | @@ -4244,7 +4273,7 @@ Name | Type | Description | Required | Notes ## invite_resolve -> models::ListChannelInvites200ResponseInner invite_resolve(code, with_counts, guild_scheduled_event_id) +> models::CreateChannelInvite200Response invite_resolve(code, with_counts, guild_scheduled_event_id) ### Parameters @@ -4258,7 +4287,7 @@ Name | Type | Description | Required | Notes ### Return type -[**models::ListChannelInvites200ResponseInner**](list_channel_invites_200_response_inner.md) +[**models::CreateChannelInvite200Response**](create_channel_invite_200_response.md) ### Authorization @@ -4274,7 +4303,7 @@ Name | Type | Description | Required | Notes ## invite_revoke -> models::ListChannelInvites200ResponseInner invite_revoke(code) +> models::CreateChannelInvite200Response invite_revoke(code) ### Parameters @@ -4286,7 +4315,7 @@ Name | Type | Description | Required | Notes ### Return type -[**models::ListChannelInvites200ResponseInner**](list_channel_invites_200_response_inner.md) +[**models::CreateChannelInvite200Response**](create_channel_invite_200_response.md) ### Authorization @@ -5518,7 +5547,7 @@ Name | Type | Description | Required | Notes ## search_guild_members -> Vec search_guild_members(limit, query, guild_id) +> Vec search_guild_members(query, guild_id, limit) ### Parameters @@ -5526,9 +5555,9 @@ Name | Type | Description | Required | Notes Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**limit** | **i32** | | [required] | **query** | **String** | | [required] | **guild_id** | **String** | | [required] | +**limit** | Option<**i32**> | | | ### Return type @@ -5638,7 +5667,7 @@ Name | Type | Description | Required | Notes ## set_guild_mfa_level -> models::GuildMfaLevelResponse set_guild_mfa_level(guild_id, set_guild_mfa_level_request) +> models::GuildMfaLevelResponse set_guild_mfa_level(guild_id, guild_mfa_request) ### Parameters @@ -5647,7 +5676,7 @@ Name | Type | Description | Required | Notes Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **guild_id** | **String** | | [required] | -**set_guild_mfa_level_request** | [**SetGuildMfaLevelRequest**](SetGuildMfaLevelRequest.md) | | [required] | +**guild_mfa_request** | [**GuildMfaRequest**](GuildMfaRequest.md) | | [required] | ### Return type @@ -5763,7 +5792,7 @@ Name | Type | Description | Required | Notes ## unban_user_from_guild -> unban_user_from_guild(guild_id, user_id) +> unban_user_from_guild(guild_id, user_id, body) ### Parameters @@ -5773,6 +5802,7 @@ Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **guild_id** | **String** | | [required] | **user_id** | **String** | | [required] | +**body** | **serde_json::Value** | | [required] | ### Return type @@ -5784,7 +5814,7 @@ Name | Type | Description | Required | Notes ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/json [[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) @@ -6118,7 +6148,7 @@ Name | Type | Description | Required | Notes ## update_guild_role -> models::GuildRoleResponse update_guild_role(guild_id, role_id, create_guild_role_request) +> models::GuildRoleResponse update_guild_role(guild_id, role_id, update_role_request_partial) ### Parameters @@ -6128,7 +6158,7 @@ Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **guild_id** | **String** | | [required] | **role_id** | **String** | | [required] | -**create_guild_role_request** | [**CreateGuildRoleRequest**](CreateGuildRoleRequest.md) | | [required] | +**update_role_request_partial** | [**UpdateRoleRequestPartial**](UpdateRoleRequestPartial.md) | | [required] | ### Return type @@ -6473,7 +6503,7 @@ Name | Type | Description | Required | Notes ## update_self_voice_state -> update_self_voice_state(guild_id, update_self_voice_state_request) +> update_self_voice_state(guild_id, update_self_voice_state_request_partial) ### Parameters @@ -6482,7 +6512,7 @@ Name | Type | Description | Required | Notes Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **guild_id** | **String** | | [required] | -**update_self_voice_state_request** | [**UpdateSelfVoiceStateRequest**](UpdateSelfVoiceStateRequest.md) | | [required] | +**update_self_voice_state_request_partial** | [**UpdateSelfVoiceStateRequestPartial**](UpdateSelfVoiceStateRequestPartial.md) | | [required] | ### Return type @@ -6531,7 +6561,7 @@ Name | Type | Description | Required | Notes ## update_voice_state -> update_voice_state(guild_id, user_id, update_voice_state_request) +> update_voice_state(guild_id, user_id, update_voice_state_request_partial) ### Parameters @@ -6541,7 +6571,7 @@ Name | Type | Description | Required | Notes ------------- | ------------- | ------------- | ------------- | ------------- **guild_id** | **String** | | [required] | **user_id** | **String** | | [required] | -**update_voice_state_request** | [**UpdateVoiceStateRequest**](UpdateVoiceStateRequest.md) | | [required] | +**update_voice_state_request_partial** | [**UpdateVoiceStateRequestPartial**](UpdateVoiceStateRequestPartial.md) | | [required] | ### Return type diff --git a/docs/DefaultKeywordRuleResponse.md b/docs/DefaultKeywordRuleResponse.md index ed9fc18..f2c565c 100644 --- a/docs/DefaultKeywordRuleResponse.md +++ b/docs/DefaultKeywordRuleResponse.md @@ -11,9 +11,9 @@ Name | Type | Description | Notes **event_type** | **i32** | | **actions** | [**Vec**](DefaultKeywordRuleResponse_actions_inner.md) | | **trigger_type** | **i32** | | -**enabled** | Option<**bool**> | | [optional] -**exempt_roles** | Option<**Vec**> | | [optional] -**exempt_channels** | Option<**Vec**> | | [optional] +**enabled** | **bool** | | +**exempt_roles** | **Vec** | | +**exempt_channels** | **Vec** | | **trigger_metadata** | [**models::DefaultKeywordListTriggerMetadataResponse**](DefaultKeywordListTriggerMetadataResponse.md) | | [[Back to Model list]](../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 index 9af52a6..d5ba0f9 100644 --- a/docs/DiscordIntegrationResponse.md +++ b/docs/DiscordIntegrationResponse.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **r#type** | Option<**String**> | | **name** | Option<**String**> | | [optional] -**account** | Option<[**models::AccountResponse**](AccountResponse.md)> | | [optional] -**enabled** | Option<**bool**> | | [optional] +**account** | [**models::AccountResponse**](AccountResponse.md) | | +**enabled** | **bool** | | **id** | **String** | | **application** | [**models::IntegrationApplicationResponse**](IntegrationApplicationResponse.md) | | **scopes** | **Vec** | | diff --git a/docs/EmbeddedActivityInstance.md b/docs/EmbeddedActivityInstance.md index d19de27..cb224a2 100644 --- a/docs/EmbeddedActivityInstance.md +++ b/docs/EmbeddedActivityInstance.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **application_id** | **String** | | **instance_id** | **String** | | **launch_id** | **String** | | -**location** | Option<[**models::EmbeddedActivityInstanceLocation**](EmbeddedActivityInstance_location.md)> | | [optional] +**location** | [**models::EmbeddedActivityInstanceLocation**](EmbeddedActivityInstance_location.md) | | **users** | **Vec** | | [[Back to Model list]](../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 index f4eb245..1199721 100644 --- a/docs/ExternalConnectionIntegrationResponse.md +++ b/docs/ExternalConnectionIntegrationResponse.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **r#type** | Option<**String**> | | **name** | Option<**String**> | | [optional] -**account** | Option<[**models::AccountResponse**](AccountResponse.md)> | | [optional] -**enabled** | Option<**bool**> | | [optional] +**account** | [**models::AccountResponse**](AccountResponse.md) | | +**enabled** | **bool** | | **id** | **String** | | **user** | [**models::UserResponse**](UserResponse.md) | | **revoked** | Option<**bool**> | | [optional] diff --git a/docs/FileComponentForMessageRequest.md b/docs/FileComponentForMessageRequest.md index 36f789c..5fb2355 100644 --- a/docs/FileComponentForMessageRequest.md +++ b/docs/FileComponentForMessageRequest.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **r#type** | **i32** | | +**id** | Option<**i32**> | | [optional] **spoiler** | Option<**bool**> | | [optional] **file** | [**models::UnfurledMediaRequestWithAttachmentReferenceRequired**](UnfurledMediaRequestWithAttachmentReferenceRequired.md) | | diff --git a/docs/FriendInviteResponse.md b/docs/FriendInviteResponse.md index d1f2568..fbde292 100644 --- a/docs/FriendInviteResponse.md +++ b/docs/FriendInviteResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**r#type** | Option<**i32**> | | [optional] +**r#type** | Option<**i32**> | | **code** | **String** | | **inviter** | Option<[**models::UserResponse**](UserResponse.md)> | | [optional] **max_age** | Option<**i32**> | | [optional] diff --git a/docs/GroupDmInviteResponse.md b/docs/GroupDmInviteResponse.md index 1bb02f9..30880a2 100644 --- a/docs/GroupDmInviteResponse.md +++ b/docs/GroupDmInviteResponse.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**r#type** | Option<**i32**> | | [optional] +**r#type** | Option<**i32**> | | **code** | **String** | | **inviter** | Option<[**models::UserResponse**](UserResponse.md)> | | [optional] **max_age** | Option<**i32**> | | [optional] **created_at** | Option<**String**> | | [optional] **expires_at** | Option<**String**> | | [optional] -**channel** | Option<[**models::InviteChannelResponse**](InviteChannelResponse.md)> | | [optional] +**channel** | [**models::InviteChannelResponse**](InviteChannelResponse.md) | | **approximate_member_count** | Option<**i32**> | | [optional] [[Back to Model list]](../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 deleted file mode 100644 index bcda39d..0000000 --- a/docs/GuildCreateRequest.md +++ /dev/null @@ -1,24 +0,0 @@ -# GuildCreateRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | Option<**String**> | | [optional] -**name** | **String** | | -**region** | Option<**String**> | | [optional] -**icon** | Option<**String**> | | [optional] -**verification_level** | Option<**i32**> | | [optional] -**default_message_notifications** | Option<**i32**> | | [optional] -**explicit_content_filter** | Option<**i32**> | | [optional] -**preferred_locale** | Option<**String**> | | [optional] -**afk_timeout** | Option<**i32**> | | [optional] -**roles** | Option<[**Vec**](CreateGuildRequestRoleItem.md)> | | [optional] -**channels** | Option<[**Vec**](CreateGuildRequestChannelItem.md)> | | [optional] -**afk_channel_id** | Option<**String**> | | [optional] -**system_channel_id** | Option<**String**> | | [optional] -**system_channel_flags** | Option<**i32**> | | [optional] - -[[Back to Model list]](../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 index d7bbc8b..2fa45fc 100644 --- a/docs/GuildHomeSettingsResponse.md +++ b/docs/GuildHomeSettingsResponse.md @@ -7,8 +7,8 @@ Name | Type | Description | Notes **guild_id** | **String** | | **enabled** | **bool** | | **welcome_message** | Option<[**models::WelcomeMessageResponse**](WelcomeMessageResponse.md)> | | [optional] -**new_member_actions** | Option<[**Vec**](NewMemberActionResponse.md)> | | [optional] -**resource_channels** | Option<[**Vec**](ResourceChannelResponse.md)> | | [optional] +**new_member_actions** | [**Vec**](NewMemberActionResponse.md) | | +**resource_channels** | [**Vec**](ResourceChannelResponse.md) | | [[Back to Model list]](../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 index 5678b00..86bb7fb 100644 --- a/docs/GuildInviteResponse.md +++ b/docs/GuildInviteResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**r#type** | Option<**i32**> | | [optional] +**r#type** | Option<**i32**> | | **code** | **String** | | **inviter** | Option<[**models::UserResponse**](UserResponse.md)> | | [optional] **max_age** | Option<**i32**> | | [optional] @@ -12,9 +12,9 @@ Name | Type | Description | Notes **expires_at** | Option<**String**> | | [optional] **is_contact** | Option<**bool**> | | [optional] **flags** | Option<**i32**> | | [optional] -**guild** | Option<[**models::InviteGuildResponse**](InviteGuildResponse.md)> | | [optional] -**guild_id** | Option<**String**> | | [optional] -**channel** | Option<[**models::InviteChannelResponse**](InviteChannelResponse.md)> | | [optional] +**guild** | [**models::InviteGuildResponse**](InviteGuildResponse.md) | | +**guild_id** | **String** | | +**channel** | [**models::InviteChannelResponse**](InviteChannelResponse.md) | | **target_type** | Option<**i32**> | | [optional] **target_user** | Option<[**models::UserResponse**](UserResponse.md)> | | [optional] **target_application** | Option<[**models::InviteApplicationResponse**](InviteApplicationResponse.md)> | | [optional] diff --git a/docs/GuildMemberResponse.md b/docs/GuildMemberResponse.md index 3be439a..e2b0535 100644 --- a/docs/GuildMemberResponse.md +++ b/docs/GuildMemberResponse.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **pending** | **bool** | | **premium_since** | Option<**String**> | | [optional] **roles** | **Vec** | | +**collectibles** | Option<[**models::UserCollectiblesResponse**](UserCollectiblesResponse.md)> | | [optional] **user** | [**models::UserResponse**](UserResponse.md) | | **mute** | **bool** | | **deaf** | **bool** | | diff --git a/docs/SetGuildMfaLevelRequest.md b/docs/GuildMfaRequest.md similarity index 92% rename from docs/SetGuildMfaLevelRequest.md rename to docs/GuildMfaRequest.md index db7ccc4..9ab83ce 100644 --- a/docs/SetGuildMfaLevelRequest.md +++ b/docs/GuildMfaRequest.md @@ -1,4 +1,4 @@ -# SetGuildMfaLevelRequest +# GuildMfaRequest ## Properties diff --git a/docs/GuildResponse.md b/docs/GuildResponse.md index 89be48d..03ac86d 100644 --- a/docs/GuildResponse.md +++ b/docs/GuildResponse.md @@ -28,9 +28,9 @@ Name | Type | Description | Notes **mfa_level** | **i32** | | **explicit_content_filter** | **i32** | | **max_presences** | Option<**i32**> | | [optional] -**max_members** | Option<**i32**> | | [optional] -**max_stage_video_channel_users** | Option<**i32**> | | [optional] -**max_video_channel_users** | Option<**i32**> | | [optional] +**max_members** | **i32** | | +**max_stage_video_channel_users** | **i32** | | +**max_video_channel_users** | **i32** | | **vanity_url_code** | Option<**String**> | | [optional] **premium_tier** | **i32** | | **premium_subscription_count** | **i32** | | diff --git a/docs/GuildRoleColorsResponse.md b/docs/GuildRoleColorsResponse.md index 58c0565..a401aec 100644 --- a/docs/GuildRoleColorsResponse.md +++ b/docs/GuildRoleColorsResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**primary_color** | Option<**i32**> | | [optional] +**primary_color** | **i32** | | **secondary_color** | Option<**i32**> | | [optional] **tertiary_color** | Option<**i32**> | | [optional] diff --git a/docs/GuildRoleResponse.md b/docs/GuildRoleResponse.md index 5dc6cf4..de82f6d 100644 --- a/docs/GuildRoleResponse.md +++ b/docs/GuildRoleResponse.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **permissions** | **String** | | **position** | **i32** | | **color** | **i32** | | -**colors** | Option<[**models::GuildRoleColorsResponse**](GuildRoleColorsResponse.md)> | | [optional] +**colors** | [**models::GuildRoleColorsResponse**](GuildRoleColorsResponse.md) | | **hoist** | **bool** | | **managed** | **bool** | | **mentionable** | **bool** | | diff --git a/docs/GuildSubscriptionIntegrationResponse.md b/docs/GuildSubscriptionIntegrationResponse.md index 09f9f05..d35d89b 100644 --- a/docs/GuildSubscriptionIntegrationResponse.md +++ b/docs/GuildSubscriptionIntegrationResponse.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **r#type** | Option<**String**> | | **name** | Option<**String**> | | [optional] -**account** | Option<[**models::AccountResponse**](AccountResponse.md)> | | [optional] -**enabled** | Option<**bool**> | | [optional] +**account** | [**models::AccountResponse**](AccountResponse.md) | | +**enabled** | **bool** | | **id** | **String** | | [[Back to Model list]](../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 index 42a6a1d..7b47e47 100644 --- a/docs/GuildTemplateChannelTags.md +++ b/docs/GuildTemplateChannelTags.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**id** | Option<**i32**> | | [optional] **name** | **String** | | **emoji_id** | Option<**String**> | | [optional] **emoji_name** | Option<**String**> | | [optional] diff --git a/docs/GuildWithCountsResponse.md b/docs/GuildWithCountsResponse.md index 11f7bd1..b15e4e1 100644 --- a/docs/GuildWithCountsResponse.md +++ b/docs/GuildWithCountsResponse.md @@ -28,9 +28,9 @@ Name | Type | Description | Notes **mfa_level** | **i32** | | **explicit_content_filter** | **i32** | | **max_presences** | Option<**i32**> | | [optional] -**max_members** | Option<**i32**> | | [optional] -**max_stage_video_channel_users** | Option<**i32**> | | [optional] -**max_video_channel_users** | Option<**i32**> | | [optional] +**max_members** | **i32** | | +**max_stage_video_channel_users** | **i32** | | +**max_video_channel_users** | **i32** | | **vanity_url_code** | Option<**String**> | | [optional] **premium_tier** | **i32** | | **premium_subscription_count** | **i32** | | diff --git a/docs/InviteGuildResponse.md b/docs/InviteGuildResponse.md index 9026cb3..aeeadf0 100644 --- a/docs/InviteGuildResponse.md +++ b/docs/InviteGuildResponse.md @@ -15,7 +15,7 @@ Name | Type | Description | Notes **vanity_url_code** | Option<**String**> | | [optional] **nsfw_level** | Option<**i32**> | | [optional] **nsfw** | Option<**bool**> | | [optional] -**premium_subscription_count** | Option<**i32**> | | [optional] +**premium_subscription_count** | **i32** | | [[Back to Model list]](../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 index 0c0386f..c2d698e 100644 --- a/docs/KeywordRuleResponse.md +++ b/docs/KeywordRuleResponse.md @@ -11,9 +11,9 @@ Name | Type | Description | Notes **event_type** | **i32** | | **actions** | [**Vec**](DefaultKeywordRuleResponse_actions_inner.md) | | **trigger_type** | **i32** | | -**enabled** | Option<**bool**> | | [optional] -**exempt_roles** | Option<**Vec**> | | [optional] -**exempt_channels** | Option<**Vec**> | | [optional] +**enabled** | **bool** | | +**exempt_roles** | **Vec** | | +**exempt_channels** | **Vec** | | **trigger_metadata** | [**models::KeywordTriggerMetadataResponse**](KeywordTriggerMetadataResponse.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/LabelComponentForModalRequest.md b/docs/LabelComponentForModalRequest.md new file mode 100644 index 0000000..71d89e3 --- /dev/null +++ b/docs/LabelComponentForModalRequest.md @@ -0,0 +1,15 @@ +# LabelComponentForModalRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**r#type** | **i32** | | +**id** | Option<**i32**> | | [optional] +**label** | **String** | | +**description** | Option<**String**> | | [optional] +**component** | [**models::LabelComponentForModalRequestComponent**](LabelComponentForModalRequest_component.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/LabelComponentForModalRequestComponent.md b/docs/LabelComponentForModalRequestComponent.md new file mode 100644 index 0000000..fa73741 --- /dev/null +++ b/docs/LabelComponentForModalRequestComponent.md @@ -0,0 +1,16 @@ +# LabelComponentForModalRequestComponent + +## Enum Variants + +| Name | Description | +|---- | -----| +| ChannelSelectComponentForModalRequest | | +| MentionableSelectComponentForModalRequest | | +| RoleSelectComponentForModalRequest | | +| StringSelectComponentForModalRequest | | +| TextInputComponentForModalRequest | | +| UserSelectComponentForModalRequest | | + +[[Back to Model list]](../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 index faa42d0..f259bf2 100644 --- a/docs/ListChannelInvites200ResponseInner.md +++ b/docs/ListChannelInvites200ResponseInner.md @@ -1,31 +1,12 @@ # ListChannelInvites200ResponseInner -## Properties +## Enum Variants -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**r#type** | Option<**i32**> | | [optional] -**code** | **String** | | -**inviter** | Option<[**models::UserResponse**](UserResponse.md)> | | [optional] -**max_age** | Option<**i32**> | | [optional] -**created_at** | Option<**String**> | | [optional] -**expires_at** | Option<**String**> | | [optional] -**friends_count** | Option<**i32**> | | [optional] -**channel** | Option<[**models::InviteChannelResponse**](InviteChannelResponse.md)> | | [optional] -**is_contact** | Option<**bool**> | | [optional] -**uses** | Option<**i32**> | | [optional] -**max_uses** | Option<**i32**> | | [optional] -**flags** | Option<**i32**> | | [optional] -**approximate_member_count** | Option<**i32**> | | [optional] -**guild** | Option<[**models::InviteGuildResponse**](InviteGuildResponse.md)> | | [optional] -**guild_id** | Option<**String**> | | [optional] -**target_type** | Option<**i32**> | | [optional] -**target_user** | Option<[**models::UserResponse**](UserResponse.md)> | | [optional] -**target_application** | Option<[**models::InviteApplicationResponse**](InviteApplicationResponse.md)> | | [optional] -**guild_scheduled_event** | Option<[**models::ScheduledEventResponse**](ScheduledEventResponse.md)> | | [optional] -**temporary** | Option<**bool**> | | [optional] -**approximate_presence_count** | Option<**i32**> | | [optional] -**is_nickname_changeable** | Option<**bool**> | | [optional] +| Name | Description | +|---- | -----| +| FriendInviteResponse | | +| GroupDmInviteResponse | | +| GuildInviteResponse | | [[Back to Model list]](../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/LobbyGuildInviteResponse.md similarity index 72% rename from docs/CreateGuildFromTemplateRequest.md rename to docs/LobbyGuildInviteResponse.md index 3b98812..d6be382 100644 --- a/docs/CreateGuildFromTemplateRequest.md +++ b/docs/LobbyGuildInviteResponse.md @@ -1,11 +1,10 @@ -# CreateGuildFromTemplateRequest +# LobbyGuildInviteResponse ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **String** | | -**icon** | Option<**String**> | | [optional] +**code** | **String** | | [[Back to Model list]](../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 index 286267c..e30dc7d 100644 --- a/docs/LobbyResponse.md +++ b/docs/LobbyResponse.md @@ -7,8 +7,9 @@ Name | Type | Description | Notes **id** | **String** | | **application_id** | **String** | | **metadata** | Option<**std::collections::HashMap**> | | [optional] -**members** | Option<[**Vec**](LobbyMemberResponse.md)> | | [optional] +**members** | [**Vec**](LobbyMemberResponse.md) | | **linked_channel** | Option<[**models::GuildChannelResponse**](GuildChannelResponse.md)> | | [optional] +**flags** | **i64** | | [[Back to Model list]](../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 index a698dbf..13f7f10 100644 --- a/docs/MediaGalleryComponentForMessageRequest.md +++ b/docs/MediaGalleryComponentForMessageRequest.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **r#type** | **i32** | | +**id** | Option<**i32**> | | [optional] **items** | [**Vec**](MediaGalleryItemRequest.md) | | [[Back to Model list]](../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 index daeacd0..02a4570 100644 --- a/docs/MentionSpamRuleResponse.md +++ b/docs/MentionSpamRuleResponse.md @@ -11,9 +11,9 @@ Name | Type | Description | Notes **event_type** | **i32** | | **actions** | [**Vec**](DefaultKeywordRuleResponse_actions_inner.md) | | **trigger_type** | **i32** | | -**enabled** | Option<**bool**> | | [optional] -**exempt_roles** | Option<**Vec**> | | [optional] -**exempt_channels** | Option<**Vec**> | | [optional] +**enabled** | **bool** | | +**exempt_roles** | **Vec** | | +**exempt_channels** | **Vec** | | **trigger_metadata** | [**models::MentionSpamTriggerMetadataResponse**](MentionSpamTriggerMetadataResponse.md) | | [[Back to Model list]](../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 index cc086af..ea1bbea 100644 --- a/docs/MentionSpamTriggerMetadata.md +++ b/docs/MentionSpamTriggerMetadata.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**mention_total_limit** | **i32** | | +**mention_total_limit** | Option<**i32**> | | [optional] **mention_raid_protection_enabled** | Option<**bool**> | | [optional] [[Back to Model list]](../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 index f9bca51..6d7df90 100644 --- a/docs/MentionSpamTriggerMetadataResponse.md +++ b/docs/MentionSpamTriggerMetadataResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **mention_total_limit** | **i32** | | -**mention_raid_protection_enabled** | Option<**bool**> | | [optional] +**mention_raid_protection_enabled** | **bool** | | [[Back to Model list]](../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 index dd25dfb..3fdb02c 100644 --- a/docs/MentionableSelectComponentForMessageRequest.md +++ b/docs/MentionableSelectComponentForMessageRequest.md @@ -5,11 +5,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **r#type** | **i32** | | +**id** | Option<**i32**> | | [optional] **custom_id** | **String** | | **placeholder** | Option<**String**> | | [optional] **min_values** | Option<**i32**> | | [optional] **max_values** | Option<**i32**> | | [optional] **disabled** | Option<**bool**> | | [optional] +**required** | Option<**bool**> | | [optional] **default_values** | Option<[**Vec**](MentionableSelectComponentForMessageRequest_default_values_inner.md)> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/MentionableSelectComponentForModalRequest.md b/docs/MentionableSelectComponentForModalRequest.md new file mode 100644 index 0000000..39bb05a --- /dev/null +++ b/docs/MentionableSelectComponentForModalRequest.md @@ -0,0 +1,19 @@ +# MentionableSelectComponentForModalRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**r#type** | **i32** | | +**id** | Option<**i32**> | | [optional] +**custom_id** | **String** | | +**placeholder** | Option<**String**> | | [optional] +**min_values** | Option<**i32**> | | [optional] +**max_values** | Option<**i32**> | | [optional] +**disabled** | Option<**bool**> | | [optional] +**required** | Option<**bool**> | | [optional] +**default_values** | Option<[**Vec**](MentionableSelectComponentForMessageRequest_default_values_inner.md)> | | [optional] + +[[Back to Model list]](../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 index f109e0f..632efe3 100644 --- a/docs/MessageCreateRequest.md +++ b/docs/MessageCreateRequest.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **flags** | Option<**i32**> | | [optional] **attachments** | Option<[**Vec**](MessageAttachmentRequest.md)> | | [optional] **poll** | Option<[**models::PollCreateRequest**](PollCreateRequest.md)> | | [optional] +**shared_client_theme** | Option<[**models::CustomClientThemeShareRequest**](CustomClientThemeShareRequest.md)> | | [optional] **confetti_potion** | Option<[**serde_json::Value**](.md)> | | [optional] **message_reference** | Option<[**models::MessageReferenceRequest**](MessageReferenceRequest.md)> | | [optional] **nonce** | Option<[**models::BasicMessageResponseNonce**](BasicMessageResponse_nonce.md)> | | [optional] diff --git a/docs/MessageReferenceResponse.md b/docs/MessageReferenceResponse.md index c7e96e3..7b443d2 100644 --- a/docs/MessageReferenceResponse.md +++ b/docs/MessageReferenceResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**r#type** | Option<[**serde_json::Value**](.md)> | | [optional] +**r#type** | Option<[**serde_json::Value**](.md)> | | **channel_id** | **String** | | **message_id** | Option<**String**> | | [optional] **guild_id** | Option<**String**> | | [optional] diff --git a/docs/MessageResponse.md b/docs/MessageResponse.md index c877c72..ad3f324 100644 --- a/docs/MessageResponse.md +++ b/docs/MessageResponse.md @@ -14,7 +14,6 @@ Name | Type | Description | Notes **edited_timestamp** | Option<**String**> | | [optional] **flags** | **i32** | | **components** | [**Vec**](BasicMessageResponse_components_inner.md) | | -**resolved** | Option<[**models::ResolvedObjectsResponse**](ResolvedObjectsResponse.md)> | | [optional] **stickers** | Option<[**Vec**](get_sticker_200_response.md)> | | [optional] **sticker_items** | Option<[**Vec**](MessageStickerItemResponse.md)> | | [optional] **id** | **String** | | @@ -36,7 +35,9 @@ Name | Type | Description | Notes **role_subscription_data** | Option<[**models::MessageRoleSubscriptionDataResponse**](MessageRoleSubscriptionDataResponse.md)> | | [optional] **purchase_notification** | Option<[**models::PurchaseNotificationResponse**](PurchaseNotificationResponse.md)> | | [optional] **position** | Option<**i32**> | | [optional] +**resolved** | Option<[**models::ResolvedObjectsResponse**](ResolvedObjectsResponse.md)> | | [optional] **poll** | Option<[**models::PollResponse**](PollResponse.md)> | | [optional] +**shared_client_theme** | Option<[**models::CustomClientThemeResponse**](CustomClientThemeResponse.md)> | | [optional] **interaction_metadata** | Option<[**models::BasicMessageResponseInteractionMetadata**](BasicMessageResponse_interaction_metadata.md)> | | [optional] **message_snapshots** | Option<[**Vec**](MessageSnapshotResponse.md)> | | [optional] **reactions** | Option<[**Vec**](MessageReactionResponse.md)> | | [optional] diff --git a/docs/MessageSnapshotResponse.md b/docs/MessageSnapshotResponse.md index 424550e..9ce6081 100644 --- a/docs/MessageSnapshotResponse.md +++ b/docs/MessageSnapshotResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**message** | Option<[**models::MinimalContentMessageResponse**](MinimalContentMessageResponse.md)> | | [optional] +**message** | [**models::MinimalContentMessageResponse**](MinimalContentMessageResponse.md) | | [[Back to Model list]](../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 index 0f1655b..2857d06 100644 --- a/docs/MinimalContentMessageResponse.md +++ b/docs/MinimalContentMessageResponse.md @@ -14,7 +14,6 @@ Name | Type | Description | Notes **edited_timestamp** | Option<**String**> | | [optional] **flags** | **i32** | | **components** | [**Vec**](BasicMessageResponse_components_inner.md) | | -**resolved** | Option<[**models::ResolvedObjectsResponse**](ResolvedObjectsResponse.md)> | | [optional] **stickers** | Option<[**Vec**](get_sticker_200_response.md)> | | [optional] **sticker_items** | Option<[**Vec**](MessageStickerItemResponse.md)> | | [optional] diff --git a/docs/MlSpamRuleResponse.md b/docs/MlSpamRuleResponse.md index b8543d5..863f5df 100644 --- a/docs/MlSpamRuleResponse.md +++ b/docs/MlSpamRuleResponse.md @@ -11,9 +11,9 @@ Name | Type | Description | Notes **event_type** | **i32** | | **actions** | [**Vec**](DefaultKeywordRuleResponse_actions_inner.md) | | **trigger_type** | **i32** | | -**enabled** | Option<**bool**> | | [optional] -**exempt_roles** | Option<**Vec**> | | [optional] -**exempt_channels** | Option<**Vec**> | | [optional] +**enabled** | **bool** | | +**exempt_roles** | **Vec** | | +**exempt_channels** | **Vec** | | **trigger_metadata** | [**serde_json::Value**](.md) | | [[Back to Model list]](../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 index 71a67ab..0b163b0 100644 --- a/docs/ModalInteractionCallbackRequestData.md +++ b/docs/ModalInteractionCallbackRequestData.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **custom_id** | **String** | | **title** | **String** | | -**components** | [**Vec**](ActionRowComponentForModalRequest.md) | | +**components** | [**Vec**](ModalInteractionCallbackRequestData_components_inner.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/ModalInteractionCallbackRequestDataComponentsInner.md b/docs/ModalInteractionCallbackRequestDataComponentsInner.md new file mode 100644 index 0000000..bceca36 --- /dev/null +++ b/docs/ModalInteractionCallbackRequestDataComponentsInner.md @@ -0,0 +1,13 @@ +# ModalInteractionCallbackRequestDataComponentsInner + +## Enum Variants + +| Name | Description | +|---- | -----| +| ActionRowComponentForModalRequest | | +| LabelComponentForModalRequest | | +| TextDisplayComponentForModalRequest | | + +[[Back to Model list]](../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 index 0fc755b..1c0252d 100644 --- a/docs/PartialDiscordIntegrationResponse.md +++ b/docs/PartialDiscordIntegrationResponse.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **id** | **String** | | **r#type** | Option<**String**> | | **name** | Option<**String**> | | [optional] -**account** | Option<[**models::AccountResponse**](AccountResponse.md)> | | [optional] +**account** | [**models::AccountResponse**](AccountResponse.md) | | **application_id** | **String** | | [[Back to Model list]](../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 index 138f144..d03f5f9 100644 --- a/docs/PartialExternalConnectionIntegrationResponse.md +++ b/docs/PartialExternalConnectionIntegrationResponse.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **id** | **String** | | **r#type** | Option<**String**> | | **name** | Option<**String**> | | [optional] -**account** | Option<[**models::AccountResponse**](AccountResponse.md)> | | [optional] +**account** | [**models::AccountResponse**](AccountResponse.md) | | [[Back to Model list]](../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 index 0a02722..d893bda 100644 --- a/docs/PartialGuildSubscriptionIntegrationResponse.md +++ b/docs/PartialGuildSubscriptionIntegrationResponse.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes **id** | **String** | | **r#type** | Option<**String**> | | **name** | Option<**String**> | | [optional] -**account** | Option<[**models::AccountResponse**](AccountResponse.md)> | | [optional] +**account** | [**models::AccountResponse**](AccountResponse.md) | | [[Back to Model list]](../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 index 6a755da..bb2f8d1 100644 --- a/docs/PinnedMessagesResponse.md +++ b/docs/PinnedMessagesResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**items** | Option<[**Vec**](PinnedMessageResponse.md)> | | [optional] +**items** | [**Vec**](PinnedMessageResponse.md) | | **has_more** | **bool** | | [[Back to Model list]](../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 index 3f6e2a9..d70b5be 100644 --- a/docs/PollAnswerDetailsResponse.md +++ b/docs/PollAnswerDetailsResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**users** | Option<[**Vec**](UserResponse.md)> | | [optional] +**users** | [**Vec**](UserResponse.md) | | [[Back to Model list]](../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 index 299cc12..f43a322 100644 --- a/docs/PollResultsEntryResponse.md +++ b/docs/PollResultsEntryResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **i32** | | **count** | **i32** | | -**me_voted** | Option<**bool**> | | [optional] +**me_voted** | **bool** | | [[Back to Model list]](../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 index edf187a..aaebacb 100644 --- a/docs/PollResultsResponse.md +++ b/docs/PollResultsResponse.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**answer_counts** | Option<[**Vec**](PollResultsEntryResponse.md)> | | [optional] +**answer_counts** | [**Vec**](PollResultsEntryResponse.md) | | **is_finalized** | **bool** | | [[Back to Model list]](../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 index cb133fb..f86923e 100644 --- a/docs/PrivateGroupChannelResponse.md +++ b/docs/PrivateGroupChannelResponse.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **recipients** | [**Vec**](UserResponse.md) | | **name** | Option<**String**> | | [optional] **icon** | Option<**String**> | | [optional] -**owner_id** | Option<**String**> | | [optional] +**owner_id** | **String** | | **managed** | Option<**bool**> | | [optional] **application_id** | Option<**String**> | | [optional] diff --git a/docs/PrivateGuildMemberResponse.md b/docs/PrivateGuildMemberResponse.md index 7d2c8d6..99863a1 100644 --- a/docs/PrivateGuildMemberResponse.md +++ b/docs/PrivateGuildMemberResponse.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **pending** | **bool** | | **premium_since** | Option<**String**> | | [optional] **roles** | **Vec** | | +**collectibles** | Option<[**models::UserCollectiblesResponse**](UserCollectiblesResponse.md)> | | [optional] **user** | [**models::UserResponse**](UserResponse.md) | | **mute** | **bool** | | **deaf** | **bool** | | diff --git a/docs/PruneGuildRequest.md b/docs/PruneGuildRequest.md index 7c66673..53633aa 100644 --- a/docs/PruneGuildRequest.md +++ b/docs/PruneGuildRequest.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **days** | Option<**i32**> | | [optional] **compute_prune_count** | Option<**bool**> | | [optional] -**include_roles** | Option<[**models::PruneGuildRequestIncludeRoles**](prune_guild_request_include_roles.md)> | | [optional] +**include_roles** | Option<[**models::PruneGuildRequestIncludeRoles**](PruneGuildRequest_include_roles.md)> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RatelimitedResponse.md b/docs/RatelimitedResponse.md new file mode 100644 index 0000000..d466a55 --- /dev/null +++ b/docs/RatelimitedResponse.md @@ -0,0 +1,14 @@ +# RatelimitedResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **i32** | Discord internal error code. See error code reference | +**message** | **String** | Human-readable error message | +**retry_after** | **f64** | The number of seconds to wait before retrying your request | +**global** | **bool** | Whether you are being ratelimited by the global ratelimit or a per-endpoint ratelimit | + +[[Back to Model list]](../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 index 67f73a0..39dd2bf 100644 --- a/docs/ResolvedObjectsResponse.md +++ b/docs/ResolvedObjectsResponse.md @@ -4,10 +4,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**users** | [**std::collections::HashMap**](UserResponse.md) | | -**members** | [**std::collections::HashMap**](GuildMemberResponse.md) | | -**channels** | [**std::collections::HashMap**](get_channel_200_response.md) | | -**roles** | [**std::collections::HashMap**](GuildRoleResponse.md) | | +**users** | Option<[**std::collections::HashMap**](UserResponse.md)> | | [optional] +**members** | Option<[**std::collections::HashMap**](BasicGuildMemberResponse.md)> | | [optional] +**channels** | Option<[**std::collections::HashMap**](get_channel_200_response.md)> | | [optional] +**roles** | Option<[**std::collections::HashMap**](GuildRoleResponse.md)> | | [optional] [[Back to Model list]](../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 index 0a5a62e..80555c3 100644 --- a/docs/RoleSelectComponentForMessageRequest.md +++ b/docs/RoleSelectComponentForMessageRequest.md @@ -5,11 +5,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **r#type** | **i32** | | +**id** | Option<**i32**> | | [optional] **custom_id** | **String** | | **placeholder** | Option<**String**> | | [optional] **min_values** | Option<**i32**> | | [optional] **max_values** | Option<**i32**> | | [optional] **disabled** | Option<**bool**> | | [optional] +**required** | Option<**bool**> | | [optional] **default_values** | Option<[**Vec**](RoleSelectDefaultValue.md)> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/RoleSelectComponentForModalRequest.md b/docs/RoleSelectComponentForModalRequest.md new file mode 100644 index 0000000..9054588 --- /dev/null +++ b/docs/RoleSelectComponentForModalRequest.md @@ -0,0 +1,19 @@ +# RoleSelectComponentForModalRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**r#type** | **i32** | | +**id** | Option<**i32**> | | [optional] +**custom_id** | **String** | | +**placeholder** | Option<**String**> | | [optional] +**min_values** | Option<**i32**> | | [optional] +**max_values** | Option<**i32**> | | [optional] +**disabled** | Option<**bool**> | | [optional] +**required** | Option<**bool**> | | [optional] +**default_values** | Option<[**Vec**](RoleSelectDefaultValue.md)> | | [optional] + +[[Back to Model list]](../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 index 72affd3..eb87aad 100644 --- a/docs/SdkMessageRequest.md +++ b/docs/SdkMessageRequest.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **flags** | Option<**i32**> | | [optional] **attachments** | Option<[**Vec**](MessageAttachmentRequest.md)> | | [optional] **poll** | Option<[**models::PollCreateRequest**](PollCreateRequest.md)> | | [optional] +**shared_client_theme** | Option<[**models::CustomClientThemeShareRequest**](CustomClientThemeShareRequest.md)> | | [optional] **confetti_potion** | Option<[**serde_json::Value**](.md)> | | [optional] **message_reference** | Option<[**models::MessageReferenceRequest**](MessageReferenceRequest.md)> | | [optional] **nonce** | Option<[**models::BasicMessageResponseNonce**](BasicMessageResponse_nonce.md)> | | [optional] diff --git a/docs/SectionComponentForMessageRequest.md b/docs/SectionComponentForMessageRequest.md index 42e6d12..c308aaa 100644 --- a/docs/SectionComponentForMessageRequest.md +++ b/docs/SectionComponentForMessageRequest.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **r#type** | **i32** | | +**id** | Option<**i32**> | | [optional] **components** | [**Vec**](TextDisplayComponentForMessageRequest.md) | | **accessory** | [**models::SectionComponentForMessageRequestAccessory**](SectionComponentForMessageRequest_accessory.md) | | diff --git a/docs/SeparatorComponentForMessageRequest.md b/docs/SeparatorComponentForMessageRequest.md index ba5f764..bcbdf51 100644 --- a/docs/SeparatorComponentForMessageRequest.md +++ b/docs/SeparatorComponentForMessageRequest.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **r#type** | **i32** | | +**id** | Option<**i32**> | | [optional] **spacing** | Option<**i32**> | | [optional] **divider** | Option<**bool**> | | [optional] diff --git a/docs/SettingsEmojiResponse.md b/docs/SettingsEmojiResponse.md index 0ad3110..237d46c 100644 --- a/docs/SettingsEmojiResponse.md +++ b/docs/SettingsEmojiResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | Option<**String**> | | [optional] **name** | Option<**String**> | | [optional] -**animated** | Option<**bool**> | | [optional] +**animated** | **bool** | | [[Back to Model list]](../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 index 3f315d7..783e543 100644 --- a/docs/SpamLinkRuleResponse.md +++ b/docs/SpamLinkRuleResponse.md @@ -11,9 +11,9 @@ Name | Type | Description | Notes **event_type** | **i32** | | **actions** | [**Vec**](DefaultKeywordRuleResponse_actions_inner.md) | | **trigger_type** | **i32** | | -**enabled** | Option<**bool**> | | [optional] -**exempt_roles** | Option<**Vec**> | | [optional] -**exempt_channels** | Option<**Vec**> | | [optional] +**enabled** | **bool** | | +**exempt_roles** | **Vec** | | +**exempt_channels** | **Vec** | | **trigger_metadata** | [**serde_json::Value**](.md) | | [[Back to Model list]](../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 index fbdd422..0beada3 100644 --- a/docs/StageInstanceResponse.md +++ b/docs/StageInstanceResponse.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **topic** | **String** | | **privacy_level** | **i32** | | **id** | **String** | | -**discoverable_disabled** | Option<**bool**> | | [optional] +**discoverable_disabled** | **bool** | | **guild_scheduled_event_id** | Option<**String**> | | [optional] [[Back to Model list]](../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 index 236f870..aef8050 100644 --- a/docs/StringSelectComponentForMessageRequest.md +++ b/docs/StringSelectComponentForMessageRequest.md @@ -5,12 +5,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **r#type** | **i32** | | +**id** | Option<**i32**> | | [optional] **custom_id** | **String** | | **placeholder** | Option<**String**> | | [optional] **min_values** | Option<**i32**> | | [optional] **max_values** | Option<**i32**> | | [optional] **disabled** | Option<**bool**> | | [optional] -**options** | [**Vec**](StringSelectOptionForMessageRequest.md) | | +**required** | Option<**bool**> | | [optional] +**options** | [**Vec**](StringSelectOptionForRequest.md) | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/StringSelectComponentForModalRequest.md b/docs/StringSelectComponentForModalRequest.md new file mode 100644 index 0000000..d64ce5a --- /dev/null +++ b/docs/StringSelectComponentForModalRequest.md @@ -0,0 +1,19 @@ +# StringSelectComponentForModalRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**r#type** | **i32** | | +**id** | Option<**i32**> | | [optional] +**custom_id** | **String** | | +**placeholder** | Option<**String**> | | [optional] +**min_values** | Option<**i32**> | | [optional] +**max_values** | Option<**i32**> | | [optional] +**disabled** | Option<**bool**> | | [optional] +**required** | Option<**bool**> | | [optional] +**options** | [**Vec**](StringSelectOptionForRequest.md) | | + +[[Back to Model list]](../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/StringSelectOptionForRequest.md similarity index 73% rename from docs/StringSelectOptionForMessageRequest.md rename to docs/StringSelectOptionForRequest.md index 45bc903..7215bb3 100644 --- a/docs/StringSelectOptionForMessageRequest.md +++ b/docs/StringSelectOptionForRequest.md @@ -1,4 +1,4 @@ -# StringSelectOptionForMessageRequest +# StringSelectOptionForRequest ## Properties @@ -8,7 +8,7 @@ Name | Type | Description | Notes **value** | **String** | | **description** | Option<**String**> | | [optional] **default** | Option<**bool**> | | [optional] -**emoji** | Option<[**models::ComponentEmojiForMessageRequest**](ComponentEmojiForMessageRequest.md)> | | [optional] +**emoji** | Option<[**models::ComponentEmojiForRequest**](ComponentEmojiForRequest.md)> | | [optional] [[Back to Model list]](../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 index bfd7b22..b4ee09d 100644 --- a/docs/TextDisplayComponentForMessageRequest.md +++ b/docs/TextDisplayComponentForMessageRequest.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **r#type** | **i32** | | +**id** | Option<**i32**> | | [optional] **content** | **String** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TextDisplayComponentForModalRequest.md b/docs/TextDisplayComponentForModalRequest.md new file mode 100644 index 0000000..5dae4ce --- /dev/null +++ b/docs/TextDisplayComponentForModalRequest.md @@ -0,0 +1,13 @@ +# TextDisplayComponentForModalRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**r#type** | **i32** | | +**id** | Option<**i32**> | | [optional] +**content** | **String** | | + +[[Back to Model list]](../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 index 339a1c1..310a738 100644 --- a/docs/TextInputComponentForModalRequest.md +++ b/docs/TextInputComponentForModalRequest.md @@ -5,9 +5,10 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **r#type** | **i32** | | +**id** | Option<**i32**> | | [optional] **custom_id** | **String** | | **style** | **i32** | | -**label** | **String** | | +**label** | Option<**String**> | | [optional] **value** | Option<**String**> | | [optional] **placeholder** | Option<**String**> | | [optional] **required** | Option<**bool**> | | [optional] diff --git a/docs/ThreadResponse.md b/docs/ThreadResponse.md index f6cc216..9c95e91 100644 --- a/docs/ThreadResponse.md +++ b/docs/ThreadResponse.md @@ -19,7 +19,7 @@ Name | Type | Description | Notes **video_quality_mode** | Option<**i32**> | | [optional] **permissions** | Option<**String**> | | [optional] **owner_id** | **String** | | -**thread_metadata** | Option<[**models::ThreadMetadataResponse**](ThreadMetadataResponse.md)> | | [optional] +**thread_metadata** | [**models::ThreadMetadataResponse**](ThreadMetadataResponse.md) | | **message_count** | **i32** | | **member_count** | **i32** | | **total_message_sent** | **i32** | | diff --git a/docs/ThreadSearchResponse.md b/docs/ThreadSearchResponse.md index bd7d1d3..c3cdf54 100644 --- a/docs/ThreadSearchResponse.md +++ b/docs/ThreadSearchResponse.md @@ -6,9 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **threads** | [**Vec**](ThreadResponse.md) | | **members** | [**Vec**](ThreadMemberResponse.md) | | -**has_more** | Option<**bool**> | | [optional] +**has_more** | **bool** | | **first_messages** | Option<[**Vec**](MessageResponse.md)> | | [optional] -**total_results** | Option<**i32**> | | [optional] +**total_results** | **i32** | | [[Back to Model list]](../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 index 3b0627a..af49082 100644 --- a/docs/ThreadsResponse.md +++ b/docs/ThreadsResponse.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **threads** | [**Vec**](ThreadResponse.md) | | **members** | [**Vec**](ThreadMemberResponse.md) | | -**has_more** | Option<**bool**> | | [optional] +**has_more** | **bool** | | **first_messages** | Option<[**Vec**](MessageResponse.md)> | | [optional] [[Back to Model list]](../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 index c245bc7..ad070d0 100644 --- a/docs/ThumbnailComponentForMessageRequest.md +++ b/docs/ThumbnailComponentForMessageRequest.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **r#type** | **i32** | | +**id** | Option<**i32**> | | [optional] **description** | Option<**String**> | | [optional] **spoiler** | Option<**bool**> | | [optional] **media** | [**models::UnfurledMediaRequest**](UnfurledMediaRequest.md) | | diff --git a/docs/BulkUpdateGuildRolesRequestInner.md b/docs/UpdateRolePositionsRequest.md similarity index 91% rename from docs/BulkUpdateGuildRolesRequestInner.md rename to docs/UpdateRolePositionsRequest.md index 76651ca..35b35a3 100644 --- a/docs/BulkUpdateGuildRolesRequestInner.md +++ b/docs/UpdateRolePositionsRequest.md @@ -1,4 +1,4 @@ -# BulkUpdateGuildRolesRequestInner +# UpdateRolePositionsRequest ## Properties diff --git a/docs/CreateGuildRequestRoleItem.md b/docs/UpdateRoleRequestPartial.md similarity index 88% rename from docs/CreateGuildRequestRoleItem.md rename to docs/UpdateRoleRequestPartial.md index b096bbf..dc4adc4 100644 --- a/docs/CreateGuildRequestRoleItem.md +++ b/docs/UpdateRoleRequestPartial.md @@ -1,15 +1,15 @@ -# CreateGuildRequestRoleItem +# UpdateRoleRequestPartial ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **i32** | | **name** | Option<**String**> | | [optional] **permissions** | Option<**i32**> | | [optional] **color** | Option<**i32**> | | [optional] **hoist** | Option<**bool**> | | [optional] **mentionable** | Option<**bool**> | | [optional] +**icon** | Option<**String**> | | [optional] **unicode_emoji** | Option<**String**> | | [optional] [[Back to Model list]](../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/UpdateSelfVoiceStateRequestPartial.md similarity index 92% rename from docs/UpdateSelfVoiceStateRequest.md rename to docs/UpdateSelfVoiceStateRequestPartial.md index 26e23e4..0fe41c8 100644 --- a/docs/UpdateSelfVoiceStateRequest.md +++ b/docs/UpdateSelfVoiceStateRequestPartial.md @@ -1,4 +1,4 @@ -# UpdateSelfVoiceStateRequest +# UpdateSelfVoiceStateRequestPartial ## Properties diff --git a/docs/UpdateVoiceStateRequest.md b/docs/UpdateVoiceStateRequestPartial.md similarity index 91% rename from docs/UpdateVoiceStateRequest.md rename to docs/UpdateVoiceStateRequestPartial.md index 7512d50..6f123f3 100644 --- a/docs/UpdateVoiceStateRequest.md +++ b/docs/UpdateVoiceStateRequestPartial.md @@ -1,4 +1,4 @@ -# UpdateVoiceStateRequest +# UpdateVoiceStateRequestPartial ## Properties diff --git a/docs/UserNameplateResponse.md b/docs/UserNameplateResponse.md index 41de575..31a1680 100644 --- a/docs/UserNameplateResponse.md +++ b/docs/UserNameplateResponse.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **sku_id** | Option<**String**> | | [optional] -**asset** | Option<**String**> | | [optional] -**label** | Option<**String**> | | [optional] -**palette** | Option<**String**> | | [optional] +**asset** | **String** | | +**label** | **String** | | +**palette** | **String** | | [[Back to Model list]](../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 index 771553a..51c9967 100644 --- a/docs/UserSelectComponentForMessageRequest.md +++ b/docs/UserSelectComponentForMessageRequest.md @@ -5,11 +5,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **r#type** | **i32** | | +**id** | Option<**i32**> | | [optional] **custom_id** | **String** | | **placeholder** | Option<**String**> | | [optional] **min_values** | Option<**i32**> | | [optional] **max_values** | Option<**i32**> | | [optional] **disabled** | Option<**bool**> | | [optional] +**required** | Option<**bool**> | | [optional] **default_values** | Option<[**Vec**](UserSelectDefaultValue.md)> | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/UserSelectComponentForModalRequest.md b/docs/UserSelectComponentForModalRequest.md new file mode 100644 index 0000000..3ad2721 --- /dev/null +++ b/docs/UserSelectComponentForModalRequest.md @@ -0,0 +1,19 @@ +# UserSelectComponentForModalRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**r#type** | **i32** | | +**id** | Option<**i32**> | | [optional] +**custom_id** | **String** | | +**placeholder** | Option<**String**> | | [optional] +**min_values** | Option<**i32**> | | [optional] +**max_values** | Option<**i32**> | | [optional] +**disabled** | Option<**bool**> | | [optional] +**required** | Option<**bool**> | | [optional] +**default_values** | Option<[**Vec**](UserSelectDefaultValue.md)> | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/src/apis/configuration.rs b/src/apis/configuration.rs index 6f9f185..a0eaa34 100644 --- a/src/apis/configuration.rs +++ b/src/apis/configuration.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -57,7 +57,6 @@ pub struct Configuration { pub api_key: Option, } - pub type BasicAuth = (String, Option); #[derive(Debug, Clone)] @@ -101,4 +100,3 @@ impl Default for Configuration { } } } - diff --git a/src/apis/default_api.rs b/src/apis/default_api.rs index 38c517a..0edac7c 100644 --- a/src/apis/default_api.rs +++ b/src/apis/default_api.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -42,13550 +42,12510 @@ //! //!
-use async_trait::async_trait; use reqwest; -use std::sync::Arc; use serde::{Deserialize, Serialize, de::Error as _}; use crate::{apis::ResponseContent, models}; -use super::{Error, configuration}; -use crate::apis::ContentType; - -#[async_trait] -pub trait DefaultApi: Send + Sync { - - /// PUT /channels/{channel_id}/recipients/{user_id} - /// - /// - async fn add_group_dm_user<'channel_id, 'user_id, 'add_group_dm_user_request>(&self, channel_id: &'channel_id str, user_id: &'user_id str, add_group_dm_user_request: models::AddGroupDmUserRequest) -> Result, Error>; - - /// PUT /guilds/{guild_id}/members/{user_id} - /// - /// - async fn add_guild_member<'guild_id, 'user_id, 'add_guild_member_request>(&self, guild_id: &'guild_id str, user_id: &'user_id str, add_guild_member_request: models::AddGuildMemberRequest) -> Result, Error>; - - /// PUT /guilds/{guild_id}/members/{user_id}/roles/{role_id} - /// - /// - async fn add_guild_member_role<'guild_id, 'user_id, 'role_id>(&self, guild_id: &'guild_id str, user_id: &'user_id str, role_id: &'role_id str) -> Result, Error>; - - /// PUT /lobbies/{lobby_id}/members/{user_id} - /// - /// - async fn add_lobby_member<'lobby_id, 'user_id, 'add_lobby_member_request>(&self, lobby_id: &'lobby_id str, user_id: &'user_id str, add_lobby_member_request: models::AddLobbyMemberRequest) -> Result, Error>; - - /// PUT /channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}/@me - /// - /// - async fn add_my_message_reaction<'channel_id, 'message_id, 'emoji_name>(&self, channel_id: &'channel_id str, message_id: &'message_id str, emoji_name: &'emoji_name str) -> Result, Error>; - - /// PUT /channels/{channel_id}/thread-members/{user_id} - /// - /// - async fn add_thread_member<'channel_id, 'user_id>(&self, channel_id: &'channel_id str, user_id: &'user_id str) -> Result, Error>; - - /// GET /applications/{application_id}/activity-instances/{instance_id} - /// - /// - async fn applications_get_activity_instance<'application_id, 'instance_id>(&self, application_id: &'application_id str, instance_id: &'instance_id str) -> Result, Error>; - - /// PUT /guilds/{guild_id}/bans/{user_id} - /// - /// - async fn ban_user_from_guild<'guild_id, 'user_id, 'ban_user_from_guild_request>(&self, guild_id: &'guild_id str, user_id: &'user_id str, ban_user_from_guild_request: models::BanUserFromGuildRequest) -> Result, Error>; - - /// POST /guilds/{guild_id}/bulk-ban - /// - /// - async fn bulk_ban_users_from_guild<'guild_id, 'bulk_ban_users_from_guild_request>(&self, guild_id: &'guild_id str, bulk_ban_users_from_guild_request: models::BulkBanUsersFromGuildRequest) -> Result, Error>; - - /// POST /channels/{channel_id}/messages/bulk-delete - /// - /// - async fn bulk_delete_messages<'channel_id, 'bulk_delete_messages_request>(&self, channel_id: &'channel_id str, bulk_delete_messages_request: models::BulkDeleteMessagesRequest) -> Result, Error>; - - /// PUT /applications/{application_id}/commands - /// - /// - async fn bulk_set_application_commands<'application_id, 'application_command_update_request>(&self, application_id: &'application_id str, application_command_update_request: Option>) -> Result, Error>; - - /// PUT /applications/{application_id}/guilds/{guild_id}/commands - /// - /// - async fn bulk_set_guild_application_commands<'application_id, 'guild_id, 'application_command_update_request>(&self, application_id: &'application_id str, guild_id: &'guild_id str, application_command_update_request: Option>) -> Result, Error>; - - /// PATCH /guilds/{guild_id}/channels - /// - /// - async fn bulk_update_guild_channels<'guild_id, 'bulk_update_guild_channels_request_inner>(&self, guild_id: &'guild_id str, bulk_update_guild_channels_request_inner: Vec) -> Result, Error>; - - /// PATCH /guilds/{guild_id}/roles - /// - /// - async fn bulk_update_guild_roles<'guild_id, 'bulk_update_guild_roles_request_inner>(&self, guild_id: &'guild_id str, bulk_update_guild_roles_request_inner: Vec) -> Result, Error>; - - /// POST /lobbies/{lobby_id}/members/bulk - /// - /// - async fn bulk_update_lobby_members<'lobby_id, 'bulk_lobby_member_request>(&self, lobby_id: &'lobby_id str, bulk_lobby_member_request: Option>) -> Result, Error>; - - /// POST /applications/{application_id}/entitlements/{entitlement_id}/consume - /// - /// - async fn consume_entitlement<'application_id, 'entitlement_id>(&self, application_id: &'application_id str, entitlement_id: &'entitlement_id str) -> Result, Error>; - - /// POST /applications/{application_id}/commands - /// - /// - async fn create_application_command<'application_id, 'application_command_create_request>(&self, application_id: &'application_id str, application_command_create_request: models::ApplicationCommandCreateRequest) -> Result, Error>; - - /// POST /applications/{application_id}/emojis - /// - /// - async fn create_application_emoji<'application_id, 'create_application_emoji_request>(&self, application_id: &'application_id str, create_application_emoji_request: models::CreateApplicationEmojiRequest) -> Result, Error>; - - /// POST /guilds/{guild_id}/auto-moderation/rules - /// - /// - async fn create_auto_moderation_rule<'guild_id, 'create_auto_moderation_rule_request>(&self, guild_id: &'guild_id str, create_auto_moderation_rule_request: models::CreateAutoModerationRuleRequest) -> Result, Error>; - - /// POST /channels/{channel_id}/invites - /// - /// - async fn create_channel_invite<'channel_id, 'create_channel_invite_request>(&self, channel_id: &'channel_id str, create_channel_invite_request: models::CreateChannelInviteRequest) -> Result, Error>; - - /// POST /users/@me/channels - /// - /// - async fn create_dm<'create_private_channel_request>(&self, create_private_channel_request: models::CreatePrivateChannelRequest) -> Result, Error>; - - /// POST /applications/{application_id}/entitlements - /// - /// - async fn create_entitlement<'application_id, 'create_entitlement_request_data>(&self, application_id: &'application_id str, create_entitlement_request_data: models::CreateEntitlementRequestData) -> Result, Error>; - - /// POST /guilds - /// - /// - async fn create_guild<'guild_create_request>(&self, guild_create_request: models::GuildCreateRequest) -> Result, Error>; - - /// POST /applications/{application_id}/guilds/{guild_id}/commands - /// - /// - async fn create_guild_application_command<'application_id, 'guild_id, 'application_command_create_request>(&self, application_id: &'application_id str, guild_id: &'guild_id str, application_command_create_request: models::ApplicationCommandCreateRequest) -> Result, Error>; - - /// POST /guilds/{guild_id}/channels - /// - /// - async fn create_guild_channel<'guild_id, 'create_guild_channel_request>(&self, guild_id: &'guild_id str, create_guild_channel_request: models::CreateGuildChannelRequest) -> Result, Error>; - - /// POST /guilds/{guild_id}/emojis - /// - /// - async fn create_guild_emoji<'guild_id, 'create_guild_emoji_request>(&self, guild_id: &'guild_id str, create_guild_emoji_request: models::CreateGuildEmojiRequest) -> Result, Error>; - - /// POST /guilds/templates/{code} - /// - /// - async fn create_guild_from_template<'code, 'create_guild_from_template_request>(&self, code: &'code str, create_guild_from_template_request: models::CreateGuildFromTemplateRequest) -> Result, Error>; - - /// POST /guilds/{guild_id}/roles - /// - /// - async fn create_guild_role<'guild_id, 'create_guild_role_request>(&self, guild_id: &'guild_id str, create_guild_role_request: models::CreateGuildRoleRequest) -> Result, Error>; - - /// POST /guilds/{guild_id}/scheduled-events - /// - /// - async fn create_guild_scheduled_event<'guild_id, 'create_guild_scheduled_event_request>(&self, guild_id: &'guild_id str, create_guild_scheduled_event_request: models::CreateGuildScheduledEventRequest) -> Result, Error>; - - /// POST /guilds/{guild_id}/soundboard-sounds - /// - /// - async fn create_guild_soundboard_sound<'guild_id, 'soundboard_create_request>(&self, guild_id: &'guild_id str, soundboard_create_request: models::SoundboardCreateRequest) -> Result, Error>; - - /// POST /guilds/{guild_id}/stickers - /// - /// - async fn create_guild_sticker<'guild_id, 'name, 'tags, 'file, 'description>(&self, guild_id: &'guild_id str, name: &'name str, tags: &'tags str, file: &'file str, description: Option<&'description str>) -> Result, Error>; - - /// POST /guilds/{guild_id}/templates - /// - /// - async fn create_guild_template<'guild_id, 'create_guild_template_request>(&self, guild_id: &'guild_id str, create_guild_template_request: models::CreateGuildTemplateRequest) -> Result, Error>; - - /// POST /interactions/{interaction_id}/{interaction_token}/callback - /// - /// - async fn create_interaction_response<'interaction_id, 'interaction_token, 'create_interaction_response_request, 'with_response>(&self, interaction_id: &'interaction_id str, interaction_token: &'interaction_token str, create_interaction_response_request: models::CreateInteractionResponseRequest, with_response: Option) -> Result, Error>; - - /// POST /lobbies - /// - /// - async fn create_lobby<'create_lobby_request>(&self, create_lobby_request: models::CreateLobbyRequest) -> Result, Error>; - - /// POST /lobbies/{lobby_id}/messages - /// - /// - async fn create_lobby_message<'lobby_id, 'sdk_message_request>(&self, lobby_id: &'lobby_id str, sdk_message_request: models::SdkMessageRequest) -> Result, Error>; - - /// POST /channels/{channel_id}/messages - /// - /// - async fn create_message<'channel_id, 'message_create_request>(&self, channel_id: &'channel_id str, message_create_request: models::MessageCreateRequest) -> Result, Error>; - - /// PUT /lobbies - /// - /// - async fn create_or_join_lobby<'create_or_join_lobby_request>(&self, create_or_join_lobby_request: models::CreateOrJoinLobbyRequest) -> Result, Error>; - - /// PUT /channels/{channel_id}/messages/pins/{message_id} - /// - /// - async fn create_pin<'channel_id, 'message_id>(&self, channel_id: &'channel_id str, message_id: &'message_id str) -> Result, Error>; - - /// POST /stage-instances - /// - /// - async fn create_stage_instance<'create_stage_instance_request>(&self, create_stage_instance_request: models::CreateStageInstanceRequest) -> Result, Error>; - - /// POST /channels/{channel_id}/threads - /// - /// - async fn create_thread<'channel_id, 'create_thread_request>(&self, channel_id: &'channel_id str, create_thread_request: models::CreateThreadRequest) -> Result, Error>; - - /// POST /channels/{channel_id}/messages/{message_id}/threads - /// - /// - async fn create_thread_from_message<'channel_id, 'message_id, 'create_text_thread_with_message_request>(&self, channel_id: &'channel_id str, message_id: &'message_id str, create_text_thread_with_message_request: models::CreateTextThreadWithMessageRequest) -> Result, Error>; - - /// POST /channels/{channel_id}/webhooks - /// - /// - async fn create_webhook<'channel_id, 'create_webhook_request>(&self, channel_id: &'channel_id str, create_webhook_request: models::CreateWebhookRequest) -> Result, Error>; - - /// POST /channels/{channel_id}/messages/{message_id}/crosspost - /// - /// - async fn crosspost_message<'channel_id, 'message_id>(&self, channel_id: &'channel_id str, message_id: &'message_id str) -> Result, Error>; - - /// DELETE /channels/{channel_id}/messages/{message_id}/reactions - /// - /// - async fn delete_all_message_reactions<'channel_id, 'message_id>(&self, channel_id: &'channel_id str, message_id: &'message_id str) -> Result, Error>; - - /// DELETE /channels/{channel_id}/messages/{message_id}/reactions/{emoji_name} - /// - /// - async fn delete_all_message_reactions_by_emoji<'channel_id, 'message_id, 'emoji_name>(&self, channel_id: &'channel_id str, message_id: &'message_id str, emoji_name: &'emoji_name str) -> Result, Error>; - - /// DELETE /applications/{application_id}/commands/{command_id} - /// - /// - async fn delete_application_command<'application_id, 'command_id>(&self, application_id: &'application_id str, command_id: &'command_id str) -> Result, Error>; - - /// DELETE /applications/{application_id}/emojis/{emoji_id} - /// - /// - async fn delete_application_emoji<'application_id, 'emoji_id>(&self, application_id: &'application_id str, emoji_id: &'emoji_id str) -> Result, Error>; - - /// DELETE /users/@me/applications/{application_id}/role-connection - /// - /// - async fn delete_application_user_role_connection<'application_id>(&self, application_id: &'application_id str) -> Result, Error>; - - /// DELETE /guilds/{guild_id}/auto-moderation/rules/{rule_id} - /// - /// - async fn delete_auto_moderation_rule<'guild_id, 'rule_id>(&self, guild_id: &'guild_id str, rule_id: &'rule_id str) -> Result, Error>; - - /// DELETE /channels/{channel_id} - /// - /// - async fn delete_channel<'channel_id>(&self, channel_id: &'channel_id str) -> Result, Error>; - - /// DELETE /channels/{channel_id}/permissions/{overwrite_id} - /// - /// - async fn delete_channel_permission_overwrite<'channel_id, 'overwrite_id>(&self, channel_id: &'channel_id str, overwrite_id: &'overwrite_id str) -> Result, Error>; - - /// DELETE /applications/{application_id}/entitlements/{entitlement_id} - /// - /// - async fn delete_entitlement<'application_id, 'entitlement_id>(&self, application_id: &'application_id str, entitlement_id: &'entitlement_id str) -> Result, Error>; - - /// DELETE /channels/{channel_id}/recipients/{user_id} - /// - /// - async fn delete_group_dm_user<'channel_id, 'user_id>(&self, channel_id: &'channel_id str, user_id: &'user_id str) -> Result, Error>; - - /// DELETE /guilds/{guild_id} - /// - /// - async fn delete_guild<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error>; - - /// DELETE /applications/{application_id}/guilds/{guild_id}/commands/{command_id} - /// - /// - async fn delete_guild_application_command<'application_id, 'guild_id, 'command_id>(&self, application_id: &'application_id str, guild_id: &'guild_id str, command_id: &'command_id str) -> Result, Error>; - - /// DELETE /guilds/{guild_id}/emojis/{emoji_id} - /// - /// - async fn delete_guild_emoji<'guild_id, 'emoji_id>(&self, guild_id: &'guild_id str, emoji_id: &'emoji_id str) -> Result, Error>; - - /// DELETE /guilds/{guild_id}/integrations/{integration_id} - /// - /// - async fn delete_guild_integration<'guild_id, 'integration_id>(&self, guild_id: &'guild_id str, integration_id: &'integration_id str) -> Result, Error>; - - /// DELETE /guilds/{guild_id}/members/{user_id} - /// - /// - async fn delete_guild_member<'guild_id, 'user_id>(&self, guild_id: &'guild_id str, user_id: &'user_id str) -> Result, Error>; - - /// DELETE /guilds/{guild_id}/members/{user_id}/roles/{role_id} - /// - /// - async fn delete_guild_member_role<'guild_id, 'user_id, 'role_id>(&self, guild_id: &'guild_id str, user_id: &'user_id str, role_id: &'role_id str) -> Result, Error>; - - /// DELETE /guilds/{guild_id}/roles/{role_id} - /// - /// - async fn delete_guild_role<'guild_id, 'role_id>(&self, guild_id: &'guild_id str, role_id: &'role_id str) -> Result, Error>; - - /// DELETE /guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id} - /// - /// - async fn delete_guild_scheduled_event<'guild_id, 'guild_scheduled_event_id>(&self, guild_id: &'guild_id str, guild_scheduled_event_id: &'guild_scheduled_event_id str) -> Result, Error>; - - /// DELETE /guilds/{guild_id}/soundboard-sounds/{sound_id} - /// - /// - async fn delete_guild_soundboard_sound<'guild_id, 'sound_id>(&self, guild_id: &'guild_id str, sound_id: &'sound_id str) -> Result, Error>; - - /// DELETE /guilds/{guild_id}/stickers/{sticker_id} - /// - /// - async fn delete_guild_sticker<'guild_id, 'sticker_id>(&self, guild_id: &'guild_id str, sticker_id: &'sticker_id str) -> Result, Error>; - - /// DELETE /guilds/{guild_id}/templates/{code} - /// - /// - async fn delete_guild_template<'guild_id, 'code>(&self, guild_id: &'guild_id str, code: &'code str) -> Result, Error>; - - /// DELETE /lobbies/{lobby_id}/members/{user_id} - /// - /// - async fn delete_lobby_member<'lobby_id, 'user_id>(&self, lobby_id: &'lobby_id str, user_id: &'user_id str) -> Result, Error>; - - /// DELETE /channels/{channel_id}/messages/{message_id} - /// - /// - async fn delete_message<'channel_id, 'message_id>(&self, channel_id: &'channel_id str, message_id: &'message_id str) -> Result, Error>; - - /// DELETE /channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}/@me - /// - /// - async fn delete_my_message_reaction<'channel_id, 'message_id, 'emoji_name>(&self, channel_id: &'channel_id str, message_id: &'message_id str, emoji_name: &'emoji_name str) -> Result, Error>; - - /// DELETE /webhooks/{webhook_id}/{webhook_token}/messages/@original - /// - /// - async fn delete_original_webhook_message<'webhook_id, 'webhook_token, 'thread_id>(&self, webhook_id: &'webhook_id str, webhook_token: &'webhook_token str, thread_id: Option<&'thread_id str>) -> Result, Error>; - - /// DELETE /channels/{channel_id}/messages/pins/{message_id} - /// - /// - async fn delete_pin<'channel_id, 'message_id>(&self, channel_id: &'channel_id str, message_id: &'message_id str) -> Result, Error>; - - /// DELETE /stage-instances/{channel_id} - /// - /// - async fn delete_stage_instance<'channel_id>(&self, channel_id: &'channel_id str) -> Result, Error>; - - /// DELETE /channels/{channel_id}/thread-members/{user_id} - /// - /// - async fn delete_thread_member<'channel_id, 'user_id>(&self, channel_id: &'channel_id str, user_id: &'user_id str) -> Result, Error>; - - /// DELETE /channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}/{user_id} - /// - /// - async fn delete_user_message_reaction<'channel_id, 'message_id, 'emoji_name, 'user_id>(&self, channel_id: &'channel_id str, message_id: &'message_id str, emoji_name: &'emoji_name str, user_id: &'user_id str) -> Result, Error>; - - /// DELETE /webhooks/{webhook_id} - /// - /// - async fn delete_webhook<'webhook_id>(&self, webhook_id: &'webhook_id str) -> Result, Error>; - - /// DELETE /webhooks/{webhook_id}/{webhook_token} - /// - /// - async fn delete_webhook_by_token<'webhook_id, 'webhook_token>(&self, webhook_id: &'webhook_id str, webhook_token: &'webhook_token str) -> Result, Error>; - - /// DELETE /webhooks/{webhook_id}/{webhook_token}/messages/{message_id} - /// - /// - async fn delete_webhook_message<'webhook_id, 'webhook_token, 'message_id, 'thread_id>(&self, webhook_id: &'webhook_id str, webhook_token: &'webhook_token str, message_id: &'message_id str, thread_id: Option<&'thread_id str>) -> Result, Error>; - - /// PUT /channels/{channel_id}/pins/{message_id} - /// - /// - async fn deprecated_create_pin<'channel_id, 'message_id>(&self, channel_id: &'channel_id str, message_id: &'message_id str) -> Result, Error>; - - /// DELETE /channels/{channel_id}/pins/{message_id} - /// - /// - async fn deprecated_delete_pin<'channel_id, 'message_id>(&self, channel_id: &'channel_id str, message_id: &'message_id str) -> Result, Error>; - - /// GET /channels/{channel_id}/pins - /// - /// - async fn deprecated_list_pins<'channel_id>(&self, channel_id: &'channel_id str) -> Result, Error>; - - /// PATCH /lobbies/{lobby_id} - /// - /// - async fn edit_lobby<'lobby_id, 'create_lobby_request>(&self, lobby_id: &'lobby_id str, create_lobby_request: models::CreateLobbyRequest) -> Result, Error>; - - /// PATCH /lobbies/{lobby_id}/channel-linking - /// - /// - async fn edit_lobby_channel_link<'lobby_id, 'edit_lobby_channel_link_request>(&self, lobby_id: &'lobby_id str, edit_lobby_channel_link_request: models::EditLobbyChannelLinkRequest) -> Result, Error>; - - /// POST /webhooks/{webhook_id}/{webhook_token}/github - /// - /// - async fn execute_github_compatible_webhook<'webhook_id, 'webhook_token, 'github_webhook, 'wait, 'thread_id>(&self, webhook_id: &'webhook_id str, webhook_token: &'webhook_token str, github_webhook: models::GithubWebhook, wait: Option, thread_id: Option<&'thread_id str>) -> Result, Error>; - - /// POST /webhooks/{webhook_id}/{webhook_token}/slack - /// - /// - async fn execute_slack_compatible_webhook<'webhook_id, 'webhook_token, 'slack_webhook, 'wait, 'thread_id>(&self, webhook_id: &'webhook_id str, webhook_token: &'webhook_token str, slack_webhook: models::SlackWebhook, wait: Option, thread_id: Option<&'thread_id str>) -> Result, Error>; - - /// POST /webhooks/{webhook_id}/{webhook_token} - /// - /// - async fn execute_webhook<'webhook_id, 'webhook_token, 'execute_webhook_request, 'wait, 'thread_id, 'with_components>(&self, webhook_id: &'webhook_id str, webhook_token: &'webhook_token str, execute_webhook_request: models::ExecuteWebhookRequest, wait: Option, thread_id: Option<&'thread_id str>, with_components: Option) -> Result, Error>; - - /// POST /channels/{channel_id}/followers - /// - /// - async fn follow_channel<'channel_id, 'follow_channel_request>(&self, channel_id: &'channel_id str, follow_channel_request: models::FollowChannelRequest) -> Result, Error>; - - /// GET /guilds/{guild_id}/threads/active - /// - /// - async fn get_active_guild_threads<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error>; - - /// GET /channels/{channel_id}/polls/{message_id}/answers/{answer_id} - /// - /// - async fn get_answer_voters<'channel_id, 'message_id, 'answer_id, 'after, 'limit>(&self, channel_id: &'channel_id str, message_id: &'message_id str, answer_id: i32, after: Option<&'after str>, limit: Option) -> Result, Error>; - - /// GET /applications/{application_id} - /// - /// - async fn get_application<'application_id>(&self, application_id: &'application_id str) -> Result, Error>; - - /// GET /applications/{application_id}/commands/{command_id} - /// - /// - async fn get_application_command<'application_id, 'command_id>(&self, application_id: &'application_id str, command_id: &'command_id str) -> Result, Error>; - - /// GET /applications/{application_id}/emojis/{emoji_id} - /// - /// - async fn get_application_emoji<'application_id, 'emoji_id>(&self, application_id: &'application_id str, emoji_id: &'emoji_id str) -> Result, Error>; - - /// GET /applications/{application_id}/role-connections/metadata - /// - /// - async fn get_application_role_connections_metadata<'application_id>(&self, application_id: &'application_id str) -> Result, Error>; - - /// GET /users/@me/applications/{application_id}/role-connection - /// - /// - async fn get_application_user_role_connection<'application_id>(&self, application_id: &'application_id str) -> Result, Error>; - - /// GET /guilds/{guild_id}/auto-moderation/rules/{rule_id} - /// - /// - async fn get_auto_moderation_rule<'guild_id, 'rule_id>(&self, guild_id: &'guild_id str, rule_id: &'rule_id str) -> Result, Error>; - - /// GET /gateway/bot - /// - /// - async fn get_bot_gateway<>(&self, ) -> Result, Error>; - - /// GET /channels/{channel_id} - /// - /// - async fn get_channel<'channel_id>(&self, channel_id: &'channel_id str) -> Result, Error>; - - /// GET /applications/{application_id}/entitlements/{entitlement_id} - /// - /// - async fn get_entitlement<'application_id, 'entitlement_id>(&self, application_id: &'application_id str, entitlement_id: &'entitlement_id str) -> Result, Error>; - - /// GET /applications/{application_id}/entitlements - /// - /// - async fn get_entitlements<'sku_ids, 'application_id, 'user_id, 'guild_id, 'before, 'after, 'limit, 'exclude_ended, 'exclude_deleted, 'only_active>(&self, sku_ids: &'sku_ids str, application_id: &'application_id str, user_id: Option<&'user_id str>, guild_id: Option<&'guild_id str>, before: Option<&'before str>, after: Option<&'after str>, limit: Option, exclude_ended: Option, exclude_deleted: Option, only_active: Option) -> Result, Error>; - - /// GET /gateway - /// - /// - async fn get_gateway<>(&self, ) -> Result, Error>; - - /// GET /guilds/{guild_id} - /// - /// - async fn get_guild<'guild_id, 'with_counts>(&self, guild_id: &'guild_id str, with_counts: Option) -> Result, Error>; - - /// GET /applications/{application_id}/guilds/{guild_id}/commands/{command_id} - /// - /// - async fn get_guild_application_command<'application_id, 'guild_id, 'command_id>(&self, application_id: &'application_id str, guild_id: &'guild_id str, command_id: &'command_id str) -> Result, Error>; - - /// GET /applications/{application_id}/guilds/{guild_id}/commands/{command_id}/permissions - /// - /// - async fn get_guild_application_command_permissions<'application_id, 'guild_id, 'command_id>(&self, application_id: &'application_id str, guild_id: &'guild_id str, command_id: &'command_id str) -> Result, Error>; - - /// GET /guilds/{guild_id}/bans/{user_id} - /// - /// - async fn get_guild_ban<'guild_id, 'user_id>(&self, guild_id: &'guild_id str, user_id: &'user_id str) -> Result, Error>; - - /// GET /guilds/{guild_id}/emojis/{emoji_id} - /// - /// - async fn get_guild_emoji<'guild_id, 'emoji_id>(&self, guild_id: &'guild_id str, emoji_id: &'emoji_id str) -> Result, Error>; - - /// GET /guilds/{guild_id}/members/{user_id} - /// - /// - async fn get_guild_member<'guild_id, 'user_id>(&self, guild_id: &'guild_id str, user_id: &'user_id str) -> Result, Error>; - - /// GET /guilds/{guild_id}/new-member-welcome - /// - /// - async fn get_guild_new_member_welcome<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error>; - - /// GET /guilds/{guild_id}/preview - /// - /// - async fn get_guild_preview<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error>; - - /// GET /guilds/{guild_id}/roles/{role_id} - /// - /// - async fn get_guild_role<'guild_id, 'role_id>(&self, guild_id: &'guild_id str, role_id: &'role_id str) -> Result, Error>; - - /// GET /guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id} - /// - /// - async fn get_guild_scheduled_event<'guild_id, 'guild_scheduled_event_id, 'with_user_count>(&self, guild_id: &'guild_id str, guild_scheduled_event_id: &'guild_scheduled_event_id str, with_user_count: Option) -> Result, Error>; - - /// GET /guilds/{guild_id}/soundboard-sounds/{sound_id} - /// - /// - async fn get_guild_soundboard_sound<'guild_id, 'sound_id>(&self, guild_id: &'guild_id str, sound_id: &'sound_id str) -> Result, Error>; - - /// GET /guilds/{guild_id}/stickers/{sticker_id} - /// - /// - async fn get_guild_sticker<'guild_id, 'sticker_id>(&self, guild_id: &'guild_id str, sticker_id: &'sticker_id str) -> Result, Error>; - - /// GET /guilds/templates/{code} - /// - /// - async fn get_guild_template<'code>(&self, code: &'code str) -> Result, Error>; - - /// GET /guilds/{guild_id}/vanity-url - /// - /// - async fn get_guild_vanity_url<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error>; - - /// GET /guilds/{guild_id}/webhooks - /// - /// - async fn get_guild_webhooks<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error>; - - /// GET /guilds/{guild_id}/welcome-screen - /// - /// - async fn get_guild_welcome_screen<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error>; - - /// GET /guilds/{guild_id}/widget.json - /// - /// - async fn get_guild_widget<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error>; - - /// GET /guilds/{guild_id}/widget.png - /// - /// - async fn get_guild_widget_png<'guild_id, 'style>(&self, guild_id: &'guild_id str, style: Option<&'style str>) -> Result, Error>; - - /// GET /guilds/{guild_id}/widget - /// - /// - async fn get_guild_widget_settings<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error>; - - /// GET /guilds/{guild_id}/onboarding - /// - /// - async fn get_guilds_onboarding<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error>; - - /// GET /lobbies/{lobby_id} - /// - /// - async fn get_lobby<'lobby_id>(&self, lobby_id: &'lobby_id str) -> Result, Error>; - - /// GET /lobbies/{lobby_id}/messages - /// - /// - async fn get_lobby_messages<'lobby_id, 'limit>(&self, lobby_id: &'lobby_id str, limit: Option) -> Result, Error>; - - /// GET /channels/{channel_id}/messages/{message_id} - /// - /// - async fn get_message<'channel_id, 'message_id>(&self, channel_id: &'channel_id str, message_id: &'message_id str) -> Result, Error>; - - /// GET /applications/@me - /// - /// - async fn get_my_application<>(&self, ) -> Result, Error>; - - /// GET /users/@me/guilds/{guild_id}/member - /// - /// - async fn get_my_guild_member<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error>; - - /// GET /oauth2/applications/@me - /// - /// - async fn get_my_oauth2_application<>(&self, ) -> Result, Error>; - - /// GET /oauth2/@me - /// - /// - async fn get_my_oauth2_authorization<>(&self, ) -> Result, Error>; - - /// GET /users/@me - /// - /// - async fn get_my_user<>(&self, ) -> Result, Error>; - - /// GET /oauth2/userinfo - /// - /// - async fn get_openid_connect_userinfo<>(&self, ) -> Result, Error>; - - /// GET /webhooks/{webhook_id}/{webhook_token}/messages/@original - /// - /// - async fn get_original_webhook_message<'webhook_id, 'webhook_token, 'thread_id>(&self, webhook_id: &'webhook_id str, webhook_token: &'webhook_token str, thread_id: Option<&'thread_id str>) -> Result, Error>; - - /// GET /oauth2/keys - /// - /// - async fn get_public_keys<>(&self, ) -> Result, Error>; - - /// GET /guilds/{guild_id}/voice-states/@me - /// - /// - async fn get_self_voice_state<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error>; - - /// GET /soundboard-default-sounds - /// - /// - async fn get_soundboard_default_sounds<>(&self, ) -> Result, Error>; - - /// GET /stage-instances/{channel_id} - /// - /// - async fn get_stage_instance<'channel_id>(&self, channel_id: &'channel_id str) -> Result, Error>; - - /// GET /stickers/{sticker_id} - /// - /// - async fn get_sticker<'sticker_id>(&self, sticker_id: &'sticker_id str) -> Result, Error>; - - /// GET /sticker-packs/{pack_id} - /// - /// - async fn get_sticker_pack<'pack_id>(&self, pack_id: &'pack_id str) -> Result, Error>; - - /// GET /channels/{channel_id}/thread-members/{user_id} - /// - /// - async fn get_thread_member<'channel_id, 'user_id, 'with_member>(&self, channel_id: &'channel_id str, user_id: &'user_id str, with_member: Option) -> Result, Error>; - - /// GET /users/{user_id} - /// - /// - async fn get_user<'user_id>(&self, user_id: &'user_id str) -> Result, Error>; - - /// GET /guilds/{guild_id}/voice-states/{user_id} - /// - /// - async fn get_voice_state<'guild_id, 'user_id>(&self, guild_id: &'guild_id str, user_id: &'user_id str) -> Result, Error>; - - /// GET /webhooks/{webhook_id} - /// - /// - async fn get_webhook<'webhook_id>(&self, webhook_id: &'webhook_id str) -> Result, Error>; - - /// GET /webhooks/{webhook_id}/{webhook_token} - /// - /// - async fn get_webhook_by_token<'webhook_id, 'webhook_token>(&self, webhook_id: &'webhook_id str, webhook_token: &'webhook_token str) -> Result, Error>; - - /// GET /webhooks/{webhook_id}/{webhook_token}/messages/{message_id} - /// - /// - async fn get_webhook_message<'webhook_id, 'webhook_token, 'message_id, 'thread_id>(&self, webhook_id: &'webhook_id str, webhook_token: &'webhook_token str, message_id: &'message_id str, thread_id: Option<&'thread_id str>) -> Result, Error>; - - /// GET /invites/{code} - /// - /// - async fn invite_resolve<'code, 'with_counts, 'guild_scheduled_event_id>(&self, code: &'code str, with_counts: Option, guild_scheduled_event_id: Option<&'guild_scheduled_event_id str>) -> Result, Error>; - - /// DELETE /invites/{code} - /// - /// - async fn invite_revoke<'code>(&self, code: &'code str) -> Result, Error>; - - /// PUT /channels/{channel_id}/thread-members/@me - /// - /// - async fn join_thread<'channel_id>(&self, channel_id: &'channel_id str) -> Result, Error>; - - /// DELETE /users/@me/guilds/{guild_id} - /// - /// - async fn leave_guild<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error>; - - /// DELETE /lobbies/{lobby_id}/members/@me - /// - /// - async fn leave_lobby<'lobby_id>(&self, lobby_id: &'lobby_id str) -> Result, Error>; - - /// DELETE /channels/{channel_id}/thread-members/@me - /// - /// - async fn leave_thread<'channel_id>(&self, channel_id: &'channel_id str) -> Result, Error>; - - /// GET /applications/{application_id}/commands - /// - /// - async fn list_application_commands<'application_id, 'with_localizations>(&self, application_id: &'application_id str, with_localizations: Option) -> Result, Error>; - - /// GET /applications/{application_id}/emojis - /// - /// - async fn list_application_emojis<'application_id>(&self, application_id: &'application_id str) -> Result, Error>; - - /// GET /guilds/{guild_id}/auto-moderation/rules - /// - /// - async fn list_auto_moderation_rules<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error>; - - /// GET /channels/{channel_id}/invites - /// - /// - async fn list_channel_invites<'channel_id>(&self, channel_id: &'channel_id str) -> Result, Error>; - - /// GET /channels/{channel_id}/webhooks - /// - /// - async fn list_channel_webhooks<'channel_id>(&self, channel_id: &'channel_id str) -> Result, Error>; - - /// GET /applications/{application_id}/guilds/{guild_id}/commands/permissions - /// - /// - async fn list_guild_application_command_permissions<'application_id, 'guild_id>(&self, application_id: &'application_id str, guild_id: &'guild_id str) -> Result, Error>; - - /// GET /applications/{application_id}/guilds/{guild_id}/commands - /// - /// - async fn list_guild_application_commands<'application_id, 'guild_id, 'with_localizations>(&self, application_id: &'application_id str, guild_id: &'guild_id str, with_localizations: Option) -> Result, Error>; - - /// GET /guilds/{guild_id}/audit-logs - /// - /// - async fn list_guild_audit_log_entries<'guild_id, 'user_id, 'target_id, 'action_type, 'before, 'after, 'limit>(&self, guild_id: &'guild_id str, user_id: Option<&'user_id str>, target_id: Option<&'target_id str>, action_type: Option, before: Option<&'before str>, after: Option<&'after str>, limit: Option) -> Result, Error>; - - /// GET /guilds/{guild_id}/bans - /// - /// - async fn list_guild_bans<'guild_id, 'limit, 'before, 'after>(&self, guild_id: &'guild_id str, limit: Option, before: Option<&'before str>, after: Option<&'after str>) -> Result, Error>; - - /// GET /guilds/{guild_id}/channels - /// - /// - async fn list_guild_channels<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error>; - - /// GET /guilds/{guild_id}/emojis - /// - /// - async fn list_guild_emojis<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error>; - - /// GET /guilds/{guild_id}/integrations - /// - /// - async fn list_guild_integrations<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error>; - - /// GET /guilds/{guild_id}/invites - /// - /// - async fn list_guild_invites<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error>; - - /// GET /guilds/{guild_id}/members - /// - /// - async fn list_guild_members<'guild_id, 'limit, 'after>(&self, guild_id: &'guild_id str, limit: Option, after: Option) -> Result, Error>; - - /// GET /guilds/{guild_id}/roles - /// - /// - async fn list_guild_roles<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error>; - - /// GET /guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id}/users - /// - /// - async fn list_guild_scheduled_event_users<'guild_id, 'guild_scheduled_event_id, 'with_member, 'limit, 'before, 'after>(&self, guild_id: &'guild_id str, guild_scheduled_event_id: &'guild_scheduled_event_id str, with_member: Option, limit: Option, before: Option<&'before str>, after: Option<&'after str>) -> Result, Error>; - - /// GET /guilds/{guild_id}/scheduled-events - /// - /// - async fn list_guild_scheduled_events<'guild_id, 'with_user_count>(&self, guild_id: &'guild_id str, with_user_count: Option) -> Result, Error>; - - /// GET /guilds/{guild_id}/soundboard-sounds - /// - /// - async fn list_guild_soundboard_sounds<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error>; - - /// GET /guilds/{guild_id}/stickers - /// - /// - async fn list_guild_stickers<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error>; - - /// GET /guilds/{guild_id}/templates - /// - /// - async fn list_guild_templates<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error>; - - /// GET /guilds/{guild_id}/regions - /// - /// - async fn list_guild_voice_regions<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error>; - - /// GET /channels/{channel_id}/messages/{message_id}/reactions/{emoji_name} - /// - /// - async fn list_message_reactions_by_emoji<'channel_id, 'message_id, 'emoji_name, 'after, 'limit, 'r_type>(&self, channel_id: &'channel_id str, message_id: &'message_id str, emoji_name: &'emoji_name str, after: Option<&'after str>, limit: Option, r#type: Option) -> Result, Error>; - - /// GET /channels/{channel_id}/messages - /// - /// - async fn list_messages<'channel_id, 'around, 'before, 'after, 'limit>(&self, channel_id: &'channel_id str, around: Option<&'around str>, before: Option<&'before str>, after: Option<&'after str>, limit: Option) -> Result, Error>; - - /// GET /users/@me/connections - /// - /// - async fn list_my_connections<>(&self, ) -> Result, Error>; - - /// GET /users/@me/guilds - /// - /// - async fn list_my_guilds<'before, 'after, 'limit, 'with_counts>(&self, before: Option<&'before str>, after: Option<&'after str>, limit: Option, with_counts: Option) -> Result, Error>; - - /// GET /channels/{channel_id}/users/@me/threads/archived/private - /// - /// - async fn list_my_private_archived_threads<'channel_id, 'before, 'limit>(&self, channel_id: &'channel_id str, before: Option<&'before str>, limit: Option) -> Result, Error>; - - /// GET /channels/{channel_id}/messages/pins - /// - /// - async fn list_pins<'channel_id, 'before, 'limit>(&self, channel_id: &'channel_id str, before: Option, limit: Option) -> Result, Error>; - - /// GET /channels/{channel_id}/threads/archived/private - /// - /// - async fn list_private_archived_threads<'channel_id, 'before, 'limit>(&self, channel_id: &'channel_id str, before: Option, limit: Option) -> Result, Error>; - - /// GET /channels/{channel_id}/threads/archived/public - /// - /// - async fn list_public_archived_threads<'channel_id, 'before, 'limit>(&self, channel_id: &'channel_id str, before: Option, limit: Option) -> Result, Error>; - - /// GET /sticker-packs - /// - /// - async fn list_sticker_packs<>(&self, ) -> Result, Error>; - - /// GET /channels/{channel_id}/thread-members - /// - /// - async fn list_thread_members<'channel_id, 'with_member, 'limit, 'after>(&self, channel_id: &'channel_id str, with_member: Option, limit: Option, after: Option<&'after str>) -> Result, Error>; - - /// GET /voice/regions - /// - /// - async fn list_voice_regions<>(&self, ) -> Result, Error>; - - /// POST /partner-sdk/token - /// - /// - async fn partner_sdk_token<'partner_sdk_unmerge_provisional_account_request>(&self, partner_sdk_unmerge_provisional_account_request: models::PartnerSdkUnmergeProvisionalAccountRequest) -> Result, Error>; - - /// POST /partner-sdk/provisional-accounts/unmerge - /// - /// - async fn partner_sdk_unmerge_provisional_account<'partner_sdk_unmerge_provisional_account_request>(&self, partner_sdk_unmerge_provisional_account_request: models::PartnerSdkUnmergeProvisionalAccountRequest) -> Result, Error>; - - /// POST /channels/{channel_id}/polls/{message_id}/expire - /// - /// - async fn poll_expire<'channel_id, 'message_id>(&self, channel_id: &'channel_id str, message_id: &'message_id str) -> Result, Error>; - - /// GET /guilds/{guild_id}/prune - /// - /// - async fn preview_prune_guild<'guild_id, 'days, 'include_roles>(&self, guild_id: &'guild_id str, days: Option, include_roles: Option<&'include_roles str>) -> Result, Error>; - - /// POST /guilds/{guild_id}/prune - /// - /// - async fn prune_guild<'guild_id, 'prune_guild_request>(&self, guild_id: &'guild_id str, prune_guild_request: models::PruneGuildRequest) -> Result, Error>; - - /// PUT /guilds/{guild_id}/onboarding - /// - /// - async fn put_guilds_onboarding<'guild_id, 'update_guild_onboarding_request>(&self, guild_id: &'guild_id str, update_guild_onboarding_request: models::UpdateGuildOnboardingRequest) -> Result, Error>; - - /// GET /guilds/{guild_id}/members/search - /// - /// - async fn search_guild_members<'limit, 'query, 'guild_id>(&self, limit: i32, query: &'query str, guild_id: &'guild_id str) -> Result, Error>; - - /// POST /channels/{channel_id}/send-soundboard-sound - /// - /// - async fn send_soundboard_sound<'channel_id, 'soundboard_sound_send_request>(&self, channel_id: &'channel_id str, soundboard_sound_send_request: models::SoundboardSoundSendRequest) -> Result, Error>; - - /// PUT /channels/{channel_id}/permissions/{overwrite_id} - /// - /// - async fn set_channel_permission_overwrite<'channel_id, 'overwrite_id, 'set_channel_permission_overwrite_request>(&self, channel_id: &'channel_id str, overwrite_id: &'overwrite_id str, set_channel_permission_overwrite_request: models::SetChannelPermissionOverwriteRequest) -> Result, Error>; - - /// PUT /applications/{application_id}/guilds/{guild_id}/commands/{command_id}/permissions - /// - /// - async fn set_guild_application_command_permissions<'application_id, 'guild_id, 'command_id, 'set_guild_application_command_permissions_request>(&self, application_id: &'application_id str, guild_id: &'guild_id str, command_id: &'command_id str, set_guild_application_command_permissions_request: models::SetGuildApplicationCommandPermissionsRequest) -> Result, Error>; - - /// POST /guilds/{guild_id}/mfa - /// - /// - async fn set_guild_mfa_level<'guild_id, 'set_guild_mfa_level_request>(&self, guild_id: &'guild_id str, set_guild_mfa_level_request: models::SetGuildMfaLevelRequest) -> Result, Error>; - - /// PUT /guilds/{guild_id}/templates/{code} - /// - /// - async fn sync_guild_template<'guild_id, 'code>(&self, guild_id: &'guild_id str, code: &'code str) -> Result, Error>; - - /// GET /channels/{channel_id}/threads/search - /// - /// - async fn thread_search<'channel_id, 'name, 'slop, 'min_id, 'max_id, 'tag, 'tag_setting, 'archived, 'sort_by, 'sort_order, 'limit, 'offset>(&self, channel_id: &'channel_id str, name: Option<&'name str>, slop: Option, min_id: Option<&'min_id str>, max_id: Option<&'max_id str>, tag: Option<&'tag str>, tag_setting: Option<&'tag_setting str>, archived: Option, sort_by: Option<&'sort_by str>, sort_order: Option<&'sort_order str>, limit: Option, offset: Option) -> Result, Error>; - - /// POST /channels/{channel_id}/typing - /// - /// - async fn trigger_typing_indicator<'channel_id>(&self, channel_id: &'channel_id str) -> Result, Error>; - - /// DELETE /guilds/{guild_id}/bans/{user_id} - /// - /// - async fn unban_user_from_guild<'guild_id, 'user_id>(&self, guild_id: &'guild_id str, user_id: &'user_id str) -> Result, Error>; - - /// PATCH /applications/{application_id} - /// - /// - async fn update_application<'application_id, 'application_form_partial>(&self, application_id: &'application_id str, application_form_partial: models::ApplicationFormPartial) -> Result, Error>; - - /// PATCH /applications/{application_id}/commands/{command_id} - /// - /// - async fn update_application_command<'application_id, 'command_id, 'application_command_patch_request_partial>(&self, application_id: &'application_id str, command_id: &'command_id str, application_command_patch_request_partial: models::ApplicationCommandPatchRequestPartial) -> Result, Error>; - - /// PATCH /applications/{application_id}/emojis/{emoji_id} - /// - /// - async fn update_application_emoji<'application_id, 'emoji_id, 'update_application_emoji_request>(&self, application_id: &'application_id str, emoji_id: &'emoji_id str, update_application_emoji_request: models::UpdateApplicationEmojiRequest) -> Result, Error>; - - /// PUT /applications/{application_id}/role-connections/metadata - /// - /// - async fn update_application_role_connections_metadata<'application_id, 'application_role_connections_metadata_item_request>(&self, application_id: &'application_id str, application_role_connections_metadata_item_request: Option>) -> Result, Error>; - - /// PUT /users/@me/applications/{application_id}/role-connection - /// - /// - async fn update_application_user_role_connection<'application_id, 'update_application_user_role_connection_request>(&self, application_id: &'application_id str, update_application_user_role_connection_request: models::UpdateApplicationUserRoleConnectionRequest) -> Result, Error>; - - /// PATCH /guilds/{guild_id}/auto-moderation/rules/{rule_id} - /// - /// - async fn update_auto_moderation_rule<'guild_id, 'rule_id, 'update_auto_moderation_rule_request>(&self, guild_id: &'guild_id str, rule_id: &'rule_id str, update_auto_moderation_rule_request: models::UpdateAutoModerationRuleRequest) -> Result, Error>; - - /// PATCH /channels/{channel_id} - /// - /// - async fn update_channel<'channel_id, 'update_channel_request>(&self, channel_id: &'channel_id str, update_channel_request: models::UpdateChannelRequest) -> Result, Error>; - - /// PATCH /guilds/{guild_id} - /// - /// - async fn update_guild<'guild_id, 'guild_patch_request_partial>(&self, guild_id: &'guild_id str, guild_patch_request_partial: models::GuildPatchRequestPartial) -> Result, Error>; - - /// PATCH /applications/{application_id}/guilds/{guild_id}/commands/{command_id} - /// - /// - async fn update_guild_application_command<'application_id, 'guild_id, 'command_id, 'application_command_patch_request_partial>(&self, application_id: &'application_id str, guild_id: &'guild_id str, command_id: &'command_id str, application_command_patch_request_partial: models::ApplicationCommandPatchRequestPartial) -> Result, Error>; - - /// PATCH /guilds/{guild_id}/emojis/{emoji_id} - /// - /// - async fn update_guild_emoji<'guild_id, 'emoji_id, 'update_guild_emoji_request>(&self, guild_id: &'guild_id str, emoji_id: &'emoji_id str, update_guild_emoji_request: models::UpdateGuildEmojiRequest) -> Result, Error>; - - /// PATCH /guilds/{guild_id}/members/{user_id} - /// - /// - async fn update_guild_member<'guild_id, 'user_id, 'update_guild_member_request>(&self, guild_id: &'guild_id str, user_id: &'user_id str, update_guild_member_request: models::UpdateGuildMemberRequest) -> Result, Error>; - - /// PATCH /guilds/{guild_id}/roles/{role_id} - /// - /// - async fn update_guild_role<'guild_id, 'role_id, 'create_guild_role_request>(&self, guild_id: &'guild_id str, role_id: &'role_id str, create_guild_role_request: models::CreateGuildRoleRequest) -> Result, Error>; - - /// PATCH /guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id} - /// - /// - async fn update_guild_scheduled_event<'guild_id, 'guild_scheduled_event_id, 'update_guild_scheduled_event_request>(&self, guild_id: &'guild_id str, guild_scheduled_event_id: &'guild_scheduled_event_id str, update_guild_scheduled_event_request: models::UpdateGuildScheduledEventRequest) -> Result, Error>; - - /// PATCH /guilds/{guild_id}/soundboard-sounds/{sound_id} - /// - /// - async fn update_guild_soundboard_sound<'guild_id, 'sound_id, 'soundboard_patch_request_partial>(&self, guild_id: &'guild_id str, sound_id: &'sound_id str, soundboard_patch_request_partial: models::SoundboardPatchRequestPartial) -> Result, Error>; - - /// PATCH /guilds/{guild_id}/stickers/{sticker_id} - /// - /// - async fn update_guild_sticker<'guild_id, 'sticker_id, 'update_guild_sticker_request>(&self, guild_id: &'guild_id str, sticker_id: &'sticker_id str, update_guild_sticker_request: models::UpdateGuildStickerRequest) -> Result, Error>; - - /// PATCH /guilds/{guild_id}/templates/{code} - /// - /// - async fn update_guild_template<'guild_id, 'code, 'update_guild_template_request>(&self, guild_id: &'guild_id str, code: &'code str, update_guild_template_request: models::UpdateGuildTemplateRequest) -> Result, Error>; - - /// PATCH /guilds/{guild_id}/welcome-screen - /// - /// - async fn update_guild_welcome_screen<'guild_id, 'welcome_screen_patch_request_partial>(&self, guild_id: &'guild_id str, welcome_screen_patch_request_partial: models::WelcomeScreenPatchRequestPartial) -> Result, Error>; - - /// PATCH /guilds/{guild_id}/widget - /// - /// - async fn update_guild_widget_settings<'guild_id, 'update_guild_widget_settings_request>(&self, guild_id: &'guild_id str, update_guild_widget_settings_request: models::UpdateGuildWidgetSettingsRequest) -> Result, Error>; - - /// PATCH /channels/{channel_id}/messages/{message_id} - /// - /// - async fn update_message<'channel_id, 'message_id, 'message_edit_request_partial>(&self, channel_id: &'channel_id str, message_id: &'message_id str, message_edit_request_partial: models::MessageEditRequestPartial) -> Result, Error>; - - /// PATCH /applications/@me - /// - /// - async fn update_my_application<'application_form_partial>(&self, application_form_partial: models::ApplicationFormPartial) -> Result, Error>; - - /// PATCH /guilds/{guild_id}/members/@me - /// - /// - async fn update_my_guild_member<'guild_id, 'update_my_guild_member_request>(&self, guild_id: &'guild_id str, update_my_guild_member_request: models::UpdateMyGuildMemberRequest) -> Result, Error>; - - /// PATCH /users/@me - /// - /// - async fn update_my_user<'bot_account_patch_request>(&self, bot_account_patch_request: models::BotAccountPatchRequest) -> Result, Error>; - - /// PATCH /webhooks/{webhook_id}/{webhook_token}/messages/@original - /// - /// - async fn update_original_webhook_message<'webhook_id, 'webhook_token, 'incoming_webhook_update_request_partial, 'thread_id, 'with_components>(&self, webhook_id: &'webhook_id str, webhook_token: &'webhook_token str, incoming_webhook_update_request_partial: models::IncomingWebhookUpdateRequestPartial, thread_id: Option<&'thread_id str>, with_components: Option) -> Result, Error>; - - /// PATCH /guilds/{guild_id}/voice-states/@me - /// - /// - async fn update_self_voice_state<'guild_id, 'update_self_voice_state_request>(&self, guild_id: &'guild_id str, update_self_voice_state_request: models::UpdateSelfVoiceStateRequest) -> Result, Error>; - - /// PATCH /stage-instances/{channel_id} - /// - /// - async fn update_stage_instance<'channel_id, 'update_stage_instance_request>(&self, channel_id: &'channel_id str, update_stage_instance_request: models::UpdateStageInstanceRequest) -> Result, Error>; - - /// PATCH /guilds/{guild_id}/voice-states/{user_id} - /// - /// - async fn update_voice_state<'guild_id, 'user_id, 'update_voice_state_request>(&self, guild_id: &'guild_id str, user_id: &'user_id str, update_voice_state_request: models::UpdateVoiceStateRequest) -> Result, Error>; - - /// PATCH /webhooks/{webhook_id} - /// - /// - async fn update_webhook<'webhook_id, 'update_webhook_request>(&self, webhook_id: &'webhook_id str, update_webhook_request: models::UpdateWebhookRequest) -> Result, Error>; - - /// PATCH /webhooks/{webhook_id}/{webhook_token} - /// - /// - async fn update_webhook_by_token<'webhook_id, 'webhook_token, 'update_webhook_by_token_request>(&self, webhook_id: &'webhook_id str, webhook_token: &'webhook_token str, update_webhook_by_token_request: models::UpdateWebhookByTokenRequest) -> Result, Error>; - - /// PATCH /webhooks/{webhook_id}/{webhook_token}/messages/{message_id} - /// - /// - async fn update_webhook_message<'webhook_id, 'webhook_token, 'message_id, 'incoming_webhook_update_request_partial, 'thread_id, 'with_components>(&self, webhook_id: &'webhook_id str, webhook_token: &'webhook_token str, message_id: &'message_id str, incoming_webhook_update_request_partial: models::IncomingWebhookUpdateRequestPartial, thread_id: Option<&'thread_id str>, with_components: Option) -> Result, Error>; - - /// POST /applications/{application_id}/attachment - /// - /// - async fn upload_application_attachment<'application_id, 'file>(&self, application_id: &'application_id str, file: &'file str) -> Result, Error>; +use super::{Error, configuration, ContentType}; + + +/// struct for typed successes of method [`add_group_dm_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AddGroupDmUserSuccess { + Status201(models::AddGroupDmUser201Response), + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`add_guild_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AddGuildMemberSuccess { + Status201(models::GuildMemberResponse), + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`add_guild_member_role`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AddGuildMemberRoleSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`add_lobby_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AddLobbyMemberSuccess { + Status200(models::LobbyMemberResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`add_my_message_reaction`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AddMyMessageReactionSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`add_thread_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AddThreadMemberSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`applications_get_activity_instance`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApplicationsGetActivityInstanceSuccess { + Status200(models::EmbeddedActivityInstance), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`ban_user_from_guild`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BanUserFromGuildSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`bot_partner_sdk_token`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BotPartnerSdkTokenSuccess { + Status200(models::ProvisionalTokenResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`bulk_ban_users_from_guild`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BulkBanUsersFromGuildSuccess { + Status200(models::BulkBanUsersResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`bulk_delete_messages`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BulkDeleteMessagesSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`bulk_set_application_commands`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BulkSetApplicationCommandsSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`bulk_set_guild_application_commands`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BulkSetGuildApplicationCommandsSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`bulk_update_guild_channels`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BulkUpdateGuildChannelsSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`bulk_update_guild_roles`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BulkUpdateGuildRolesSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`bulk_update_lobby_members`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BulkUpdateLobbyMembersSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`consume_entitlement`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ConsumeEntitlementSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`create_application_command`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateApplicationCommandSuccess { + Status200(models::ApplicationCommandResponse), + Status201(models::ApplicationCommandResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`create_application_emoji`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateApplicationEmojiSuccess { + Status201(models::EmojiResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`create_auto_moderation_rule`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateAutoModerationRuleSuccess { + Status200(models::CreateAutoModerationRule200Response), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`create_channel_invite`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateChannelInviteSuccess { + Status200(models::CreateChannelInvite200Response), + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`create_dm`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateDmSuccess { + Status200(models::AddGroupDmUser201Response), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`create_entitlement`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateEntitlementSuccess { + Status200(models::EntitlementResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`create_guild_application_command`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateGuildApplicationCommandSuccess { + Status200(models::ApplicationCommandResponse), + Status201(models::ApplicationCommandResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`create_guild_channel`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateGuildChannelSuccess { + Status201(models::GuildChannelResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`create_guild_emoji`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateGuildEmojiSuccess { + Status201(models::EmojiResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`create_guild_role`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateGuildRoleSuccess { + Status200(models::GuildRoleResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`create_guild_scheduled_event`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateGuildScheduledEventSuccess { + Status200(models::ListGuildScheduledEvents200ResponseInner), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`create_guild_soundboard_sound`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateGuildSoundboardSoundSuccess { + Status201(models::SoundboardSoundResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`create_guild_sticker`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateGuildStickerSuccess { + Status201(models::GuildStickerResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`create_guild_template`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateGuildTemplateSuccess { + Status200(models::GuildTemplateResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`create_interaction_response`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateInteractionResponseSuccess { + Status200(models::InteractionCallbackResponse), + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`create_linked_lobby_guild_invite_for_self`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateLinkedLobbyGuildInviteForSelfSuccess { + Status200(models::LobbyGuildInviteResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`create_linked_lobby_guild_invite_for_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateLinkedLobbyGuildInviteForUserSuccess { + Status200(models::LobbyGuildInviteResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`create_lobby`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateLobbySuccess { + Status201(models::LobbyResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`create_lobby_message`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateLobbyMessageSuccess { + Status201(models::LobbyMessageResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`create_message`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateMessageSuccess { + Status200(models::MessageResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`create_or_join_lobby`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateOrJoinLobbySuccess { + Status200(models::LobbyResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`create_pin`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreatePinSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`create_stage_instance`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateStageInstanceSuccess { + Status200(models::StageInstanceResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`create_thread`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateThreadSuccess { + Status201(models::CreatedThreadResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`create_thread_from_message`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateThreadFromMessageSuccess { + Status201(models::ThreadResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`create_webhook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateWebhookSuccess { + Status200(models::GuildIncomingWebhookResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`crosspost_message`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CrosspostMessageSuccess { + Status200(models::MessageResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_all_message_reactions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteAllMessageReactionsSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_all_message_reactions_by_emoji`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteAllMessageReactionsByEmojiSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_application_command`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteApplicationCommandSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_application_emoji`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteApplicationEmojiSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_application_user_role_connection`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteApplicationUserRoleConnectionSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_auto_moderation_rule`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteAutoModerationRuleSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_channel`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteChannelSuccess { + Status200(models::GetChannel200Response), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_channel_permission_overwrite`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteChannelPermissionOverwriteSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_entitlement`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteEntitlementSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_group_dm_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGroupDmUserSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_guild`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGuildSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_guild_application_command`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGuildApplicationCommandSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_guild_emoji`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGuildEmojiSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_guild_integration`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGuildIntegrationSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_guild_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGuildMemberSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_guild_member_role`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGuildMemberRoleSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_guild_role`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGuildRoleSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_guild_scheduled_event`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGuildScheduledEventSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_guild_soundboard_sound`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGuildSoundboardSoundSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_guild_sticker`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGuildStickerSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_guild_template`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGuildTemplateSuccess { + Status200(models::GuildTemplateResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_lobby_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteLobbyMemberSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_message`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteMessageSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_my_message_reaction`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteMyMessageReactionSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_original_webhook_message`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteOriginalWebhookMessageSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_pin`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeletePinSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_stage_instance`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteStageInstanceSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_thread_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteThreadMemberSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_user_message_reaction`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteUserMessageReactionSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_webhook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteWebhookSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_webhook_by_token`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteWebhookByTokenSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`delete_webhook_message`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteWebhookMessageSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`deprecated_create_pin`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeprecatedCreatePinSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`deprecated_delete_pin`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeprecatedDeletePinSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`deprecated_list_pins`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeprecatedListPinsSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`edit_lobby`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum EditLobbySuccess { + Status200(models::LobbyResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`edit_lobby_channel_link`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum EditLobbyChannelLinkSuccess { + Status200(models::LobbyResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`execute_github_compatible_webhook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ExecuteGithubCompatibleWebhookSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`execute_slack_compatible_webhook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ExecuteSlackCompatibleWebhookSuccess { + Status200(String), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`execute_webhook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ExecuteWebhookSuccess { + Status200(models::MessageResponse), + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`follow_channel`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum FollowChannelSuccess { + Status200(models::ChannelFollowerResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_active_guild_threads`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetActiveGuildThreadsSuccess { + Status200(models::ThreadsResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_answer_voters`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetAnswerVotersSuccess { + Status200(models::PollAnswerDetailsResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_application`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetApplicationSuccess { + Status200(models::PrivateApplicationResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_application_command`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetApplicationCommandSuccess { + Status200(models::ApplicationCommandResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_application_emoji`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetApplicationEmojiSuccess { + Status200(models::EmojiResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_application_role_connections_metadata`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetApplicationRoleConnectionsMetadataSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_application_user_role_connection`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetApplicationUserRoleConnectionSuccess { + Status200(models::ApplicationUserRoleConnectionResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_auto_moderation_rule`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetAutoModerationRuleSuccess { + Status200(models::CreateAutoModerationRule200Response), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_bot_gateway`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetBotGatewaySuccess { + Status200(models::GatewayBotResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_channel`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetChannelSuccess { + Status200(models::GetChannel200Response), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_entitlement`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetEntitlementSuccess { + Status200(models::EntitlementResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_entitlements`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetEntitlementsSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_gateway`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGatewaySuccess { + Status200(models::GatewayResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_guild`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildSuccess { + Status200(models::GuildWithCountsResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_guild_application_command`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildApplicationCommandSuccess { + Status200(models::ApplicationCommandResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_guild_application_command_permissions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildApplicationCommandPermissionsSuccess { + Status200(models::CommandPermissionsResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_guild_ban`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildBanSuccess { + Status200(models::GuildBanResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_guild_emoji`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildEmojiSuccess { + Status200(models::EmojiResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_guild_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildMemberSuccess { + Status200(models::GuildMemberResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_guild_new_member_welcome`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildNewMemberWelcomeSuccess { + Status200(models::GuildHomeSettingsResponse), + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_guild_preview`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildPreviewSuccess { + Status200(models::GuildPreviewResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_guild_role`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildRoleSuccess { + Status200(models::GuildRoleResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_guild_scheduled_event`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildScheduledEventSuccess { + Status200(models::ListGuildScheduledEvents200ResponseInner), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_guild_soundboard_sound`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildSoundboardSoundSuccess { + Status200(models::SoundboardSoundResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_guild_sticker`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildStickerSuccess { + Status200(models::GuildStickerResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_guild_template`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildTemplateSuccess { + Status200(models::GuildTemplateResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_guild_vanity_url`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildVanityUrlSuccess { + Status200(models::VanityUrlResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_guild_webhooks`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildWebhooksSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_guild_welcome_screen`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildWelcomeScreenSuccess { + Status200(models::GuildWelcomeScreenResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_guild_widget`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildWidgetSuccess { + Status200(models::WidgetResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_guild_widget_png`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildWidgetPngSuccess { + Status200(String), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_guild_widget_settings`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildWidgetSettingsSuccess { + Status200(models::WidgetSettingsResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_guilds_onboarding`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildsOnboardingSuccess { + Status200(models::UserGuildOnboardingResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_lobby`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLobbySuccess { + Status200(models::LobbyResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_lobby_messages`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLobbyMessagesSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_message`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMessageSuccess { + Status200(models::MessageResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_my_application`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMyApplicationSuccess { + Status200(models::PrivateApplicationResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_my_guild_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMyGuildMemberSuccess { + Status200(models::PrivateGuildMemberResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_my_oauth2_application`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMyOauth2ApplicationSuccess { + Status200(models::PrivateApplicationResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_my_oauth2_authorization`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMyOauth2AuthorizationSuccess { + Status200(models::OAuth2GetAuthorizationResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_my_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMyUserSuccess { + Status200(models::UserPiiResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_openid_connect_userinfo`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetOpenidConnectUserinfoSuccess { + Status200(models::OAuth2GetOpenIdConnectUserInfoResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_original_webhook_message`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetOriginalWebhookMessageSuccess { + Status200(models::MessageResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_public_keys`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetPublicKeysSuccess { + Status200(models::OAuth2GetKeys), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_self_voice_state`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSelfVoiceStateSuccess { + Status200(models::VoiceStateResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_soundboard_default_sounds`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSoundboardDefaultSoundsSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_stage_instance`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStageInstanceSuccess { + Status200(models::StageInstanceResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_sticker`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStickerSuccess { + Status200(models::GetSticker200Response), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_sticker_pack`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStickerPackSuccess { + Status200(models::StickerPackResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_thread_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetThreadMemberSuccess { + Status200(models::ThreadMemberResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetUserSuccess { + Status200(models::UserResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_voice_state`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetVoiceStateSuccess { + Status200(models::VoiceStateResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_webhook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetWebhookSuccess { + Status200(models::ListChannelWebhooks200ResponseInner), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_webhook_by_token`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetWebhookByTokenSuccess { + Status200(models::ListChannelWebhooks200ResponseInner), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`get_webhook_message`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetWebhookMessageSuccess { + Status200(models::MessageResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`invite_resolve`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum InviteResolveSuccess { + Status200(models::CreateChannelInvite200Response), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`invite_revoke`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum InviteRevokeSuccess { + Status200(models::CreateChannelInvite200Response), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`join_thread`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum JoinThreadSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`leave_guild`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum LeaveGuildSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`leave_lobby`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum LeaveLobbySuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`leave_thread`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum LeaveThreadSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_application_commands`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListApplicationCommandsSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_application_emojis`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListApplicationEmojisSuccess { + Status200(models::ListApplicationEmojisResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_auto_moderation_rules`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListAutoModerationRulesSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_channel_invites`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListChannelInvitesSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_channel_webhooks`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListChannelWebhooksSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_guild_application_command_permissions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildApplicationCommandPermissionsSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_guild_application_commands`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildApplicationCommandsSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_guild_audit_log_entries`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildAuditLogEntriesSuccess { + Status200(models::GuildAuditLogResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_guild_bans`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildBansSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_guild_channels`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildChannelsSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_guild_emojis`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildEmojisSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_guild_integrations`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildIntegrationsSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_guild_invites`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildInvitesSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_guild_members`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildMembersSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_guild_roles`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildRolesSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_guild_scheduled_event_users`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildScheduledEventUsersSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_guild_scheduled_events`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildScheduledEventsSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_guild_soundboard_sounds`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildSoundboardSoundsSuccess { + Status200(models::ListGuildSoundboardSoundsResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_guild_stickers`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildStickersSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_guild_templates`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildTemplatesSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_guild_voice_regions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildVoiceRegionsSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_message_reactions_by_emoji`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListMessageReactionsByEmojiSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_messages`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListMessagesSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_my_connections`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListMyConnectionsSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_my_guilds`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListMyGuildsSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_my_private_archived_threads`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListMyPrivateArchivedThreadsSuccess { + Status200(models::ThreadsResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_pins`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListPinsSuccess { + Status200(models::PinnedMessagesResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_private_archived_threads`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListPrivateArchivedThreadsSuccess { + Status200(models::ThreadsResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_public_archived_threads`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListPublicArchivedThreadsSuccess { + Status200(models::ThreadsResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_sticker_packs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListStickerPacksSuccess { + Status200(models::StickerPackCollectionResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_thread_members`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListThreadMembersSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`list_voice_regions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListVoiceRegionsSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`partner_sdk_token`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum PartnerSdkTokenSuccess { + Status200(models::ProvisionalTokenResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`partner_sdk_unmerge_provisional_account`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum PartnerSdkUnmergeProvisionalAccountSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`poll_expire`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum PollExpireSuccess { + Status200(models::MessageResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`preview_prune_guild`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum PreviewPruneGuildSuccess { + Status200(models::GuildPruneResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`prune_guild`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum PruneGuildSuccess { + Status200(models::GuildPruneResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`put_guilds_onboarding`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum PutGuildsOnboardingSuccess { + Status200(models::GuildOnboardingResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`search_guild_members`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SearchGuildMembersSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`send_soundboard_sound`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SendSoundboardSoundSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`set_channel_permission_overwrite`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SetChannelPermissionOverwriteSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`set_guild_application_command_permissions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SetGuildApplicationCommandPermissionsSuccess { + Status200(models::CommandPermissionsResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`set_guild_mfa_level`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SetGuildMfaLevelSuccess { + Status200(models::GuildMfaLevelResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`sync_guild_template`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SyncGuildTemplateSuccess { + Status200(models::GuildTemplateResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`thread_search`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ThreadSearchSuccess { + Status200(models::ThreadSearchResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`trigger_typing_indicator`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum TriggerTypingIndicatorSuccess { + Status200(serde_json::Value), + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`unban_user_from_guild`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UnbanUserFromGuildSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_application`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateApplicationSuccess { + Status200(models::PrivateApplicationResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_application_command`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateApplicationCommandSuccess { + Status200(models::ApplicationCommandResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_application_emoji`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateApplicationEmojiSuccess { + Status200(models::EmojiResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_application_role_connections_metadata`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateApplicationRoleConnectionsMetadataSuccess { + Status200(Vec), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_application_user_role_connection`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateApplicationUserRoleConnectionSuccess { + Status200(models::ApplicationUserRoleConnectionResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_auto_moderation_rule`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateAutoModerationRuleSuccess { + Status200(models::CreateAutoModerationRule200Response), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_channel`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateChannelSuccess { + Status200(models::GetChannel200Response), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_guild`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateGuildSuccess { + Status200(models::GuildResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_guild_application_command`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateGuildApplicationCommandSuccess { + Status200(models::ApplicationCommandResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_guild_emoji`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateGuildEmojiSuccess { + Status200(models::EmojiResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_guild_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateGuildMemberSuccess { + Status200(models::GuildMemberResponse), + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_guild_role`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateGuildRoleSuccess { + Status200(models::GuildRoleResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_guild_scheduled_event`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateGuildScheduledEventSuccess { + Status200(models::ListGuildScheduledEvents200ResponseInner), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_guild_soundboard_sound`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateGuildSoundboardSoundSuccess { + Status200(models::SoundboardSoundResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_guild_sticker`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateGuildStickerSuccess { + Status200(models::GuildStickerResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_guild_template`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateGuildTemplateSuccess { + Status200(models::GuildTemplateResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_guild_welcome_screen`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateGuildWelcomeScreenSuccess { + Status200(models::GuildWelcomeScreenResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_guild_widget_settings`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateGuildWidgetSettingsSuccess { + Status200(models::WidgetSettingsResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_message`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateMessageSuccess { + Status200(models::MessageResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_my_application`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateMyApplicationSuccess { + Status200(models::PrivateApplicationResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_my_guild_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateMyGuildMemberSuccess { + Status200(models::PrivateGuildMemberResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_my_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateMyUserSuccess { + Status200(models::UserPiiResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_original_webhook_message`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateOriginalWebhookMessageSuccess { + Status200(models::MessageResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_self_voice_state`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateSelfVoiceStateSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_stage_instance`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateStageInstanceSuccess { + Status200(models::StageInstanceResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_voice_state`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateVoiceStateSuccess { + Status204(), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_webhook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateWebhookSuccess { + Status200(models::ListChannelWebhooks200ResponseInner), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_webhook_by_token`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateWebhookByTokenSuccess { + Status200(models::ListChannelWebhooks200ResponseInner), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`update_webhook_message`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateWebhookMessageSuccess { + Status200(models::MessageResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed successes of method [`upload_application_attachment`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UploadApplicationAttachmentSuccess { + Status200(models::ActivitiesAttachmentResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`add_group_dm_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AddGroupDmUserError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`add_guild_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AddGuildMemberError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`add_guild_member_role`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AddGuildMemberRoleError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`add_lobby_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AddLobbyMemberError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`add_my_message_reaction`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AddMyMessageReactionError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`add_thread_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum AddThreadMemberError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`applications_get_activity_instance`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ApplicationsGetActivityInstanceError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`ban_user_from_guild`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BanUserFromGuildError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`bot_partner_sdk_token`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BotPartnerSdkTokenError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`bulk_ban_users_from_guild`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BulkBanUsersFromGuildError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`bulk_delete_messages`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BulkDeleteMessagesError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`bulk_set_application_commands`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BulkSetApplicationCommandsError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`bulk_set_guild_application_commands`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BulkSetGuildApplicationCommandsError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`bulk_update_guild_channels`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BulkUpdateGuildChannelsError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`bulk_update_guild_roles`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BulkUpdateGuildRolesError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`bulk_update_lobby_members`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum BulkUpdateLobbyMembersError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`consume_entitlement`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ConsumeEntitlementError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_application_command`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateApplicationCommandError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_application_emoji`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateApplicationEmojiError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_auto_moderation_rule`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateAutoModerationRuleError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_channel_invite`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateChannelInviteError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_dm`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateDmError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_entitlement`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateEntitlementError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_guild_application_command`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateGuildApplicationCommandError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_guild_channel`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateGuildChannelError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_guild_emoji`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateGuildEmojiError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_guild_role`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateGuildRoleError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_guild_scheduled_event`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateGuildScheduledEventError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_guild_soundboard_sound`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateGuildSoundboardSoundError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_guild_sticker`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateGuildStickerError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_guild_template`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateGuildTemplateError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_interaction_response`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateInteractionResponseError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_linked_lobby_guild_invite_for_self`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateLinkedLobbyGuildInviteForSelfError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_linked_lobby_guild_invite_for_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateLinkedLobbyGuildInviteForUserError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_lobby`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateLobbyError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_lobby_message`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateLobbyMessageError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_message`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateMessageError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_or_join_lobby`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateOrJoinLobbyError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_pin`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreatePinError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_stage_instance`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateStageInstanceError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_thread`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateThreadError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_thread_from_message`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateThreadFromMessageError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`create_webhook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateWebhookError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`crosspost_message`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CrosspostMessageError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_all_message_reactions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteAllMessageReactionsError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_all_message_reactions_by_emoji`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteAllMessageReactionsByEmojiError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_application_command`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteApplicationCommandError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_application_emoji`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteApplicationEmojiError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_application_user_role_connection`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteApplicationUserRoleConnectionError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_auto_moderation_rule`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteAutoModerationRuleError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_channel`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteChannelError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_channel_permission_overwrite`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteChannelPermissionOverwriteError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_entitlement`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteEntitlementError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_group_dm_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGroupDmUserError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_guild`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGuildError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_guild_application_command`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGuildApplicationCommandError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_guild_emoji`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGuildEmojiError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_guild_integration`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGuildIntegrationError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_guild_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGuildMemberError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_guild_member_role`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGuildMemberRoleError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_guild_role`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGuildRoleError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_guild_scheduled_event`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGuildScheduledEventError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_guild_soundboard_sound`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGuildSoundboardSoundError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_guild_sticker`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGuildStickerError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_guild_template`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteGuildTemplateError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_lobby_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteLobbyMemberError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_message`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteMessageError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_my_message_reaction`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteMyMessageReactionError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_original_webhook_message`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteOriginalWebhookMessageError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_pin`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeletePinError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_stage_instance`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteStageInstanceError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_thread_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteThreadMemberError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_user_message_reaction`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteUserMessageReactionError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_webhook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteWebhookError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_webhook_by_token`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteWebhookByTokenError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_webhook_message`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteWebhookMessageError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`deprecated_create_pin`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeprecatedCreatePinError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`deprecated_delete_pin`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeprecatedDeletePinError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`deprecated_list_pins`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeprecatedListPinsError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`edit_lobby`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum EditLobbyError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`edit_lobby_channel_link`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum EditLobbyChannelLinkError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`execute_github_compatible_webhook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ExecuteGithubCompatibleWebhookError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`execute_slack_compatible_webhook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ExecuteSlackCompatibleWebhookError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`execute_webhook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ExecuteWebhookError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`follow_channel`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum FollowChannelError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_active_guild_threads`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetActiveGuildThreadsError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_answer_voters`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetAnswerVotersError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_application`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetApplicationError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_application_command`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetApplicationCommandError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_application_emoji`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetApplicationEmojiError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_application_role_connections_metadata`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetApplicationRoleConnectionsMetadataError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_application_user_role_connection`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetApplicationUserRoleConnectionError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_auto_moderation_rule`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetAutoModerationRuleError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_bot_gateway`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetBotGatewayError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_channel`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetChannelError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_entitlement`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetEntitlementError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_entitlements`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetEntitlementsError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_gateway`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGatewayError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_guild`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_guild_application_command`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildApplicationCommandError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_guild_application_command_permissions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildApplicationCommandPermissionsError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_guild_ban`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildBanError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_guild_emoji`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildEmojiError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_guild_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildMemberError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_guild_new_member_welcome`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildNewMemberWelcomeError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_guild_preview`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildPreviewError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_guild_role`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildRoleError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_guild_scheduled_event`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildScheduledEventError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_guild_soundboard_sound`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildSoundboardSoundError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_guild_sticker`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildStickerError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_guild_template`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildTemplateError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_guild_vanity_url`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildVanityUrlError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_guild_webhooks`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildWebhooksError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_guild_welcome_screen`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildWelcomeScreenError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_guild_widget`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildWidgetError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_guild_widget_png`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildWidgetPngError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_guild_widget_settings`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildWidgetSettingsError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_guilds_onboarding`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetGuildsOnboardingError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_lobby`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLobbyError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_lobby_messages`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetLobbyMessagesError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_message`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMessageError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_my_application`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMyApplicationError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_my_guild_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMyGuildMemberError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_my_oauth2_application`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMyOauth2ApplicationError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_my_oauth2_authorization`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMyOauth2AuthorizationError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_my_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetMyUserError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_openid_connect_userinfo`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetOpenidConnectUserinfoError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_original_webhook_message`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetOriginalWebhookMessageError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_public_keys`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetPublicKeysError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_self_voice_state`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSelfVoiceStateError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_soundboard_default_sounds`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetSoundboardDefaultSoundsError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_stage_instance`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStageInstanceError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_sticker`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStickerError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_sticker_pack`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetStickerPackError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_thread_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetThreadMemberError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetUserError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_voice_state`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetVoiceStateError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_webhook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetWebhookError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_webhook_by_token`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetWebhookByTokenError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`get_webhook_message`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetWebhookMessageError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`invite_resolve`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum InviteResolveError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`invite_revoke`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum InviteRevokeError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`join_thread`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum JoinThreadError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`leave_guild`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum LeaveGuildError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`leave_lobby`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum LeaveLobbyError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`leave_thread`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum LeaveThreadError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_application_commands`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListApplicationCommandsError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_application_emojis`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListApplicationEmojisError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_auto_moderation_rules`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListAutoModerationRulesError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_channel_invites`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListChannelInvitesError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_channel_webhooks`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListChannelWebhooksError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_guild_application_command_permissions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildApplicationCommandPermissionsError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_guild_application_commands`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildApplicationCommandsError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_guild_audit_log_entries`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildAuditLogEntriesError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_guild_bans`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildBansError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_guild_channels`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildChannelsError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_guild_emojis`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildEmojisError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_guild_integrations`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildIntegrationsError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_guild_invites`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildInvitesError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_guild_members`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildMembersError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_guild_roles`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildRolesError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_guild_scheduled_event_users`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildScheduledEventUsersError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_guild_scheduled_events`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildScheduledEventsError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_guild_soundboard_sounds`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildSoundboardSoundsError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_guild_stickers`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildStickersError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_guild_templates`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildTemplatesError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_guild_voice_regions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListGuildVoiceRegionsError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_message_reactions_by_emoji`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListMessageReactionsByEmojiError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_messages`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListMessagesError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_my_connections`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListMyConnectionsError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_my_guilds`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListMyGuildsError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_my_private_archived_threads`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListMyPrivateArchivedThreadsError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_pins`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListPinsError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_private_archived_threads`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListPrivateArchivedThreadsError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_public_archived_threads`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListPublicArchivedThreadsError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_sticker_packs`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListStickerPacksError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_thread_members`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListThreadMembersError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_voice_regions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListVoiceRegionsError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`partner_sdk_token`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum PartnerSdkTokenError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`partner_sdk_unmerge_provisional_account`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum PartnerSdkUnmergeProvisionalAccountError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`poll_expire`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum PollExpireError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`preview_prune_guild`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum PreviewPruneGuildError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`prune_guild`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum PruneGuildError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`put_guilds_onboarding`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum PutGuildsOnboardingError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`search_guild_members`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SearchGuildMembersError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`send_soundboard_sound`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SendSoundboardSoundError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`set_channel_permission_overwrite`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SetChannelPermissionOverwriteError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`set_guild_application_command_permissions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SetGuildApplicationCommandPermissionsError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`set_guild_mfa_level`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SetGuildMfaLevelError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`sync_guild_template`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum SyncGuildTemplateError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`thread_search`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ThreadSearchError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`trigger_typing_indicator`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum TriggerTypingIndicatorError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`unban_user_from_guild`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UnbanUserFromGuildError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_application`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateApplicationError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_application_command`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateApplicationCommandError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_application_emoji`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateApplicationEmojiError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_application_role_connections_metadata`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateApplicationRoleConnectionsMetadataError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_application_user_role_connection`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateApplicationUserRoleConnectionError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_auto_moderation_rule`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateAutoModerationRuleError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_channel`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateChannelError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_guild`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateGuildError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_guild_application_command`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateGuildApplicationCommandError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_guild_emoji`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateGuildEmojiError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_guild_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateGuildMemberError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_guild_role`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateGuildRoleError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_guild_scheduled_event`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateGuildScheduledEventError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_guild_soundboard_sound`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateGuildSoundboardSoundError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_guild_sticker`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateGuildStickerError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_guild_template`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateGuildTemplateError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_guild_welcome_screen`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateGuildWelcomeScreenError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_guild_widget_settings`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateGuildWidgetSettingsError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_message`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateMessageError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_my_application`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateMyApplicationError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_my_guild_member`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateMyGuildMemberError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_my_user`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateMyUserError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_original_webhook_message`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateOriginalWebhookMessageError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_self_voice_state`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateSelfVoiceStateError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_stage_instance`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateStageInstanceError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_voice_state`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateVoiceStateError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_webhook`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateWebhookError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_webhook_by_token`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateWebhookByTokenError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`update_webhook_message`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UpdateWebhookMessageError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`upload_application_attachment`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum UploadApplicationAttachmentError { + Status429(models::RatelimitedResponse), + Status4XX(models::ErrorResponse), + UnknownValue(serde_json::Value), +} + + +pub async fn add_group_dm_user(configuration: &configuration::Configuration, channel_id: &str, user_id: &str, add_group_dm_user_request: models::AddGroupDmUserRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_user_id = user_id; + let p_add_group_dm_user_request = add_group_dm_user_request; + + let uri_str = format!("{}/channels/{channel_id}/recipients/{user_id}", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id), user_id=crate::apis::urlencode(p_user_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_add_group_dm_user_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn add_guild_member(configuration: &configuration::Configuration, guild_id: &str, user_id: &str, bot_add_guild_member_request: models::BotAddGuildMemberRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_user_id = user_id; + let p_bot_add_guild_member_request = bot_add_guild_member_request; + + let uri_str = format!("{}/guilds/{guild_id}/members/{user_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), user_id=crate::apis::urlencode(p_user_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_bot_add_guild_member_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn add_guild_member_role(configuration: &configuration::Configuration, guild_id: &str, user_id: &str, role_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_user_id = user_id; + let p_role_id = role_id; + + let uri_str = format!("{}/guilds/{guild_id}/members/{user_id}/roles/{role_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), user_id=crate::apis::urlencode(p_user_id), role_id=crate::apis::urlencode(p_role_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn add_lobby_member(configuration: &configuration::Configuration, lobby_id: &str, user_id: &str, add_lobby_member_request: models::AddLobbyMemberRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_lobby_id = lobby_id; + let p_user_id = user_id; + let p_add_lobby_member_request = add_lobby_member_request; + + let uri_str = format!("{}/lobbies/{lobby_id}/members/{user_id}", configuration.base_path, lobby_id=crate::apis::urlencode(p_lobby_id), user_id=crate::apis::urlencode(p_user_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_add_lobby_member_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn add_my_message_reaction(configuration: &configuration::Configuration, channel_id: &str, message_id: &str, emoji_name: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_message_id = message_id; + let p_emoji_name = emoji_name; + + let uri_str = format!("{}/channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}/@me", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id), message_id=crate::apis::urlencode(p_message_id), emoji_name=crate::apis::urlencode(p_emoji_name)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn add_thread_member(configuration: &configuration::Configuration, channel_id: &str, user_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_user_id = user_id; + + let uri_str = format!("{}/channels/{channel_id}/thread-members/{user_id}", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id), user_id=crate::apis::urlencode(p_user_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn applications_get_activity_instance(configuration: &configuration::Configuration, application_id: &str, instance_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_instance_id = instance_id; + + let uri_str = format!("{}/applications/{application_id}/activity-instances/{instance_id}", configuration.base_path, application_id=crate::apis::urlencode(p_application_id), instance_id=crate::apis::urlencode(p_instance_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn ban_user_from_guild(configuration: &configuration::Configuration, guild_id: &str, user_id: &str, ban_user_from_guild_request: models::BanUserFromGuildRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_user_id = user_id; + let p_ban_user_from_guild_request = ban_user_from_guild_request; + + let uri_str = format!("{}/guilds/{guild_id}/bans/{user_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), user_id=crate::apis::urlencode(p_user_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_ban_user_from_guild_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn bot_partner_sdk_token(configuration: &configuration::Configuration, bot_partner_sdk_token_request: models::BotPartnerSdkTokenRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_bot_partner_sdk_token_request = bot_partner_sdk_token_request; + + let uri_str = format!("{}/partner-sdk/token/bot", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_bot_partner_sdk_token_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn bulk_ban_users_from_guild(configuration: &configuration::Configuration, guild_id: &str, bulk_ban_users_request: models::BulkBanUsersRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_bulk_ban_users_request = bulk_ban_users_request; + + let uri_str = format!("{}/guilds/{guild_id}/bulk-ban", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_bulk_ban_users_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn bulk_delete_messages(configuration: &configuration::Configuration, channel_id: &str, bulk_delete_messages_request: models::BulkDeleteMessagesRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_bulk_delete_messages_request = bulk_delete_messages_request; + + let uri_str = format!("{}/channels/{channel_id}/messages/bulk-delete", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_bulk_delete_messages_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn bulk_set_application_commands(configuration: &configuration::Configuration, application_id: &str, application_command_update_request: Option>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_application_command_update_request = application_command_update_request; + + let uri_str = format!("{}/applications/{application_id}/commands", configuration.base_path, application_id=crate::apis::urlencode(p_application_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_application_command_update_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn bulk_set_guild_application_commands(configuration: &configuration::Configuration, application_id: &str, guild_id: &str, application_command_update_request: Option>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_guild_id = guild_id; + let p_application_command_update_request = application_command_update_request; + + let uri_str = format!("{}/applications/{application_id}/guilds/{guild_id}/commands", configuration.base_path, application_id=crate::apis::urlencode(p_application_id), guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_application_command_update_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn bulk_update_guild_channels(configuration: &configuration::Configuration, guild_id: &str, bulk_update_guild_channels_request_inner: Vec) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_bulk_update_guild_channels_request_inner = bulk_update_guild_channels_request_inner; + + let uri_str = format!("{}/guilds/{guild_id}/channels", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_bulk_update_guild_channels_request_inner); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn bulk_update_guild_roles(configuration: &configuration::Configuration, guild_id: &str, update_role_positions_request: Vec) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_update_role_positions_request = update_role_positions_request; + + let uri_str = format!("{}/guilds/{guild_id}/roles", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_update_role_positions_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn bulk_update_lobby_members(configuration: &configuration::Configuration, lobby_id: &str, bulk_lobby_member_request: Option>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_lobby_id = lobby_id; + let p_bulk_lobby_member_request = bulk_lobby_member_request; + + let uri_str = format!("{}/lobbies/{lobby_id}/members/bulk", configuration.base_path, lobby_id=crate::apis::urlencode(p_lobby_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_bulk_lobby_member_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn consume_entitlement(configuration: &configuration::Configuration, application_id: &str, entitlement_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_entitlement_id = entitlement_id; + + let uri_str = format!("{}/applications/{application_id}/entitlements/{entitlement_id}/consume", configuration.base_path, application_id=crate::apis::urlencode(p_application_id), entitlement_id=crate::apis::urlencode(p_entitlement_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_application_command(configuration: &configuration::Configuration, application_id: &str, application_command_create_request: models::ApplicationCommandCreateRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_application_command_create_request = application_command_create_request; + + let uri_str = format!("{}/applications/{application_id}/commands", configuration.base_path, application_id=crate::apis::urlencode(p_application_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_application_command_create_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_application_emoji(configuration: &configuration::Configuration, application_id: &str, create_application_emoji_request: models::CreateApplicationEmojiRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_create_application_emoji_request = create_application_emoji_request; + + let uri_str = format!("{}/applications/{application_id}/emojis", configuration.base_path, application_id=crate::apis::urlencode(p_application_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_create_application_emoji_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_auto_moderation_rule(configuration: &configuration::Configuration, guild_id: &str, create_auto_moderation_rule_request: models::CreateAutoModerationRuleRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_create_auto_moderation_rule_request = create_auto_moderation_rule_request; + + let uri_str = format!("{}/guilds/{guild_id}/auto-moderation/rules", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_create_auto_moderation_rule_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_channel_invite(configuration: &configuration::Configuration, channel_id: &str, create_channel_invite_request: models::CreateChannelInviteRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_create_channel_invite_request = create_channel_invite_request; + + let uri_str = format!("{}/channels/{channel_id}/invites", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_create_channel_invite_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_dm(configuration: &configuration::Configuration, create_private_channel_request: models::CreatePrivateChannelRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_create_private_channel_request = create_private_channel_request; + + let uri_str = format!("{}/users/@me/channels", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_create_private_channel_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_entitlement(configuration: &configuration::Configuration, application_id: &str, create_entitlement_request_data: models::CreateEntitlementRequestData) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_create_entitlement_request_data = create_entitlement_request_data; + + let uri_str = format!("{}/applications/{application_id}/entitlements", configuration.base_path, application_id=crate::apis::urlencode(p_application_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_create_entitlement_request_data); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_guild_application_command(configuration: &configuration::Configuration, application_id: &str, guild_id: &str, application_command_create_request: models::ApplicationCommandCreateRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_guild_id = guild_id; + let p_application_command_create_request = application_command_create_request; + + let uri_str = format!("{}/applications/{application_id}/guilds/{guild_id}/commands", configuration.base_path, application_id=crate::apis::urlencode(p_application_id), guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_application_command_create_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_guild_channel(configuration: &configuration::Configuration, guild_id: &str, create_guild_channel_request: models::CreateGuildChannelRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_create_guild_channel_request = create_guild_channel_request; + + let uri_str = format!("{}/guilds/{guild_id}/channels", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_create_guild_channel_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_guild_emoji(configuration: &configuration::Configuration, guild_id: &str, create_guild_emoji_request: models::CreateGuildEmojiRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_create_guild_emoji_request = create_guild_emoji_request; + + let uri_str = format!("{}/guilds/{guild_id}/emojis", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_create_guild_emoji_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_guild_role(configuration: &configuration::Configuration, guild_id: &str, create_role_request: models::CreateRoleRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_create_role_request = create_role_request; + + let uri_str = format!("{}/guilds/{guild_id}/roles", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_create_role_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_guild_scheduled_event(configuration: &configuration::Configuration, guild_id: &str, create_guild_scheduled_event_request: models::CreateGuildScheduledEventRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_create_guild_scheduled_event_request = create_guild_scheduled_event_request; + + let uri_str = format!("{}/guilds/{guild_id}/scheduled-events", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_create_guild_scheduled_event_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_guild_soundboard_sound(configuration: &configuration::Configuration, guild_id: &str, soundboard_create_request: models::SoundboardCreateRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_soundboard_create_request = soundboard_create_request; + + let uri_str = format!("{}/guilds/{guild_id}/soundboard-sounds", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_soundboard_create_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_guild_sticker(configuration: &configuration::Configuration, guild_id: &str, name: &str, tags: &str, file: &str, description: Option<&str>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_name = name; + let p_tags = tags; + let p_file = file; + let p_description = description; + + let uri_str = format!("{}/guilds/{guild_id}/stickers", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + let mut multipart_form = reqwest::multipart::Form::new(); + multipart_form = multipart_form.text("name", p_name.to_string()); + multipart_form = multipart_form.text("tags", p_tags.to_string()); + if let Some(param_value) = p_description { + multipart_form = multipart_form.text("description", param_value.to_string()); + } + multipart_form = multipart_form.text("file", p_file.to_string()); + req_builder = req_builder.multipart(multipart_form); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_guild_template(configuration: &configuration::Configuration, guild_id: &str, create_guild_template_request: models::CreateGuildTemplateRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_create_guild_template_request = create_guild_template_request; + + let uri_str = format!("{}/guilds/{guild_id}/templates", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_create_guild_template_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_interaction_response(configuration: &configuration::Configuration, interaction_id: &str, interaction_token: &str, create_interaction_response_request: models::CreateInteractionResponseRequest, with_response: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_interaction_id = interaction_id; + let p_interaction_token = interaction_token; + let p_create_interaction_response_request = create_interaction_response_request; + let p_with_response = with_response; + + let uri_str = format!("{}/interactions/{interaction_id}/{interaction_token}/callback", configuration.base_path, interaction_id=crate::apis::urlencode(p_interaction_id), interaction_token=crate::apis::urlencode(p_interaction_token)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref param_value) = p_with_response { + req_builder = req_builder.query(&[("with_response", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_create_interaction_response_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_linked_lobby_guild_invite_for_self(configuration: &configuration::Configuration, lobby_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_lobby_id = lobby_id; + + let uri_str = format!("{}/lobbies/{lobby_id}/members/@me/invites", configuration.base_path, lobby_id=crate::apis::urlencode(p_lobby_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_linked_lobby_guild_invite_for_user(configuration: &configuration::Configuration, lobby_id: &str, user_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_lobby_id = lobby_id; + let p_user_id = user_id; + + let uri_str = format!("{}/lobbies/{lobby_id}/members/{user_id}/invites", configuration.base_path, lobby_id=crate::apis::urlencode(p_lobby_id), user_id=crate::apis::urlencode(p_user_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_lobby(configuration: &configuration::Configuration, create_lobby_request: models::CreateLobbyRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_create_lobby_request = create_lobby_request; + + let uri_str = format!("{}/lobbies", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_create_lobby_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_lobby_message(configuration: &configuration::Configuration, lobby_id: &str, sdk_message_request: models::SdkMessageRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_lobby_id = lobby_id; + let p_sdk_message_request = sdk_message_request; + + let uri_str = format!("{}/lobbies/{lobby_id}/messages", configuration.base_path, lobby_id=crate::apis::urlencode(p_lobby_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_sdk_message_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_message(configuration: &configuration::Configuration, channel_id: &str, message_create_request: models::MessageCreateRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_message_create_request = message_create_request; + + let uri_str = format!("{}/channels/{channel_id}/messages", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_message_create_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_or_join_lobby(configuration: &configuration::Configuration, create_or_join_lobby_request: models::CreateOrJoinLobbyRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_create_or_join_lobby_request = create_or_join_lobby_request; + + let uri_str = format!("{}/lobbies", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_create_or_join_lobby_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_pin(configuration: &configuration::Configuration, channel_id: &str, message_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_message_id = message_id; + + let uri_str = format!("{}/channels/{channel_id}/messages/pins/{message_id}", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id), message_id=crate::apis::urlencode(p_message_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_stage_instance(configuration: &configuration::Configuration, create_stage_instance_request: models::CreateStageInstanceRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_create_stage_instance_request = create_stage_instance_request; + + let uri_str = format!("{}/stage-instances", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_create_stage_instance_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_thread(configuration: &configuration::Configuration, channel_id: &str, create_thread_request: models::CreateThreadRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_create_thread_request = create_thread_request; + + let uri_str = format!("{}/channels/{channel_id}/threads", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_create_thread_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_thread_from_message(configuration: &configuration::Configuration, channel_id: &str, message_id: &str, create_text_thread_with_message_request: models::CreateTextThreadWithMessageRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_message_id = message_id; + let p_create_text_thread_with_message_request = create_text_thread_with_message_request; + + let uri_str = format!("{}/channels/{channel_id}/messages/{message_id}/threads", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id), message_id=crate::apis::urlencode(p_message_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_create_text_thread_with_message_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn create_webhook(configuration: &configuration::Configuration, channel_id: &str, create_webhook_request: models::CreateWebhookRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_create_webhook_request = create_webhook_request; + + let uri_str = format!("{}/channels/{channel_id}/webhooks", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_create_webhook_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn crosspost_message(configuration: &configuration::Configuration, channel_id: &str, message_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_message_id = message_id; + + let uri_str = format!("{}/channels/{channel_id}/messages/{message_id}/crosspost", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id), message_id=crate::apis::urlencode(p_message_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn delete_all_message_reactions(configuration: &configuration::Configuration, channel_id: &str, message_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_message_id = message_id; + + let uri_str = format!("{}/channels/{channel_id}/messages/{message_id}/reactions", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id), message_id=crate::apis::urlencode(p_message_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn delete_all_message_reactions_by_emoji(configuration: &configuration::Configuration, channel_id: &str, message_id: &str, emoji_name: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_message_id = message_id; + let p_emoji_name = emoji_name; + + let uri_str = format!("{}/channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id), message_id=crate::apis::urlencode(p_message_id), emoji_name=crate::apis::urlencode(p_emoji_name)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn delete_application_command(configuration: &configuration::Configuration, application_id: &str, command_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_command_id = command_id; + + let uri_str = format!("{}/applications/{application_id}/commands/{command_id}", configuration.base_path, application_id=crate::apis::urlencode(p_application_id), command_id=crate::apis::urlencode(p_command_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn delete_application_emoji(configuration: &configuration::Configuration, application_id: &str, emoji_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_emoji_id = emoji_id; + + let uri_str = format!("{}/applications/{application_id}/emojis/{emoji_id}", configuration.base_path, application_id=crate::apis::urlencode(p_application_id), emoji_id=crate::apis::urlencode(p_emoji_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn delete_application_user_role_connection(configuration: &configuration::Configuration, application_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + + let uri_str = format!("{}/users/@me/applications/{application_id}/role-connection", configuration.base_path, application_id=crate::apis::urlencode(p_application_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn delete_auto_moderation_rule(configuration: &configuration::Configuration, guild_id: &str, rule_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_rule_id = rule_id; + + let uri_str = format!("{}/guilds/{guild_id}/auto-moderation/rules/{rule_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), rule_id=crate::apis::urlencode(p_rule_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn delete_channel(configuration: &configuration::Configuration, channel_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + + let uri_str = format!("{}/channels/{channel_id}", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn delete_channel_permission_overwrite(configuration: &configuration::Configuration, channel_id: &str, overwrite_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_overwrite_id = overwrite_id; + + let uri_str = format!("{}/channels/{channel_id}/permissions/{overwrite_id}", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id), overwrite_id=crate::apis::urlencode(p_overwrite_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn delete_entitlement(configuration: &configuration::Configuration, application_id: &str, entitlement_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_entitlement_id = entitlement_id; + + let uri_str = format!("{}/applications/{application_id}/entitlements/{entitlement_id}", configuration.base_path, application_id=crate::apis::urlencode(p_application_id), entitlement_id=crate::apis::urlencode(p_entitlement_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn delete_group_dm_user(configuration: &configuration::Configuration, channel_id: &str, user_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_user_id = user_id; + + let uri_str = format!("{}/channels/{channel_id}/recipients/{user_id}", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id), user_id=crate::apis::urlencode(p_user_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -pub struct DefaultApiClient { - configuration: Arc -} - -impl DefaultApiClient { - pub fn new(configuration: Arc) -> Self { - Self { configuration } - } -} - - - -#[async_trait] -impl DefaultApi for DefaultApiClient { - async fn add_group_dm_user<'channel_id, 'user_id, 'add_group_dm_user_request>(&self, channel_id: &'channel_id str, user_id: &'user_id str, add_group_dm_user_request: models::AddGroupDmUserRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; +pub async fn delete_guild(configuration: &configuration::Configuration, guild_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; - let local_var_uri_str = format!("{}/channels/{channel_id}/recipients/{user_id}", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id), user_id=crate::apis::urlencode(user_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + let uri_str = format!("{}/guilds/{guild_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; - local_var_req_builder = local_var_req_builder.json(&add_group_dm_user_request); + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let status = resp.status(); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) } +} - async fn add_guild_member<'guild_id, 'user_id, 'add_guild_member_request>(&self, guild_id: &'guild_id str, user_id: &'user_id str, add_guild_member_request: models::AddGuildMemberRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; +pub async fn delete_guild_application_command(configuration: &configuration::Configuration, application_id: &str, guild_id: &str, command_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_guild_id = guild_id; + let p_command_id = command_id; - let local_var_uri_str = format!("{}/guilds/{guild_id}/members/{user_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), user_id=crate::apis::urlencode(user_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + let uri_str = format!("{}/applications/{application_id}/guilds/{guild_id}/commands/{command_id}", configuration.base_path, application_id=crate::apis::urlencode(p_application_id), guild_id=crate::apis::urlencode(p_guild_id), command_id=crate::apis::urlencode(p_command_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; - local_var_req_builder = local_var_req_builder.json(&add_guild_member_request); + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let status = resp.status(); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) } +} - async fn add_guild_member_role<'guild_id, 'user_id, 'role_id>(&self, guild_id: &'guild_id str, user_id: &'user_id str, role_id: &'role_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; +pub async fn delete_guild_emoji(configuration: &configuration::Configuration, guild_id: &str, emoji_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_emoji_id = emoji_id; - let local_var_uri_str = format!("{}/guilds/{guild_id}/members/{user_id}/roles/{role_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), user_id=crate::apis::urlencode(user_id), role_id=crate::apis::urlencode(role_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + let uri_str = format!("{}/guilds/{guild_id}/emojis/{emoji_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), emoji_id=crate::apis::urlencode(p_emoji_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn add_lobby_member<'lobby_id, 'user_id, 'add_lobby_member_request>(&self, lobby_id: &'lobby_id str, user_id: &'user_id str, add_lobby_member_request: models::AddLobbyMemberRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/lobbies/{lobby_id}/members/{user_id}", local_var_configuration.base_path, lobby_id=crate::apis::urlencode(lobby_id), user_id=crate::apis::urlencode(user_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&add_lobby_member_request); + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let status = resp.status(); - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn add_my_message_reaction<'channel_id, 'message_id, 'emoji_name>(&self, channel_id: &'channel_id str, message_id: &'message_id str, emoji_name: &'emoji_name str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}/@me", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id), message_id=crate::apis::urlencode(message_id), emoji_name=crate::apis::urlencode(emoji_name)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; +pub async fn delete_guild_integration(configuration: &configuration::Configuration, guild_id: &str, integration_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_integration_id = integration_id; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn add_thread_member<'channel_id, 'user_id>(&self, channel_id: &'channel_id str, user_id: &'user_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/thread-members/{user_id}", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id), user_id=crate::apis::urlencode(user_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; + let uri_str = format!("{}/guilds/{guild_id}/integrations/{integration_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), integration_id=crate::apis::urlencode(p_integration_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn applications_get_activity_instance<'application_id, 'instance_id>(&self, application_id: &'application_id str, instance_id: &'instance_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/applications/{application_id}/activity-instances/{instance_id}", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id), instance_id=crate::apis::urlencode(instance_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn ban_user_from_guild<'guild_id, 'user_id, 'ban_user_from_guild_request>(&self, guild_id: &'guild_id str, user_id: &'user_id str, ban_user_from_guild_request: models::BanUserFromGuildRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/bans/{user_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), user_id=crate::apis::urlencode(user_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&ban_user_from_guild_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let status = resp.status(); - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn bulk_ban_users_from_guild<'guild_id, 'bulk_ban_users_from_guild_request>(&self, guild_id: &'guild_id str, bulk_ban_users_from_guild_request: models::BulkBanUsersFromGuildRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/bulk-ban", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&bulk_ban_users_from_guild_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn bulk_delete_messages<'channel_id, 'bulk_delete_messages_request>(&self, channel_id: &'channel_id str, bulk_delete_messages_request: models::BulkDeleteMessagesRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; +pub async fn delete_guild_member(configuration: &configuration::Configuration, guild_id: &str, user_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_user_id = user_id; - let local_var_client = &local_var_configuration.client; + let uri_str = format!("{}/guilds/{guild_id}/members/{user_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), user_id=crate::apis::urlencode(p_user_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); - let local_var_uri_str = format!("{}/channels/{channel_id}/messages/bulk-delete", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; - local_var_req_builder = local_var_req_builder.json(&bulk_delete_messages_request); + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) } +} - async fn bulk_set_application_commands<'application_id, 'application_command_update_request>(&self, application_id: &'application_id str, application_command_update_request: Option>) -> Result, Error> { - let local_var_configuration = &self.configuration; +pub async fn delete_guild_member_role(configuration: &configuration::Configuration, guild_id: &str, user_id: &str, role_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_user_id = user_id; + let p_role_id = role_id; - let local_var_client = &local_var_configuration.client; + let uri_str = format!("{}/guilds/{guild_id}/members/{user_id}/roles/{role_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), user_id=crate::apis::urlencode(p_user_id), role_id=crate::apis::urlencode(p_role_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); - let local_var_uri_str = format!("{}/applications/{application_id}/commands", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&application_command_update_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn bulk_set_guild_application_commands<'application_id, 'guild_id, 'application_command_update_request>(&self, application_id: &'application_id str, guild_id: &'guild_id str, application_command_update_request: Option>) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/applications/{application_id}/guilds/{guild_id}/commands", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id), guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; - local_var_req_builder = local_var_req_builder.json(&application_command_update_request); + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let status = resp.status(); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - async fn bulk_update_guild_channels<'guild_id, 'bulk_update_guild_channels_request_inner>(&self, guild_id: &'guild_id str, bulk_update_guild_channels_request_inner: Vec) -> Result, Error> { - let local_var_configuration = &self.configuration; +pub async fn delete_guild_role(configuration: &configuration::Configuration, guild_id: &str, role_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_role_id = role_id; - let local_var_client = &local_var_configuration.client; + let uri_str = format!("{}/guilds/{guild_id}/roles/{role_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), role_id=crate::apis::urlencode(p_role_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); - let local_var_uri_str = format!("{}/guilds/{guild_id}/channels", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; - local_var_req_builder = local_var_req_builder.json(&bulk_update_guild_channels_request_inner); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn bulk_update_guild_roles<'guild_id, 'bulk_update_guild_roles_request_inner>(&self, guild_id: &'guild_id str, bulk_update_guild_roles_request_inner: Vec) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/roles", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); + req_builder = req_builder.header("Authorization", value); + }; - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&bulk_update_guild_roles_request_inner); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn bulk_update_lobby_members<'lobby_id, 'bulk_lobby_member_request>(&self, lobby_id: &'lobby_id str, bulk_lobby_member_request: Option>) -> Result, Error> { - let local_var_configuration = &self.configuration; +pub async fn delete_guild_scheduled_event(configuration: &configuration::Configuration, guild_id: &str, guild_scheduled_event_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_guild_scheduled_event_id = guild_scheduled_event_id; - let local_var_client = &local_var_configuration.client; + let uri_str = format!("{}/guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), guild_scheduled_event_id=crate::apis::urlencode(p_guild_scheduled_event_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); - let local_var_uri_str = format!("{}/lobbies/{lobby_id}/members/bulk", local_var_configuration.base_path, lobby_id=crate::apis::urlencode(lobby_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; - local_var_req_builder = local_var_req_builder.json(&bulk_lobby_member_request); + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let status = resp.status(); - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) } +} - async fn consume_entitlement<'application_id, 'entitlement_id>(&self, application_id: &'application_id str, entitlement_id: &'entitlement_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; +pub async fn delete_guild_soundboard_sound(configuration: &configuration::Configuration, guild_id: &str, sound_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_sound_id = sound_id; - let local_var_client = &local_var_configuration.client; + let uri_str = format!("{}/guilds/{guild_id}/soundboard-sounds/{sound_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), sound_id=crate::apis::urlencode(p_sound_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); - let local_var_uri_str = format!("{}/applications/{application_id}/entitlements/{entitlement_id}/consume", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id), entitlement_id=crate::apis::urlencode(entitlement_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } - - async fn create_application_command<'application_id, 'application_command_create_request>(&self, application_id: &'application_id str, application_command_create_request: models::ApplicationCommandCreateRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/applications/{application_id}/commands", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; - local_var_req_builder = local_var_req_builder.json(&application_command_create_request); + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let status = resp.status(); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - async fn create_application_emoji<'application_id, 'create_application_emoji_request>(&self, application_id: &'application_id str, create_application_emoji_request: models::CreateApplicationEmojiRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; +pub async fn delete_guild_sticker(configuration: &configuration::Configuration, guild_id: &str, sticker_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_sticker_id = sticker_id; - let local_var_client = &local_var_configuration.client; + let uri_str = format!("{}/guilds/{guild_id}/stickers/{sticker_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), sticker_id=crate::apis::urlencode(p_sticker_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); - let local_var_uri_str = format!("{}/applications/{application_id}/emojis", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; - local_var_req_builder = local_var_req_builder.json(&create_application_emoji_request); + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn create_auto_moderation_rule<'guild_id, 'create_auto_moderation_rule_request>(&self, guild_id: &'guild_id str, create_auto_moderation_rule_request: models::CreateAutoModerationRuleRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/auto-moderation/rules", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&create_auto_moderation_rule_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn create_channel_invite<'channel_id, 'create_channel_invite_request>(&self, channel_id: &'channel_id str, create_channel_invite_request: models::CreateChannelInviteRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/invites", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&create_channel_invite_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn create_dm<'create_private_channel_request>(&self, create_private_channel_request: models::CreatePrivateChannelRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/users/@me/channels", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&create_private_channel_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn create_entitlement<'application_id, 'create_entitlement_request_data>(&self, application_id: &'application_id str, create_entitlement_request_data: models::CreateEntitlementRequestData) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/applications/{application_id}/entitlements", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&create_entitlement_request_data); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn create_guild<'guild_create_request>(&self, guild_create_request: models::GuildCreateRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&guild_create_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn create_guild_application_command<'application_id, 'guild_id, 'application_command_create_request>(&self, application_id: &'application_id str, guild_id: &'guild_id str, application_command_create_request: models::ApplicationCommandCreateRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/applications/{application_id}/guilds/{guild_id}/commands", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id), guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&application_command_create_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn create_guild_channel<'guild_id, 'create_guild_channel_request>(&self, guild_id: &'guild_id str, create_guild_channel_request: models::CreateGuildChannelRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/channels", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&create_guild_channel_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn create_guild_emoji<'guild_id, 'create_guild_emoji_request>(&self, guild_id: &'guild_id str, create_guild_emoji_request: models::CreateGuildEmojiRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/emojis", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&create_guild_emoji_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn create_guild_from_template<'code, 'create_guild_from_template_request>(&self, code: &'code str, create_guild_from_template_request: models::CreateGuildFromTemplateRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/templates/{code}", local_var_configuration.base_path, code=crate::apis::urlencode(code)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&create_guild_from_template_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn create_guild_role<'guild_id, 'create_guild_role_request>(&self, guild_id: &'guild_id str, create_guild_role_request: models::CreateGuildRoleRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/roles", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&create_guild_role_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn create_guild_scheduled_event<'guild_id, 'create_guild_scheduled_event_request>(&self, guild_id: &'guild_id str, create_guild_scheduled_event_request: models::CreateGuildScheduledEventRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/scheduled-events", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&create_guild_scheduled_event_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn create_guild_soundboard_sound<'guild_id, 'soundboard_create_request>(&self, guild_id: &'guild_id str, soundboard_create_request: models::SoundboardCreateRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/soundboard-sounds", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&soundboard_create_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn create_guild_sticker<'guild_id, 'name, 'tags, 'file, 'description>(&self, guild_id: &'guild_id str, name: &'name str, tags: &'tags str, file: &'file str, description: Option<&'description str>) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/stickers", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - let mut local_var_form = reqwest::multipart::Form::new(); - local_var_form = local_var_form.text("name", name.to_string()); - local_var_form = local_var_form.text("tags", tags.to_string()); - if let Some(local_var_param_value) = description { - local_var_form = local_var_form.text("description", local_var_param_value.to_string()); - } - local_var_form = local_var_form.text("file", file.to_string()); - local_var_req_builder = local_var_req_builder.multipart(local_var_form); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn create_guild_template<'guild_id, 'create_guild_template_request>(&self, guild_id: &'guild_id str, create_guild_template_request: models::CreateGuildTemplateRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/templates", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&create_guild_template_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn create_interaction_response<'interaction_id, 'interaction_token, 'create_interaction_response_request, 'with_response>(&self, interaction_id: &'interaction_id str, interaction_token: &'interaction_token str, create_interaction_response_request: models::CreateInteractionResponseRequest, with_response: Option) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/interactions/{interaction_id}/{interaction_token}/callback", local_var_configuration.base_path, interaction_id=crate::apis::urlencode(interaction_id), interaction_token=crate::apis::urlencode(interaction_token)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref param_value) = with_response { - local_var_req_builder = local_var_req_builder.query(&[("with_response", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&create_interaction_response_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn create_lobby<'create_lobby_request>(&self, create_lobby_request: models::CreateLobbyRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/lobbies", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&create_lobby_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn create_lobby_message<'lobby_id, 'sdk_message_request>(&self, lobby_id: &'lobby_id str, sdk_message_request: models::SdkMessageRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/lobbies/{lobby_id}/messages", local_var_configuration.base_path, lobby_id=crate::apis::urlencode(lobby_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&sdk_message_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn create_message<'channel_id, 'message_create_request>(&self, channel_id: &'channel_id str, message_create_request: models::MessageCreateRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/messages", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&message_create_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; +pub async fn delete_guild_template(configuration: &configuration::Configuration, guild_id: &str, code: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_code = code; - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn create_or_join_lobby<'create_or_join_lobby_request>(&self, create_or_join_lobby_request: models::CreateOrJoinLobbyRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/lobbies", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + let uri_str = format!("{}/guilds/{guild_id}/templates/{code}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), code=crate::apis::urlencode(p_code)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; - local_var_req_builder = local_var_req_builder.json(&create_or_join_lobby_request); + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn create_pin<'channel_id, 'message_id>(&self, channel_id: &'channel_id str, message_id: &'message_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/messages/pins/{message_id}", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id), message_id=crate::apis::urlencode(message_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn create_stage_instance<'create_stage_instance_request>(&self, create_stage_instance_request: models::CreateStageInstanceRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/stage-instances", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&create_stage_instance_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn create_thread<'channel_id, 'create_thread_request>(&self, channel_id: &'channel_id str, create_thread_request: models::CreateThreadRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/threads", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&create_thread_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn create_thread_from_message<'channel_id, 'message_id, 'create_text_thread_with_message_request>(&self, channel_id: &'channel_id str, message_id: &'message_id str, create_text_thread_with_message_request: models::CreateTextThreadWithMessageRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/messages/{message_id}/threads", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id), message_id=crate::apis::urlencode(message_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&create_text_thread_with_message_request); + let status = resp.status(); - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn create_webhook<'channel_id, 'create_webhook_request>(&self, channel_id: &'channel_id str, create_webhook_request: models::CreateWebhookRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/webhooks", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&create_webhook_request); + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn delete_lobby_member(configuration: &configuration::Configuration, lobby_id: &str, user_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_lobby_id = lobby_id; + let p_user_id = user_id; + + let uri_str = format!("{}/lobbies/{lobby_id}/members/{user_id}", configuration.base_path, lobby_id=crate::apis::urlencode(p_lobby_id), user_id=crate::apis::urlencode(p_user_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn crosspost_message<'channel_id, 'message_id>(&self, channel_id: &'channel_id str, message_id: &'message_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/messages/{message_id}/crosspost", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id), message_id=crate::apis::urlencode(message_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn delete_all_message_reactions<'channel_id, 'message_id>(&self, channel_id: &'channel_id str, message_id: &'message_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; + let status = resp.status(); - let local_var_client = &local_var_configuration.client; + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_uri_str = format!("{}/channels/{channel_id}/messages/{message_id}/reactions", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id), message_id=crate::apis::urlencode(message_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); +pub async fn delete_message(configuration: &configuration::Configuration, channel_id: &str, message_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_message_id = message_id; - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; + let uri_str = format!("{}/channels/{channel_id}/messages/{message_id}", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id), message_id=crate::apis::urlencode(p_message_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn delete_all_message_reactions_by_emoji<'channel_id, 'message_id, 'emoji_name>(&self, channel_id: &'channel_id str, message_id: &'message_id str, emoji_name: &'emoji_name str) -> Result, Error> { - let local_var_configuration = &self.configuration; + let status = resp.status(); - let local_var_client = &local_var_configuration.client; + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_uri_str = format!("{}/channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id), message_id=crate::apis::urlencode(message_id), emoji_name=crate::apis::urlencode(emoji_name)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); +pub async fn delete_my_message_reaction(configuration: &configuration::Configuration, channel_id: &str, message_id: &str, emoji_name: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_message_id = message_id; + let p_emoji_name = emoji_name; - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; + let uri_str = format!("{}/channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}/@me", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id), message_id=crate::apis::urlencode(p_message_id), emoji_name=crate::apis::urlencode(p_emoji_name)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } + let status = resp.status(); - async fn delete_application_command<'application_id, 'command_id>(&self, application_id: &'application_id str, command_id: &'command_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_client = &local_var_configuration.client; +pub async fn delete_original_webhook_message(configuration: &configuration::Configuration, webhook_id: &str, webhook_token: &str, thread_id: Option<&str>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_webhook_id = webhook_id; + let p_webhook_token = webhook_token; + let p_thread_id = thread_id; - let local_var_uri_str = format!("{}/applications/{application_id}/commands/{command_id}", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id), command_id=crate::apis::urlencode(command_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + let uri_str = format!("{}/webhooks/{webhook_id}/{webhook_token}/messages/@original", configuration.base_path, webhook_id=crate::apis::urlencode(p_webhook_id), webhook_token=crate::apis::urlencode(p_webhook_token)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref param_value) = p_thread_id { + req_builder = req_builder.query(&[("thread_id", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let status = resp.status(); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) } +} - async fn delete_application_emoji<'application_id, 'emoji_id>(&self, application_id: &'application_id str, emoji_id: &'emoji_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; +pub async fn delete_pin(configuration: &configuration::Configuration, channel_id: &str, message_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_message_id = message_id; - let local_var_uri_str = format!("{}/applications/{application_id}/emojis/{emoji_id}", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id), emoji_id=crate::apis::urlencode(emoji_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + let uri_str = format!("{}/channels/{channel_id}/messages/pins/{message_id}", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id), message_id=crate::apis::urlencode(p_message_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let status = resp.status(); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) } +} - async fn delete_application_user_role_connection<'application_id>(&self, application_id: &'application_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; +pub async fn delete_stage_instance(configuration: &configuration::Configuration, channel_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; - let local_var_uri_str = format!("{}/users/@me/applications/{application_id}/role-connection", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + let uri_str = format!("{}/stage-instances/{channel_id}", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let status = resp.status(); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) } +} - async fn delete_auto_moderation_rule<'guild_id, 'rule_id>(&self, guild_id: &'guild_id str, rule_id: &'rule_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; +pub async fn delete_thread_member(configuration: &configuration::Configuration, channel_id: &str, user_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_user_id = user_id; - let local_var_uri_str = format!("{}/guilds/{guild_id}/auto-moderation/rules/{rule_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), rule_id=crate::apis::urlencode(rule_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + let uri_str = format!("{}/channels/{channel_id}/thread-members/{user_id}", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id), user_id=crate::apis::urlencode(p_user_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let status = resp.status(); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) } +} - async fn delete_channel<'channel_id>(&self, channel_id: &'channel_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; +pub async fn delete_user_message_reaction(configuration: &configuration::Configuration, channel_id: &str, message_id: &str, emoji_name: &str, user_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_message_id = message_id; + let p_emoji_name = emoji_name; + let p_user_id = user_id; - let local_var_uri_str = format!("{}/channels/{channel_id}", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + let uri_str = format!("{}/channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}/{user_id}", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id), message_id=crate::apis::urlencode(p_message_id), emoji_name=crate::apis::urlencode(p_emoji_name), user_id=crate::apis::urlencode(p_user_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let status = resp.status(); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) } +} - async fn delete_channel_permission_overwrite<'channel_id, 'overwrite_id>(&self, channel_id: &'channel_id str, overwrite_id: &'overwrite_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; +pub async fn delete_webhook(configuration: &configuration::Configuration, webhook_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_webhook_id = webhook_id; - let local_var_uri_str = format!("{}/channels/{channel_id}/permissions/{overwrite_id}", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id), overwrite_id=crate::apis::urlencode(overwrite_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + let uri_str = format!("{}/webhooks/{webhook_id}", configuration.base_path, webhook_id=crate::apis::urlencode(p_webhook_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let status = resp.status(); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn delete_entitlement<'application_id, 'entitlement_id>(&self, application_id: &'application_id str, entitlement_id: &'entitlement_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_client = &local_var_configuration.client; +pub async fn delete_webhook_by_token(configuration: &configuration::Configuration, webhook_id: &str, webhook_token: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_webhook_id = webhook_id; + let p_webhook_token = webhook_token; - let local_var_uri_str = format!("{}/applications/{application_id}/entitlements/{entitlement_id}", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id), entitlement_id=crate::apis::urlencode(entitlement_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + let uri_str = format!("{}/webhooks/{webhook_id}/{webhook_token}", configuration.base_path, webhook_id=crate::apis::urlencode(p_webhook_id), webhook_token=crate::apis::urlencode(p_webhook_token)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); - async fn delete_group_dm_user<'channel_id, 'user_id>(&self, channel_id: &'channel_id str, user_id: &'user_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_client = &local_var_configuration.client; +pub async fn delete_webhook_message(configuration: &configuration::Configuration, webhook_id: &str, webhook_token: &str, message_id: &str, thread_id: Option<&str>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_webhook_id = webhook_id; + let p_webhook_token = webhook_token; + let p_message_id = message_id; + let p_thread_id = thread_id; - let local_var_uri_str = format!("{}/channels/{channel_id}/recipients/{user_id}", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id), user_id=crate::apis::urlencode(user_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + let uri_str = format!("{}/webhooks/{webhook_id}/{webhook_token}/messages/{message_id}", configuration.base_path, webhook_id=crate::apis::urlencode(p_webhook_id), webhook_token=crate::apis::urlencode(p_webhook_token), message_id=crate::apis::urlencode(p_message_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref param_value) = p_thread_id { + req_builder = req_builder.query(&[("thread_id", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let status = resp.status(); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) } +} - async fn delete_guild<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; +pub async fn deprecated_create_pin(configuration: &configuration::Configuration, channel_id: &str, message_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_message_id = message_id; - let local_var_uri_str = format!("{}/guilds/{guild_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + let uri_str = format!("{}/channels/{channel_id}/pins/{message_id}", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id), message_id=crate::apis::urlencode(p_message_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let status = resp.status(); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn delete_guild_application_command<'application_id, 'guild_id, 'command_id>(&self, application_id: &'application_id str, guild_id: &'guild_id str, command_id: &'command_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_client = &local_var_configuration.client; +pub async fn deprecated_delete_pin(configuration: &configuration::Configuration, channel_id: &str, message_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_message_id = message_id; - let local_var_uri_str = format!("{}/applications/{application_id}/guilds/{guild_id}/commands/{command_id}", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id), guild_id=crate::apis::urlencode(guild_id), command_id=crate::apis::urlencode(command_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); + let uri_str = format!("{}/channels/{channel_id}/pins/{message_id}", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id), message_id=crate::apis::urlencode(p_message_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) } +} - async fn delete_guild_emoji<'guild_id, 'emoji_id>(&self, guild_id: &'guild_id str, emoji_id: &'emoji_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; +pub async fn deprecated_list_pins(configuration: &configuration::Configuration, channel_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/emojis/{emoji_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), emoji_id=crate::apis::urlencode(emoji_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + let uri_str = format!("{}/channels/{channel_id}/pins", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) } +} + +pub async fn edit_lobby(configuration: &configuration::Configuration, lobby_id: &str, create_lobby_request: models::CreateLobbyRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_lobby_id = lobby_id; + let p_create_lobby_request = create_lobby_request; - async fn delete_guild_integration<'guild_id, 'integration_id>(&self, guild_id: &'guild_id str, integration_id: &'integration_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; + let uri_str = format!("{}/lobbies/{lobby_id}", configuration.base_path, lobby_id=crate::apis::urlencode(p_lobby_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/integrations/{integration_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), integration_id=crate::apis::urlencode(integration_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_create_lobby_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } +pub async fn edit_lobby_channel_link(configuration: &configuration::Configuration, lobby_id: &str, edit_lobby_channel_link_request: models::EditLobbyChannelLinkRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_lobby_id = lobby_id; + let p_edit_lobby_channel_link_request = edit_lobby_channel_link_request; - async fn delete_guild_member<'guild_id, 'user_id>(&self, guild_id: &'guild_id str, user_id: &'user_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/members/{user_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), user_id=crate::apis::urlencode(user_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + let uri_str = format!("{}/lobbies/{lobby_id}/channel-linking", configuration.base_path, lobby_id=crate::apis::urlencode(p_lobby_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_edit_lobby_channel_link_request); - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn delete_guild_member_role<'guild_id, 'user_id, 'role_id>(&self, guild_id: &'guild_id str, user_id: &'user_id str, role_id: &'role_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/members/{user_id}/roles/{role_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), user_id=crate::apis::urlencode(user_id), role_id=crate::apis::urlencode(role_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn execute_github_compatible_webhook(configuration: &configuration::Configuration, webhook_id: &str, webhook_token: &str, github_webhook: models::GithubWebhook, wait: Option, thread_id: Option<&str>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_webhook_id = webhook_id; + let p_webhook_token = webhook_token; + let p_github_webhook = github_webhook; + let p_wait = wait; + let p_thread_id = thread_id; + + let uri_str = format!("{}/webhooks/{webhook_id}/{webhook_token}/github", configuration.base_path, webhook_id=crate::apis::urlencode(p_webhook_id), webhook_token=crate::apis::urlencode(p_webhook_token)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref param_value) = p_wait { + req_builder = req_builder.query(&[("wait", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_thread_id { + req_builder = req_builder.query(&[("thread_id", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_github_webhook); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; +pub async fn execute_slack_compatible_webhook(configuration: &configuration::Configuration, webhook_id: &str, webhook_token: &str, slack_webhook: models::SlackWebhook, wait: Option, thread_id: Option<&str>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_webhook_id = webhook_id; + let p_webhook_token = webhook_token; + let p_slack_webhook = slack_webhook; + let p_wait = wait; + let p_thread_id = thread_id; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn delete_guild_role<'guild_id, 'role_id>(&self, guild_id: &'guild_id str, role_id: &'role_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/roles/{role_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), role_id=crate::apis::urlencode(role_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + let uri_str = format!("{}/webhooks/{webhook_id}/{webhook_token}/slack", configuration.base_path, webhook_id=crate::apis::urlencode(p_webhook_id), webhook_token=crate::apis::urlencode(p_webhook_token)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref param_value) = p_wait { + req_builder = req_builder.query(&[("wait", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_thread_id { + req_builder = req_builder.query(&[("thread_id", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_slack_webhook); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn execute_webhook(configuration: &configuration::Configuration, webhook_id: &str, webhook_token: &str, execute_webhook_request: models::ExecuteWebhookRequest, wait: Option, thread_id: Option<&str>, with_components: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_webhook_id = webhook_id; + let p_webhook_token = webhook_token; + let p_execute_webhook_request = execute_webhook_request; + let p_wait = wait; + let p_thread_id = thread_id; + let p_with_components = with_components; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let uri_str = format!("{}/webhooks/{webhook_id}/{webhook_token}", configuration.base_path, webhook_id=crate::apis::urlencode(p_webhook_id), webhook_token=crate::apis::urlencode(p_webhook_token)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn delete_guild_scheduled_event<'guild_id, 'guild_scheduled_event_id>(&self, guild_id: &'guild_id str, guild_scheduled_event_id: &'guild_scheduled_event_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), guild_scheduled_event_id=crate::apis::urlencode(guild_scheduled_event_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref param_value) = p_wait { + req_builder = req_builder.query(&[("wait", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_thread_id { + req_builder = req_builder.query(&[("thread_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_with_components { + req_builder = req_builder.query(&[("with_components", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_execute_webhook_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn follow_channel(configuration: &configuration::Configuration, channel_id: &str, follow_channel_request: models::FollowChannelRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_follow_channel_request = follow_channel_request; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let uri_str = format!("{}/channels/{channel_id}/followers", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn delete_guild_soundboard_sound<'guild_id, 'sound_id>(&self, guild_id: &'guild_id str, sound_id: &'sound_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/soundboard-sounds/{sound_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), sound_id=crate::apis::urlencode(sound_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_follow_channel_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; +pub async fn get_active_guild_threads(configuration: &configuration::Configuration, guild_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn delete_guild_sticker<'guild_id, 'sticker_id>(&self, guild_id: &'guild_id str, sticker_id: &'sticker_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/stickers/{sticker_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), sticker_id=crate::apis::urlencode(sticker_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + let uri_str = format!("{}/guilds/{guild_id}/threads/active", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_answer_voters(configuration: &configuration::Configuration, channel_id: &str, message_id: &str, answer_id: i32, after: Option<&str>, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_message_id = message_id; + let p_answer_id = answer_id; + let p_after = after; + let p_limit = limit; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let uri_str = format!("{}/channels/{channel_id}/polls/{message_id}/answers/{answer_id}", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id), message_id=crate::apis::urlencode(p_message_id), answer_id=p_answer_id); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn delete_guild_template<'guild_id, 'code>(&self, guild_id: &'guild_id str, code: &'code str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/templates/{code}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), code=crate::apis::urlencode(code)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref param_value) = p_after { + req_builder = req_builder.query(&[("after", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; +pub async fn get_application(configuration: &configuration::Configuration, application_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn delete_lobby_member<'lobby_id, 'user_id>(&self, lobby_id: &'lobby_id str, user_id: &'user_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/lobbies/{lobby_id}/members/{user_id}", local_var_configuration.base_path, lobby_id=crate::apis::urlencode(lobby_id), user_id=crate::apis::urlencode(user_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + let uri_str = format!("{}/applications/{application_id}", configuration.base_path, application_id=crate::apis::urlencode(p_application_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn delete_message<'channel_id, 'message_id>(&self, channel_id: &'channel_id str, message_id: &'message_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/messages/{message_id}", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id), message_id=crate::apis::urlencode(message_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; +pub async fn get_application_command(configuration: &configuration::Configuration, application_id: &str, command_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_command_id = command_id; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn delete_my_message_reaction<'channel_id, 'message_id, 'emoji_name>(&self, channel_id: &'channel_id str, message_id: &'message_id str, emoji_name: &'emoji_name str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}/@me", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id), message_id=crate::apis::urlencode(message_id), emoji_name=crate::apis::urlencode(emoji_name)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let uri_str = format!("{}/applications/{application_id}/commands/{command_id}", configuration.base_path, application_id=crate::apis::urlencode(p_application_id), command_id=crate::apis::urlencode(p_command_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn delete_original_webhook_message<'webhook_id, 'webhook_token, 'thread_id>(&self, webhook_id: &'webhook_id str, webhook_token: &'webhook_token str, thread_id: Option<&'thread_id str>) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/webhooks/{webhook_id}/{webhook_token}/messages/@original", local_var_configuration.base_path, webhook_id=crate::apis::urlencode(webhook_id), webhook_token=crate::apis::urlencode(webhook_token)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref param_value) = thread_id { - local_var_req_builder = local_var_req_builder.query(&[("thread_id", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn delete_pin<'channel_id, 'message_id>(&self, channel_id: &'channel_id str, message_id: &'message_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/messages/pins/{message_id}", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id), message_id=crate::apis::urlencode(message_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_application_emoji(configuration: &configuration::Configuration, application_id: &str, emoji_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_emoji_id = emoji_id; + + let uri_str = format!("{}/applications/{application_id}/emojis/{emoji_id}", configuration.base_path, application_id=crate::apis::urlencode(p_application_id), emoji_id=crate::apis::urlencode(p_emoji_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn delete_stage_instance<'channel_id>(&self, channel_id: &'channel_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/stage-instances/{channel_id}", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_application_role_connections_metadata(configuration: &configuration::Configuration, application_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + + let uri_str = format!("{}/applications/{application_id}/role-connections/metadata", configuration.base_path, application_id=crate::apis::urlencode(p_application_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_application_user_role_connection(configuration: &configuration::Configuration, application_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + + let uri_str = format!("{}/users/@me/applications/{application_id}/role-connection", configuration.base_path, application_id=crate::apis::urlencode(p_application_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn delete_thread_member<'channel_id, 'user_id>(&self, channel_id: &'channel_id str, user_id: &'user_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/thread-members/{user_id}", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id), user_id=crate::apis::urlencode(user_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_auto_moderation_rule(configuration: &configuration::Configuration, guild_id: &str, rule_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_rule_id = rule_id; + + let uri_str = format!("{}/guilds/{guild_id}/auto-moderation/rules/{rule_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), rule_id=crate::apis::urlencode(p_rule_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn delete_user_message_reaction<'channel_id, 'message_id, 'emoji_name, 'user_id>(&self, channel_id: &'channel_id str, message_id: &'message_id str, emoji_name: &'emoji_name str, user_id: &'user_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}/{user_id}", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id), message_id=crate::apis::urlencode(message_id), emoji_name=crate::apis::urlencode(emoji_name), user_id=crate::apis::urlencode(user_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_bot_gateway(configuration: &configuration::Configuration, ) -> Result, Error> { + + let uri_str = format!("{}/gateway/bot", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let status = resp.status(); - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn delete_webhook<'webhook_id>(&self, webhook_id: &'webhook_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/webhooks/{webhook_id}", local_var_configuration.base_path, webhook_id=crate::apis::urlencode(webhook_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn delete_webhook_by_token<'webhook_id, 'webhook_token>(&self, webhook_id: &'webhook_id str, webhook_token: &'webhook_token str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/webhooks/{webhook_id}/{webhook_token}", local_var_configuration.base_path, webhook_id=crate::apis::urlencode(webhook_id), webhook_token=crate::apis::urlencode(webhook_token)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; +pub async fn get_channel(configuration: &configuration::Configuration, channel_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn delete_webhook_message<'webhook_id, 'webhook_token, 'message_id, 'thread_id>(&self, webhook_id: &'webhook_id str, webhook_token: &'webhook_token str, message_id: &'message_id str, thread_id: Option<&'thread_id str>) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/webhooks/{webhook_id}/{webhook_token}/messages/{message_id}", local_var_configuration.base_path, webhook_id=crate::apis::urlencode(webhook_id), webhook_token=crate::apis::urlencode(webhook_token), message_id=crate::apis::urlencode(message_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref param_value) = thread_id { - local_var_req_builder = local_var_req_builder.query(&[("thread_id", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + let uri_str = format!("{}/channels/{channel_id}", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_entitlement(configuration: &configuration::Configuration, application_id: &str, entitlement_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_entitlement_id = entitlement_id; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn deprecated_create_pin<'channel_id, 'message_id>(&self, channel_id: &'channel_id str, message_id: &'message_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/pins/{message_id}", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id), message_id=crate::apis::urlencode(message_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + let uri_str = format!("{}/applications/{application_id}/entitlements/{entitlement_id}", configuration.base_path, application_id=crate::apis::urlencode(p_application_id), entitlement_id=crate::apis::urlencode(p_entitlement_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn deprecated_delete_pin<'channel_id, 'message_id>(&self, channel_id: &'channel_id str, message_id: &'message_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/pins/{message_id}", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id), message_id=crate::apis::urlencode(message_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn deprecated_list_pins<'channel_id>(&self, channel_id: &'channel_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; + let status = resp.status(); - let local_var_uri_str = format!("{}/channels/{channel_id}/pins", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; +pub async fn get_entitlements(configuration: &configuration::Configuration, application_id: &str, user_id: Option<&str>, sku_ids: Option<&str>, guild_id: Option<&str>, before: Option<&str>, after: Option<&str>, limit: Option, exclude_ended: Option, exclude_deleted: Option, only_active: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_user_id = user_id; + let p_sku_ids = sku_ids; + let p_guild_id = guild_id; + let p_before = before; + let p_after = after; + let p_limit = limit; + let p_exclude_ended = exclude_ended; + let p_exclude_deleted = exclude_deleted; + let p_only_active = only_active; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let uri_str = format!("{}/applications/{application_id}/entitlements", configuration.base_path, application_id=crate::apis::urlencode(p_application_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn edit_lobby<'lobby_id, 'create_lobby_request>(&self, lobby_id: &'lobby_id str, create_lobby_request: models::CreateLobbyRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/lobbies/{lobby_id}", local_var_configuration.base_path, lobby_id=crate::apis::urlencode(lobby_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&create_lobby_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn edit_lobby_channel_link<'lobby_id, 'edit_lobby_channel_link_request>(&self, lobby_id: &'lobby_id str, edit_lobby_channel_link_request: models::EditLobbyChannelLinkRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/lobbies/{lobby_id}/channel-linking", local_var_configuration.base_path, lobby_id=crate::apis::urlencode(lobby_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&edit_lobby_channel_link_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn execute_github_compatible_webhook<'webhook_id, 'webhook_token, 'github_webhook, 'wait, 'thread_id>(&self, webhook_id: &'webhook_id str, webhook_token: &'webhook_token str, github_webhook: models::GithubWebhook, wait: Option, thread_id: Option<&'thread_id str>) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/webhooks/{webhook_id}/{webhook_token}/github", local_var_configuration.base_path, webhook_id=crate::apis::urlencode(webhook_id), webhook_token=crate::apis::urlencode(webhook_token)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref param_value) = wait { - local_var_req_builder = local_var_req_builder.query(&[("wait", ¶m_value.to_string())]); - } - if let Some(ref param_value) = thread_id { - local_var_req_builder = local_var_req_builder.query(&[("thread_id", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&github_webhook); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn execute_slack_compatible_webhook<'webhook_id, 'webhook_token, 'slack_webhook, 'wait, 'thread_id>(&self, webhook_id: &'webhook_id str, webhook_token: &'webhook_token str, slack_webhook: models::SlackWebhook, wait: Option, thread_id: Option<&'thread_id str>) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/webhooks/{webhook_id}/{webhook_token}/slack", local_var_configuration.base_path, webhook_id=crate::apis::urlencode(webhook_id), webhook_token=crate::apis::urlencode(webhook_token)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref param_value) = wait { - local_var_req_builder = local_var_req_builder.query(&[("wait", ¶m_value.to_string())]); - } - if let Some(ref param_value) = thread_id { - local_var_req_builder = local_var_req_builder.query(&[("thread_id", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&slack_webhook); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn execute_webhook<'webhook_id, 'webhook_token, 'execute_webhook_request, 'wait, 'thread_id, 'with_components>(&self, webhook_id: &'webhook_id str, webhook_token: &'webhook_token str, execute_webhook_request: models::ExecuteWebhookRequest, wait: Option, thread_id: Option<&'thread_id str>, with_components: Option) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/webhooks/{webhook_id}/{webhook_token}", local_var_configuration.base_path, webhook_id=crate::apis::urlencode(webhook_id), webhook_token=crate::apis::urlencode(webhook_token)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref param_value) = wait { - local_var_req_builder = local_var_req_builder.query(&[("wait", ¶m_value.to_string())]); - } - if let Some(ref param_value) = thread_id { - local_var_req_builder = local_var_req_builder.query(&[("thread_id", ¶m_value.to_string())]); - } - if let Some(ref param_value) = with_components { - local_var_req_builder = local_var_req_builder.query(&[("with_components", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&execute_webhook_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn follow_channel<'channel_id, 'follow_channel_request>(&self, channel_id: &'channel_id str, follow_channel_request: models::FollowChannelRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/followers", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&follow_channel_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_active_guild_threads<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/threads/active", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_answer_voters<'channel_id, 'message_id, 'answer_id, 'after, 'limit>(&self, channel_id: &'channel_id str, message_id: &'message_id str, answer_id: i32, after: Option<&'after str>, limit: Option) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/polls/{message_id}/answers/{answer_id}", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id), message_id=crate::apis::urlencode(message_id), answer_id=answer_id); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref param_value) = after { - local_var_req_builder = local_var_req_builder.query(&[("after", ¶m_value.to_string())]); - } - if let Some(ref param_value) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_application<'application_id>(&self, application_id: &'application_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/applications/{application_id}", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_application_command<'application_id, 'command_id>(&self, application_id: &'application_id str, command_id: &'command_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/applications/{application_id}/commands/{command_id}", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id), command_id=crate::apis::urlencode(command_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if let Some(ref param_value) = p_user_id { + req_builder = req_builder.query(&[("user_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_sku_ids { + req_builder = req_builder.query(&[("sku_ids", &serde_json::to_string(param_value)?)]); + } + if let Some(ref param_value) = p_guild_id { + req_builder = req_builder.query(&[("guild_id", ¶m_value.to_string())]); } + if let Some(ref param_value) = p_before { + req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_after { + req_builder = req_builder.query(&[("after", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_exclude_ended { + req_builder = req_builder.query(&[("exclude_ended", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_exclude_deleted { + req_builder = req_builder.query(&[("exclude_deleted", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_only_active { + req_builder = req_builder.query(&[("only_active", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; - async fn get_application_emoji<'application_id, 'emoji_id>(&self, application_id: &'application_id str, emoji_id: &'emoji_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_client = &local_var_configuration.client; + let status = resp.status(); - let local_var_uri_str = format!("{}/applications/{application_id}/emojis/{emoji_id}", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id), emoji_id=crate::apis::urlencode(emoji_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_gateway(configuration: &configuration::Configuration, ) -> Result, Error> { + + let uri_str = format!("{}/gateway", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let status = resp.status(); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) } +} + +pub async fn get_guild(configuration: &configuration::Configuration, guild_id: &str, with_counts: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_with_counts = with_counts; + + let uri_str = format!("{}/guilds/{guild_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - async fn get_application_role_connections_metadata<'application_id>(&self, application_id: &'application_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; + if let Some(ref param_value) = p_with_counts { + req_builder = req_builder.query(&[("with_counts", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_client = &local_var_configuration.client; +pub async fn get_guild_application_command(configuration: &configuration::Configuration, application_id: &str, guild_id: &str, command_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_guild_id = guild_id; + let p_command_id = command_id; - let local_var_uri_str = format!("{}/applications/{application_id}/role-connections/metadata", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let uri_str = format!("{}/applications/{application_id}/guilds/{guild_id}/commands/{command_id}", configuration.base_path, application_id=crate::apis::urlencode(p_application_id), guild_id=crate::apis::urlencode(p_guild_id), command_id=crate::apis::urlencode(p_command_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let status = resp.status(); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) } +} - async fn get_application_user_role_connection<'application_id>(&self, application_id: &'application_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; +pub async fn get_guild_application_command_permissions(configuration: &configuration::Configuration, application_id: &str, guild_id: &str, command_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_guild_id = guild_id; + let p_command_id = command_id; - let local_var_uri_str = format!("{}/users/@me/applications/{application_id}/role-connection", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let uri_str = format!("{}/applications/{application_id}/guilds/{guild_id}/commands/{command_id}/permissions", configuration.base_path, application_id=crate::apis::urlencode(p_application_id), guild_id=crate::apis::urlencode(p_guild_id), command_id=crate::apis::urlencode(p_command_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let status = resp.status(); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) } +} - async fn get_auto_moderation_rule<'guild_id, 'rule_id>(&self, guild_id: &'guild_id str, rule_id: &'rule_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; +pub async fn get_guild_ban(configuration: &configuration::Configuration, guild_id: &str, user_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_user_id = user_id; - let local_var_uri_str = format!("{}/guilds/{guild_id}/auto-moderation/rules/{rule_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), rule_id=crate::apis::urlencode(rule_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let uri_str = format!("{}/guilds/{guild_id}/bans/{user_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), user_id=crate::apis::urlencode(p_user_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let status = resp.status(); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) } +} - async fn get_bot_gateway<>(&self, ) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; +pub async fn get_guild_emoji(configuration: &configuration::Configuration, guild_id: &str, emoji_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_emoji_id = emoji_id; - let local_var_uri_str = format!("{}/gateway/bot", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let uri_str = format!("{}/guilds/{guild_id}/emojis/{emoji_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), emoji_id=crate::apis::urlencode(p_emoji_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } + let status = resp.status(); - async fn get_channel<'channel_id>(&self, channel_id: &'channel_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_entitlement<'application_id, 'entitlement_id>(&self, application_id: &'application_id str, entitlement_id: &'entitlement_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/applications/{application_id}/entitlements/{entitlement_id}", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id), entitlement_id=crate::apis::urlencode(entitlement_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_entitlements<'sku_ids, 'application_id, 'user_id, 'guild_id, 'before, 'after, 'limit, 'exclude_ended, 'exclude_deleted, 'only_active>(&self, sku_ids: &'sku_ids str, application_id: &'application_id str, user_id: Option<&'user_id str>, guild_id: Option<&'guild_id str>, before: Option<&'before str>, after: Option<&'after str>, limit: Option, exclude_ended: Option, exclude_deleted: Option, only_active: Option) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/applications/{application_id}/entitlements", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref param_value) = user_id { - local_var_req_builder = local_var_req_builder.query(&[("user_id", ¶m_value.to_string())]); - } - local_var_req_builder = local_var_req_builder.query(&[("sku_ids", &sku_ids.to_string())]); - if let Some(ref param_value) = guild_id { - local_var_req_builder = local_var_req_builder.query(&[("guild_id", ¶m_value.to_string())]); - } - if let Some(ref param_value) = before { - local_var_req_builder = local_var_req_builder.query(&[("before", ¶m_value.to_string())]); - } - if let Some(ref param_value) = after { - local_var_req_builder = local_var_req_builder.query(&[("after", ¶m_value.to_string())]); - } - if let Some(ref param_value) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref param_value) = exclude_ended { - local_var_req_builder = local_var_req_builder.query(&[("exclude_ended", ¶m_value.to_string())]); - } - if let Some(ref param_value) = exclude_deleted { - local_var_req_builder = local_var_req_builder.query(&[("exclude_deleted", ¶m_value.to_string())]); - } - if let Some(ref param_value) = only_active { - local_var_req_builder = local_var_req_builder.query(&[("only_active", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_gateway<>(&self, ) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/gateway", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_guild<'guild_id, 'with_counts>(&self, guild_id: &'guild_id str, with_counts: Option) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref param_value) = with_counts { - local_var_req_builder = local_var_req_builder.query(&[("with_counts", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) } +} - async fn get_guild_application_command<'application_id, 'guild_id, 'command_id>(&self, application_id: &'application_id str, guild_id: &'guild_id str, command_id: &'command_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; +pub async fn get_guild_member(configuration: &configuration::Configuration, guild_id: &str, user_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_user_id = user_id; - let local_var_client = &local_var_configuration.client; + let uri_str = format!("{}/guilds/{guild_id}/members/{user_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), user_id=crate::apis::urlencode(p_user_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - let local_var_uri_str = format!("{}/applications/{application_id}/guilds/{guild_id}/commands/{command_id}", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id), guild_id=crate::apis::urlencode(guild_id), command_id=crate::apis::urlencode(command_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + req_builder = req_builder.header("Authorization", value); + }; - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_guild_application_command_permissions<'application_id, 'guild_id, 'command_id>(&self, application_id: &'application_id str, guild_id: &'guild_id str, command_id: &'command_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/applications/{application_id}/guilds/{guild_id}/commands/{command_id}/permissions", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id), guild_id=crate::apis::urlencode(guild_id), command_id=crate::apis::urlencode(command_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let status = resp.status(); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; +pub async fn get_guild_new_member_welcome(configuration: &configuration::Configuration, guild_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let uri_str = format!("{}/guilds/{guild_id}/new-member-welcome", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; - async fn get_guild_ban<'guild_id, 'user_id>(&self, guild_id: &'guild_id str, user_id: &'user_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_client = &local_var_configuration.client; + let status = resp.status(); - let local_var_uri_str = format!("{}/guilds/{guild_id}/bans/{user_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), user_id=crate::apis::urlencode(user_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; +pub async fn get_guild_preview(configuration: &configuration::Configuration, guild_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let uri_str = format!("{}/guilds/{guild_id}/preview", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; - async fn get_guild_emoji<'guild_id, 'emoji_id>(&self, guild_id: &'guild_id str, emoji_id: &'emoji_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/emojis/{emoji_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), emoji_id=crate::apis::urlencode(emoji_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; + let status = resp.status(); - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - async fn get_guild_member<'guild_id, 'user_id>(&self, guild_id: &'guild_id str, user_id: &'user_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/members/{user_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), user_id=crate::apis::urlencode(user_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; +pub async fn get_guild_role(configuration: &configuration::Configuration, guild_id: &str, role_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_role_id = role_id; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let uri_str = format!("{}/guilds/{guild_id}/roles/{role_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), role_id=crate::apis::urlencode(p_role_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_guild_new_member_welcome<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/new-member-welcome", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_guild_preview<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/preview", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let status = resp.status(); - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_guild_role<'guild_id, 'role_id>(&self, guild_id: &'guild_id str, role_id: &'role_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/roles/{role_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), role_id=crate::apis::urlencode(role_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_guild_scheduled_event<'guild_id, 'guild_scheduled_event_id, 'with_user_count>(&self, guild_id: &'guild_id str, guild_scheduled_event_id: &'guild_scheduled_event_id str, with_user_count: Option) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), guild_scheduled_event_id=crate::apis::urlencode(guild_scheduled_event_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref param_value) = with_user_count { - local_var_req_builder = local_var_req_builder.query(&[("with_user_count", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; +pub async fn get_guild_scheduled_event(configuration: &configuration::Configuration, guild_id: &str, guild_scheduled_event_id: &str, with_user_count: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_guild_scheduled_event_id = guild_scheduled_event_id; + let p_with_user_count = with_user_count; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_guild_soundboard_sound<'guild_id, 'sound_id>(&self, guild_id: &'guild_id str, sound_id: &'sound_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/soundboard-sounds/{sound_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), sound_id=crate::apis::urlencode(sound_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; + let uri_str = format!("{}/guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), guild_scheduled_event_id=crate::apis::urlencode(p_guild_scheduled_event_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_guild_sticker<'guild_id, 'sticker_id>(&self, guild_id: &'guild_id str, sticker_id: &'sticker_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/stickers/{sticker_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), sticker_id=crate::apis::urlencode(sticker_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref param_value) = p_with_user_count { + req_builder = req_builder.query(&[("with_user_count", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_guild_template<'code>(&self, code: &'code str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/templates/{code}", local_var_configuration.base_path, code=crate::apis::urlencode(code)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let status = resp.status(); - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_guild_vanity_url<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/vanity-url", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; +pub async fn get_guild_soundboard_sound(configuration: &configuration::Configuration, guild_id: &str, sound_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_sound_id = sound_id; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_guild_webhooks<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/webhooks", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; + let uri_str = format!("{}/guilds/{guild_id}/soundboard-sounds/{sound_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), sound_id=crate::apis::urlencode(p_sound_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_guild_welcome_screen<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/welcome-screen", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_guild_widget<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/widget.json", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let status = resp.status(); - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_guild_widget_png<'guild_id, 'style>(&self, guild_id: &'guild_id str, style: Option<&'style str>) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/widget.png", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref param_value) = style { - local_var_req_builder = local_var_req_builder.query(&[("style", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_guild_widget_settings<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/widget", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; +pub async fn get_guild_sticker(configuration: &configuration::Configuration, guild_id: &str, sticker_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_sticker_id = sticker_id; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_guilds_onboarding<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/onboarding", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_lobby<'lobby_id>(&self, lobby_id: &'lobby_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/lobbies/{lobby_id}", local_var_configuration.base_path, lobby_id=crate::apis::urlencode(lobby_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let uri_str = format!("{}/guilds/{guild_id}/stickers/{sticker_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), sticker_id=crate::apis::urlencode(p_sticker_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_lobby_messages<'lobby_id, 'limit>(&self, lobby_id: &'lobby_id str, limit: Option) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/lobbies/{lobby_id}/messages", local_var_configuration.base_path, lobby_id=crate::apis::urlencode(lobby_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let status = resp.status(); - if let Some(ref param_value) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) } +} - async fn get_message<'channel_id, 'message_id>(&self, channel_id: &'channel_id str, message_id: &'message_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; +pub async fn get_guild_template(configuration: &configuration::Configuration, code: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_code = code; - let local_var_uri_str = format!("{}/channels/{channel_id}/messages/{message_id}", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id), message_id=crate::apis::urlencode(message_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let uri_str = format!("{}/guilds/templates/{code}", configuration.base_path, code=crate::apis::urlencode(p_code)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let status = resp.status(); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) } +} - async fn get_my_application<>(&self, ) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; +pub async fn get_guild_vanity_url(configuration: &configuration::Configuration, guild_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; - let local_var_uri_str = format!("{}/applications/@me", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let uri_str = format!("{}/guilds/{guild_id}/vanity-url", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let status = resp.status(); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) } +} - async fn get_my_guild_member<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; +pub async fn get_guild_webhooks(configuration: &configuration::Configuration, guild_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; - let local_var_uri_str = format!("{}/users/@me/guilds/{guild_id}/member", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let uri_str = format!("{}/guilds/{guild_id}/webhooks", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let status = resp.status(); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) } +} - async fn get_my_oauth2_application<>(&self, ) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; +pub async fn get_guild_welcome_screen(configuration: &configuration::Configuration, guild_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; - let local_var_uri_str = format!("{}/oauth2/applications/@me", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let uri_str = format!("{}/guilds/{guild_id}/welcome-screen", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let status = resp.status(); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) } +} - async fn get_my_oauth2_authorization<>(&self, ) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; +pub async fn get_guild_widget(configuration: &configuration::Configuration, guild_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; - let local_var_uri_str = format!("{}/oauth2/@me", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let uri_str = format!("{}/guilds/{guild_id}/widget.json", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let status = resp.status(); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) } +} - async fn get_my_user<>(&self, ) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; +pub async fn get_guild_widget_png(configuration: &configuration::Configuration, guild_id: &str, style: Option<&str>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_style = style; - let local_var_uri_str = format!("{}/users/@me", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let uri_str = format!("{}/guilds/{guild_id}/widget.png", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + if let Some(ref param_value) = p_style { + req_builder = req_builder.query(&[("style", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } + let status = resp.status(); - async fn get_openid_connect_userinfo<>(&self, ) -> Result, Error> { - let local_var_configuration = &self.configuration; + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_client = &local_var_configuration.client; +pub async fn get_guild_widget_settings(configuration: &configuration::Configuration, guild_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; - let local_var_uri_str = format!("{}/oauth2/userinfo", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let uri_str = format!("{}/guilds/{guild_id}/widget", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let status = resp.status(); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_original_webhook_message<'webhook_id, 'webhook_token, 'thread_id>(&self, webhook_id: &'webhook_id str, webhook_token: &'webhook_token str, thread_id: Option<&'thread_id str>) -> Result, Error> { - let local_var_configuration = &self.configuration; + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_client = &local_var_configuration.client; +pub async fn get_guilds_onboarding(configuration: &configuration::Configuration, guild_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; - let local_var_uri_str = format!("{}/webhooks/{webhook_id}/{webhook_token}/messages/@original", local_var_configuration.base_path, webhook_id=crate::apis::urlencode(webhook_id), webhook_token=crate::apis::urlencode(webhook_token)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let uri_str = format!("{}/guilds/{guild_id}/onboarding", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - if let Some(ref param_value) = thread_id { - local_var_req_builder = local_var_req_builder.query(&[("thread_id", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - async fn get_public_keys<>(&self, ) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/oauth2/keys", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_self_voice_state<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/voice-states/@me", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; + let status = resp.status(); - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_soundboard_default_sounds<>(&self, ) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/soundboard-default-sounds", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn get_lobby(configuration: &configuration::Configuration, lobby_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_lobby_id = lobby_id; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let uri_str = format!("{}/lobbies/{lobby_id}", configuration.base_path, lobby_id=crate::apis::urlencode(p_lobby_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_stage_instance<'channel_id>(&self, channel_id: &'channel_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/stage-instances/{channel_id}", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_sticker<'sticker_id>(&self, sticker_id: &'sticker_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/stickers/{sticker_id}", local_var_configuration.base_path, sticker_id=crate::apis::urlencode(sticker_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let status = resp.status(); - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_sticker_pack<'pack_id>(&self, pack_id: &'pack_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/sticker-packs/{pack_id}", local_var_configuration.base_path, pack_id=crate::apis::urlencode(pack_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_thread_member<'channel_id, 'user_id, 'with_member>(&self, channel_id: &'channel_id str, user_id: &'user_id str, with_member: Option) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/thread-members/{user_id}", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id), user_id=crate::apis::urlencode(user_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref param_value) = with_member { - local_var_req_builder = local_var_req_builder.query(&[("with_member", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; +pub async fn get_lobby_messages(configuration: &configuration::Configuration, lobby_id: &str, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_lobby_id = lobby_id; + let p_limit = limit; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_user<'user_id>(&self, user_id: &'user_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/users/{user_id}", local_var_configuration.base_path, user_id=crate::apis::urlencode(user_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; + let uri_str = format!("{}/lobbies/{lobby_id}/messages", configuration.base_path, lobby_id=crate::apis::urlencode(p_lobby_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_voice_state<'guild_id, 'user_id>(&self, guild_id: &'guild_id str, user_id: &'user_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/voice-states/{user_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), user_id=crate::apis::urlencode(user_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref param_value) = p_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_webhook<'webhook_id>(&self, webhook_id: &'webhook_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/webhooks/{webhook_id}", local_var_configuration.base_path, webhook_id=crate::apis::urlencode(webhook_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_webhook_by_token<'webhook_id, 'webhook_token>(&self, webhook_id: &'webhook_id str, webhook_token: &'webhook_token str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/webhooks/{webhook_id}/{webhook_token}", local_var_configuration.base_path, webhook_id=crate::apis::urlencode(webhook_id), webhook_token=crate::apis::urlencode(webhook_token)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn get_webhook_message<'webhook_id, 'webhook_token, 'message_id, 'thread_id>(&self, webhook_id: &'webhook_id str, webhook_token: &'webhook_token str, message_id: &'message_id str, thread_id: Option<&'thread_id str>) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/webhooks/{webhook_id}/{webhook_token}/messages/{message_id}", local_var_configuration.base_path, webhook_id=crate::apis::urlencode(webhook_id), webhook_token=crate::apis::urlencode(webhook_token), message_id=crate::apis::urlencode(message_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref param_value) = thread_id { - local_var_req_builder = local_var_req_builder.query(&[("thread_id", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn invite_resolve<'code, 'with_counts, 'guild_scheduled_event_id>(&self, code: &'code str, with_counts: Option, guild_scheduled_event_id: Option<&'guild_scheduled_event_id str>) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/invites/{code}", local_var_configuration.base_path, code=crate::apis::urlencode(code)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref param_value) = with_counts { - local_var_req_builder = local_var_req_builder.query(&[("with_counts", ¶m_value.to_string())]); - } - if let Some(ref param_value) = guild_scheduled_event_id { - local_var_req_builder = local_var_req_builder.query(&[("guild_scheduled_event_id", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn invite_revoke<'code>(&self, code: &'code str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/invites/{code}", local_var_configuration.base_path, code=crate::apis::urlencode(code)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn join_thread<'channel_id>(&self, channel_id: &'channel_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/thread-members/@me", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn leave_guild<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; + let status = resp.status(); - let local_var_client = &local_var_configuration.client; + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_uri_str = format!("{}/users/@me/guilds/{guild_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); +pub async fn get_message(configuration: &configuration::Configuration, channel_id: &str, message_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_message_id = message_id; - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; + let uri_str = format!("{}/channels/{channel_id}/messages/{message_id}", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id), message_id=crate::apis::urlencode(p_message_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn leave_lobby<'lobby_id>(&self, lobby_id: &'lobby_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; + let status = resp.status(); - let local_var_client = &local_var_configuration.client; + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_uri_str = format!("{}/lobbies/{lobby_id}/members/@me", local_var_configuration.base_path, lobby_id=crate::apis::urlencode(lobby_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); +pub async fn get_my_application(configuration: &configuration::Configuration, ) -> Result, Error> { - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } + let uri_str = format!("{}/applications/@me", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - async fn leave_thread<'channel_id>(&self, channel_id: &'channel_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/thread-members/@me", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } - - async fn list_application_commands<'application_id, 'with_localizations>(&self, application_id: &'application_id str, with_localizations: Option) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/applications/{application_id}/commands", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref param_value) = with_localizations { - local_var_req_builder = local_var_req_builder.query(&[("with_localizations", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - async fn list_application_emojis<'application_id>(&self, application_id: &'application_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/applications/{application_id}/emojis", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } + let status = resp.status(); - async fn list_auto_moderation_rules<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/auto-moderation/rules", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn list_channel_invites<'channel_id>(&self, channel_id: &'channel_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_client = &local_var_configuration.client; +pub async fn get_my_guild_member(configuration: &configuration::Configuration, guild_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; - let local_var_uri_str = format!("{}/channels/{channel_id}/invites", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let uri_str = format!("{}/users/@me/guilds/{guild_id}/member", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let status = resp.status(); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn list_channel_webhooks<'channel_id>(&self, channel_id: &'channel_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_client = &local_var_configuration.client; +pub async fn get_my_oauth2_application(configuration: &configuration::Configuration, ) -> Result, Error> { - let local_var_uri_str = format!("{}/channels/{channel_id}/webhooks", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); + let uri_str = format!("{}/oauth2/applications/@me", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } + let status = resp.status(); - async fn list_guild_application_command_permissions<'application_id, 'guild_id>(&self, application_id: &'application_id str, guild_id: &'guild_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_uri_str = format!("{}/applications/{application_id}/guilds/{guild_id}/commands/permissions", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id), guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); +pub async fn get_my_oauth2_authorization(configuration: &configuration::Configuration, ) -> Result, Error> { - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn list_guild_application_commands<'application_id, 'guild_id, 'with_localizations>(&self, application_id: &'application_id str, guild_id: &'guild_id str, with_localizations: Option) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/applications/{application_id}/guilds/{guild_id}/commands", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id), guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref param_value) = with_localizations { - local_var_req_builder = local_var_req_builder.query(&[("with_localizations", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn list_guild_audit_log_entries<'guild_id, 'user_id, 'target_id, 'action_type, 'before, 'after, 'limit>(&self, guild_id: &'guild_id str, user_id: Option<&'user_id str>, target_id: Option<&'target_id str>, action_type: Option, before: Option<&'before str>, after: Option<&'after str>, limit: Option) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/audit-logs", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref param_value) = user_id { - local_var_req_builder = local_var_req_builder.query(&[("user_id", ¶m_value.to_string())]); - } - if let Some(ref param_value) = target_id { - local_var_req_builder = local_var_req_builder.query(&[("target_id", ¶m_value.to_string())]); - } - if let Some(ref param_value) = action_type { - local_var_req_builder = local_var_req_builder.query(&[("action_type", ¶m_value.to_string())]); - } - if let Some(ref param_value) = before { - local_var_req_builder = local_var_req_builder.query(&[("before", ¶m_value.to_string())]); - } - if let Some(ref param_value) = after { - local_var_req_builder = local_var_req_builder.query(&[("after", ¶m_value.to_string())]); - } - if let Some(ref param_value) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn list_guild_bans<'guild_id, 'limit, 'before, 'after>(&self, guild_id: &'guild_id str, limit: Option, before: Option<&'before str>, after: Option<&'after str>) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/bans", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref param_value) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref param_value) = before { - local_var_req_builder = local_var_req_builder.query(&[("before", ¶m_value.to_string())]); - } - if let Some(ref param_value) = after { - local_var_req_builder = local_var_req_builder.query(&[("after", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn list_guild_channels<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/channels", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn list_guild_emojis<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/emojis", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn list_guild_integrations<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/integrations", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn list_guild_invites<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/invites", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn list_guild_members<'guild_id, 'limit, 'after>(&self, guild_id: &'guild_id str, limit: Option, after: Option) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/members", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref param_value) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref param_value) = after { - local_var_req_builder = local_var_req_builder.query(&[("after", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn list_guild_roles<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/roles", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn list_guild_scheduled_event_users<'guild_id, 'guild_scheduled_event_id, 'with_member, 'limit, 'before, 'after>(&self, guild_id: &'guild_id str, guild_scheduled_event_id: &'guild_scheduled_event_id str, with_member: Option, limit: Option, before: Option<&'before str>, after: Option<&'after str>) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id}/users", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), guild_scheduled_event_id=crate::apis::urlencode(guild_scheduled_event_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref param_value) = with_member { - local_var_req_builder = local_var_req_builder.query(&[("with_member", ¶m_value.to_string())]); - } - if let Some(ref param_value) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref param_value) = before { - local_var_req_builder = local_var_req_builder.query(&[("before", ¶m_value.to_string())]); - } - if let Some(ref param_value) = after { - local_var_req_builder = local_var_req_builder.query(&[("after", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn list_guild_scheduled_events<'guild_id, 'with_user_count>(&self, guild_id: &'guild_id str, with_user_count: Option) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/scheduled-events", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref param_value) = with_user_count { - local_var_req_builder = local_var_req_builder.query(&[("with_user_count", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn list_guild_soundboard_sounds<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/soundboard-sounds", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn list_guild_stickers<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/stickers", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; + let uri_str = format!("{}/oauth2/@me", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn list_guild_templates<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/templates", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn list_guild_voice_regions<'guild_id>(&self, guild_id: &'guild_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/regions", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn list_message_reactions_by_emoji<'channel_id, 'message_id, 'emoji_name, 'after, 'limit, 'r_type>(&self, channel_id: &'channel_id str, message_id: &'message_id str, emoji_name: &'emoji_name str, after: Option<&'after str>, limit: Option, r#type: Option) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id), message_id=crate::apis::urlencode(message_id), emoji_name=crate::apis::urlencode(emoji_name)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref param_value) = after { - local_var_req_builder = local_var_req_builder.query(&[("after", ¶m_value.to_string())]); - } - if let Some(ref param_value) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref param_value) = r#type { - local_var_req_builder = local_var_req_builder.query(&[("type", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn list_messages<'channel_id, 'around, 'before, 'after, 'limit>(&self, channel_id: &'channel_id str, around: Option<&'around str>, before: Option<&'before str>, after: Option<&'after str>, limit: Option) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/messages", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref param_value) = around { - local_var_req_builder = local_var_req_builder.query(&[("around", ¶m_value.to_string())]); - } - if let Some(ref param_value) = before { - local_var_req_builder = local_var_req_builder.query(&[("before", ¶m_value.to_string())]); - } - if let Some(ref param_value) = after { - local_var_req_builder = local_var_req_builder.query(&[("after", ¶m_value.to_string())]); - } - if let Some(ref param_value) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn list_my_connections<>(&self, ) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/users/@me/connections", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn list_my_guilds<'before, 'after, 'limit, 'with_counts>(&self, before: Option<&'before str>, after: Option<&'after str>, limit: Option, with_counts: Option) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/users/@me/guilds", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref param_value) = before { - local_var_req_builder = local_var_req_builder.query(&[("before", ¶m_value.to_string())]); - } - if let Some(ref param_value) = after { - local_var_req_builder = local_var_req_builder.query(&[("after", ¶m_value.to_string())]); - } - if let Some(ref param_value) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref param_value) = with_counts { - local_var_req_builder = local_var_req_builder.query(&[("with_counts", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn list_my_private_archived_threads<'channel_id, 'before, 'limit>(&self, channel_id: &'channel_id str, before: Option<&'before str>, limit: Option) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/users/@me/threads/archived/private", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref param_value) = before { - local_var_req_builder = local_var_req_builder.query(&[("before", ¶m_value.to_string())]); - } - if let Some(ref param_value) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn list_pins<'channel_id, 'before, 'limit>(&self, channel_id: &'channel_id str, before: Option, limit: Option) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/messages/pins", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref param_value) = before { - local_var_req_builder = local_var_req_builder.query(&[("before", ¶m_value.to_string())]); - } - if let Some(ref param_value) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn list_private_archived_threads<'channel_id, 'before, 'limit>(&self, channel_id: &'channel_id str, before: Option, limit: Option) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/threads/archived/private", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref param_value) = before { - local_var_req_builder = local_var_req_builder.query(&[("before", ¶m_value.to_string())]); - } - if let Some(ref param_value) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn list_public_archived_threads<'channel_id, 'before, 'limit>(&self, channel_id: &'channel_id str, before: Option, limit: Option) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/threads/archived/public", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref param_value) = before { - local_var_req_builder = local_var_req_builder.query(&[("before", ¶m_value.to_string())]); - } - if let Some(ref param_value) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn list_sticker_packs<>(&self, ) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/sticker-packs", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn list_thread_members<'channel_id, 'with_member, 'limit, 'after>(&self, channel_id: &'channel_id str, with_member: Option, limit: Option, after: Option<&'after str>) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/thread-members", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref param_value) = with_member { - local_var_req_builder = local_var_req_builder.query(&[("with_member", ¶m_value.to_string())]); - } - if let Some(ref param_value) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref param_value) = after { - local_var_req_builder = local_var_req_builder.query(&[("after", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn list_voice_regions<>(&self, ) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/voice/regions", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn partner_sdk_token<'partner_sdk_unmerge_provisional_account_request>(&self, partner_sdk_unmerge_provisional_account_request: models::PartnerSdkUnmergeProvisionalAccountRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/partner-sdk/token", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&partner_sdk_unmerge_provisional_account_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn partner_sdk_unmerge_provisional_account<'partner_sdk_unmerge_provisional_account_request>(&self, partner_sdk_unmerge_provisional_account_request: models::PartnerSdkUnmergeProvisionalAccountRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/partner-sdk/provisional-accounts/unmerge", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&partner_sdk_unmerge_provisional_account_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn poll_expire<'channel_id, 'message_id>(&self, channel_id: &'channel_id str, message_id: &'message_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/polls/{message_id}/expire", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id), message_id=crate::apis::urlencode(message_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn preview_prune_guild<'guild_id, 'days, 'include_roles>(&self, guild_id: &'guild_id str, days: Option, include_roles: Option<&'include_roles str>) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/prune", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref param_value) = days { - local_var_req_builder = local_var_req_builder.query(&[("days", ¶m_value.to_string())]); - } - if let Some(ref param_value) = include_roles { - local_var_req_builder = local_var_req_builder.query(&[("include_roles", &serde_json::to_value(param_value)?)]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn prune_guild<'guild_id, 'prune_guild_request>(&self, guild_id: &'guild_id str, prune_guild_request: models::PruneGuildRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/prune", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&prune_guild_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn put_guilds_onboarding<'guild_id, 'update_guild_onboarding_request>(&self, guild_id: &'guild_id str, update_guild_onboarding_request: models::UpdateGuildOnboardingRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/onboarding", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&update_guild_onboarding_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn search_guild_members<'limit, 'query, 'guild_id>(&self, limit: i32, query: &'query str, guild_id: &'guild_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/members/search", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - local_var_req_builder = local_var_req_builder.query(&[("limit", &limit.to_string())]); - local_var_req_builder = local_var_req_builder.query(&[("query", &query.to_string())]); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn send_soundboard_sound<'channel_id, 'soundboard_sound_send_request>(&self, channel_id: &'channel_id str, soundboard_sound_send_request: models::SoundboardSoundSendRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/send-soundboard-sound", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&soundboard_sound_send_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn set_channel_permission_overwrite<'channel_id, 'overwrite_id, 'set_channel_permission_overwrite_request>(&self, channel_id: &'channel_id str, overwrite_id: &'overwrite_id str, set_channel_permission_overwrite_request: models::SetChannelPermissionOverwriteRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/permissions/{overwrite_id}", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id), overwrite_id=crate::apis::urlencode(overwrite_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&set_channel_permission_overwrite_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn set_guild_application_command_permissions<'application_id, 'guild_id, 'command_id, 'set_guild_application_command_permissions_request>(&self, application_id: &'application_id str, guild_id: &'guild_id str, command_id: &'command_id str, set_guild_application_command_permissions_request: models::SetGuildApplicationCommandPermissionsRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; - let local_var_uri_str = format!("{}/applications/{application_id}/guilds/{guild_id}/commands/{command_id}/permissions", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id), guild_id=crate::apis::urlencode(guild_id), command_id=crate::apis::urlencode(command_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&set_guild_application_command_permissions_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn set_guild_mfa_level<'guild_id, 'set_guild_mfa_level_request>(&self, guild_id: &'guild_id str, set_guild_mfa_level_request: models::SetGuildMfaLevelRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/mfa", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&set_guild_mfa_level_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn sync_guild_template<'guild_id, 'code>(&self, guild_id: &'guild_id str, code: &'code str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/templates/{code}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), code=crate::apis::urlencode(code)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn thread_search<'channel_id, 'name, 'slop, 'min_id, 'max_id, 'tag, 'tag_setting, 'archived, 'sort_by, 'sort_order, 'limit, 'offset>(&self, channel_id: &'channel_id str, name: Option<&'name str>, slop: Option, min_id: Option<&'min_id str>, max_id: Option<&'max_id str>, tag: Option<&'tag str>, tag_setting: Option<&'tag_setting str>, archived: Option, sort_by: Option<&'sort_by str>, sort_order: Option<&'sort_order str>, limit: Option, offset: Option) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/threads/search", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::GET, local_var_uri_str.as_str()); - - if let Some(ref param_value) = name { - local_var_req_builder = local_var_req_builder.query(&[("name", ¶m_value.to_string())]); - } - if let Some(ref param_value) = slop { - local_var_req_builder = local_var_req_builder.query(&[("slop", ¶m_value.to_string())]); - } - if let Some(ref param_value) = min_id { - local_var_req_builder = local_var_req_builder.query(&[("min_id", ¶m_value.to_string())]); - } - if let Some(ref param_value) = max_id { - local_var_req_builder = local_var_req_builder.query(&[("max_id", ¶m_value.to_string())]); - } - if let Some(ref param_value) = tag { - local_var_req_builder = local_var_req_builder.query(&[("tag", &serde_json::to_value(param_value)?)]); - } - if let Some(ref param_value) = tag_setting { - local_var_req_builder = local_var_req_builder.query(&[("tag_setting", ¶m_value.to_string())]); - } - if let Some(ref param_value) = archived { - local_var_req_builder = local_var_req_builder.query(&[("archived", ¶m_value.to_string())]); - } - if let Some(ref param_value) = sort_by { - local_var_req_builder = local_var_req_builder.query(&[("sort_by", ¶m_value.to_string())]); - } - if let Some(ref param_value) = sort_order { - local_var_req_builder = local_var_req_builder.query(&[("sort_order", ¶m_value.to_string())]); - } - if let Some(ref param_value) = limit { - local_var_req_builder = local_var_req_builder.query(&[("limit", ¶m_value.to_string())]); - } - if let Some(ref param_value) = offset { - local_var_req_builder = local_var_req_builder.query(&[("offset", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn trigger_typing_indicator<'channel_id>(&self, channel_id: &'channel_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/typing", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn unban_user_from_guild<'guild_id, 'user_id>(&self, guild_id: &'guild_id str, user_id: &'user_id str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/bans/{user_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), user_id=crate::apis::urlencode(user_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::DELETE, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn update_application<'application_id, 'application_form_partial>(&self, application_id: &'application_id str, application_form_partial: models::ApplicationFormPartial) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/applications/{application_id}", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&application_form_partial); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let status = resp.status(); - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn update_application_command<'application_id, 'command_id, 'application_command_patch_request_partial>(&self, application_id: &'application_id str, command_id: &'command_id str, application_command_patch_request_partial: models::ApplicationCommandPatchRequestPartial) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/applications/{application_id}/commands/{command_id}", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id), command_id=crate::apis::urlencode(command_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&application_command_patch_request_partial); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) } +} - async fn update_application_emoji<'application_id, 'emoji_id, 'update_application_emoji_request>(&self, application_id: &'application_id str, emoji_id: &'emoji_id str, update_application_emoji_request: models::UpdateApplicationEmojiRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; +pub async fn get_my_user(configuration: &configuration::Configuration, ) -> Result, Error> { - let local_var_uri_str = format!("{}/applications/{application_id}/emojis/{emoji_id}", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id), emoji_id=crate::apis::urlencode(emoji_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); + let uri_str = format!("{}/users/@me", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; - local_var_req_builder = local_var_req_builder.json(&update_application_emoji_request); + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let status = resp.status(); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) } +} - async fn update_application_role_connections_metadata<'application_id, 'application_role_connections_metadata_item_request>(&self, application_id: &'application_id str, application_role_connections_metadata_item_request: Option>) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; +pub async fn get_openid_connect_userinfo(configuration: &configuration::Configuration, ) -> Result, Error> { - let local_var_uri_str = format!("{}/applications/{application_id}/role-connections/metadata", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); + let uri_str = format!("{}/oauth2/userinfo", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; - local_var_req_builder = local_var_req_builder.json(&application_role_connections_metadata_item_request); + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let status = resp.status(); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn update_application_user_role_connection<'application_id, 'update_application_user_role_connection_request>(&self, application_id: &'application_id str, update_application_user_role_connection_request: models::UpdateApplicationUserRoleConnectionRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_client = &local_var_configuration.client; +pub async fn get_original_webhook_message(configuration: &configuration::Configuration, webhook_id: &str, webhook_token: &str, thread_id: Option<&str>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_webhook_id = webhook_id; + let p_webhook_token = webhook_token; + let p_thread_id = thread_id; - let local_var_uri_str = format!("{}/users/@me/applications/{application_id}/role-connection", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PUT, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); + let uri_str = format!("{}/webhooks/{webhook_id}/{webhook_token}/messages/@original", configuration.base_path, webhook_id=crate::apis::urlencode(p_webhook_id), webhook_token=crate::apis::urlencode(p_webhook_token)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_thread_id { + req_builder = req_builder.query(&[("thread_id", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; - local_var_req_builder = local_var_req_builder.json(&update_application_user_role_connection_request); + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let status = resp.status(); - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - async fn update_auto_moderation_rule<'guild_id, 'rule_id, 'update_auto_moderation_rule_request>(&self, guild_id: &'guild_id str, rule_id: &'rule_id str, update_auto_moderation_rule_request: models::UpdateAutoModerationRuleRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; +pub async fn get_public_keys(configuration: &configuration::Configuration, ) -> Result, Error> { - let local_var_client = &local_var_configuration.client; + let uri_str = format!("{}/oauth2/keys", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - let local_var_uri_str = format!("{}/guilds/{guild_id}/auto-moderation/rules/{rule_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), rule_id=crate::apis::urlencode(rule_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; - local_var_req_builder = local_var_req_builder.json(&update_auto_moderation_rule_request); + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } + let status = resp.status(); - async fn update_channel<'channel_id, 'update_channel_request>(&self, channel_id: &'channel_id str, update_channel_request: models::UpdateChannelRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} - let local_var_client = &local_var_configuration.client; +pub async fn get_self_voice_state(configuration: &configuration::Configuration, guild_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; - let local_var_uri_str = format!("{}/channels/{channel_id}", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); + let uri_str = format!("{}/guilds/{guild_id}/voice-states/@me", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, }; - local_var_req_builder = local_var_req_builder.json(&update_channel_request); + req_builder = req_builder.header("Authorization", value); + }; - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let status = resp.status(); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) } +} - async fn update_guild<'guild_id, 'guild_patch_request_partial>(&self, guild_id: &'guild_id str, guild_patch_request_partial: models::GuildPatchRequestPartial) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&guild_patch_request_partial); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn update_guild_application_command<'application_id, 'guild_id, 'command_id, 'application_command_patch_request_partial>(&self, application_id: &'application_id str, guild_id: &'guild_id str, command_id: &'command_id str, application_command_patch_request_partial: models::ApplicationCommandPatchRequestPartial) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/applications/{application_id}/guilds/{guild_id}/commands/{command_id}", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id), guild_id=crate::apis::urlencode(guild_id), command_id=crate::apis::urlencode(command_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&application_command_patch_request_partial); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn update_guild_emoji<'guild_id, 'emoji_id, 'update_guild_emoji_request>(&self, guild_id: &'guild_id str, emoji_id: &'emoji_id str, update_guild_emoji_request: models::UpdateGuildEmojiRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/emojis/{emoji_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), emoji_id=crate::apis::urlencode(emoji_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&update_guild_emoji_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn update_guild_member<'guild_id, 'user_id, 'update_guild_member_request>(&self, guild_id: &'guild_id str, user_id: &'user_id str, update_guild_member_request: models::UpdateGuildMemberRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/members/{user_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), user_id=crate::apis::urlencode(user_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&update_guild_member_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn update_guild_role<'guild_id, 'role_id, 'create_guild_role_request>(&self, guild_id: &'guild_id str, role_id: &'role_id str, create_guild_role_request: models::CreateGuildRoleRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/roles/{role_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), role_id=crate::apis::urlencode(role_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&create_guild_role_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn update_guild_scheduled_event<'guild_id, 'guild_scheduled_event_id, 'update_guild_scheduled_event_request>(&self, guild_id: &'guild_id str, guild_scheduled_event_id: &'guild_scheduled_event_id str, update_guild_scheduled_event_request: models::UpdateGuildScheduledEventRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), guild_scheduled_event_id=crate::apis::urlencode(guild_scheduled_event_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&update_guild_scheduled_event_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn update_guild_soundboard_sound<'guild_id, 'sound_id, 'soundboard_patch_request_partial>(&self, guild_id: &'guild_id str, sound_id: &'sound_id str, soundboard_patch_request_partial: models::SoundboardPatchRequestPartial) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/soundboard-sounds/{sound_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), sound_id=crate::apis::urlencode(sound_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&soundboard_patch_request_partial); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn update_guild_sticker<'guild_id, 'sticker_id, 'update_guild_sticker_request>(&self, guild_id: &'guild_id str, sticker_id: &'sticker_id str, update_guild_sticker_request: models::UpdateGuildStickerRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/stickers/{sticker_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), sticker_id=crate::apis::urlencode(sticker_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&update_guild_sticker_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn update_guild_template<'guild_id, 'code, 'update_guild_template_request>(&self, guild_id: &'guild_id str, code: &'code str, update_guild_template_request: models::UpdateGuildTemplateRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/templates/{code}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), code=crate::apis::urlencode(code)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&update_guild_template_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn update_guild_welcome_screen<'guild_id, 'welcome_screen_patch_request_partial>(&self, guild_id: &'guild_id str, welcome_screen_patch_request_partial: models::WelcomeScreenPatchRequestPartial) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/welcome-screen", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&welcome_screen_patch_request_partial); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn update_guild_widget_settings<'guild_id, 'update_guild_widget_settings_request>(&self, guild_id: &'guild_id str, update_guild_widget_settings_request: models::UpdateGuildWidgetSettingsRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/widget", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&update_guild_widget_settings_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn update_message<'channel_id, 'message_id, 'message_edit_request_partial>(&self, channel_id: &'channel_id str, message_id: &'message_id str, message_edit_request_partial: models::MessageEditRequestPartial) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/channels/{channel_id}/messages/{message_id}", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id), message_id=crate::apis::urlencode(message_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&message_edit_request_partial); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn update_my_application<'application_form_partial>(&self, application_form_partial: models::ApplicationFormPartial) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/applications/@me", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&application_form_partial); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn update_my_guild_member<'guild_id, 'update_my_guild_member_request>(&self, guild_id: &'guild_id str, update_my_guild_member_request: models::UpdateMyGuildMemberRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/members/@me", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&update_my_guild_member_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn update_my_user<'bot_account_patch_request>(&self, bot_account_patch_request: models::BotAccountPatchRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/users/@me", local_var_configuration.base_path); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&bot_account_patch_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn update_original_webhook_message<'webhook_id, 'webhook_token, 'incoming_webhook_update_request_partial, 'thread_id, 'with_components>(&self, webhook_id: &'webhook_id str, webhook_token: &'webhook_token str, incoming_webhook_update_request_partial: models::IncomingWebhookUpdateRequestPartial, thread_id: Option<&'thread_id str>, with_components: Option) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/webhooks/{webhook_id}/{webhook_token}/messages/@original", local_var_configuration.base_path, webhook_id=crate::apis::urlencode(webhook_id), webhook_token=crate::apis::urlencode(webhook_token)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref param_value) = thread_id { - local_var_req_builder = local_var_req_builder.query(&[("thread_id", ¶m_value.to_string())]); - } - if let Some(ref param_value) = with_components { - local_var_req_builder = local_var_req_builder.query(&[("with_components", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&incoming_webhook_update_request_partial); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn update_self_voice_state<'guild_id, 'update_self_voice_state_request>(&self, guild_id: &'guild_id str, update_self_voice_state_request: models::UpdateSelfVoiceStateRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/voice-states/@me", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&update_self_voice_state_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn update_stage_instance<'channel_id, 'update_stage_instance_request>(&self, channel_id: &'channel_id str, update_stage_instance_request: models::UpdateStageInstanceRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/stage-instances/{channel_id}", local_var_configuration.base_path, channel_id=crate::apis::urlencode(channel_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&update_stage_instance_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn update_voice_state<'guild_id, 'user_id, 'update_voice_state_request>(&self, guild_id: &'guild_id str, user_id: &'user_id str, update_voice_state_request: models::UpdateVoiceStateRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/guilds/{guild_id}/voice-states/{user_id}", local_var_configuration.base_path, guild_id=crate::apis::urlencode(guild_id), user_id=crate::apis::urlencode(user_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&update_voice_state_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn update_webhook<'webhook_id, 'update_webhook_request>(&self, webhook_id: &'webhook_id str, update_webhook_request: models::UpdateWebhookRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/webhooks/{webhook_id}", local_var_configuration.base_path, webhook_id=crate::apis::urlencode(webhook_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&update_webhook_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn update_webhook_by_token<'webhook_id, 'webhook_token, 'update_webhook_by_token_request>(&self, webhook_id: &'webhook_id str, webhook_token: &'webhook_token str, update_webhook_by_token_request: models::UpdateWebhookByTokenRequest) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/webhooks/{webhook_id}/{webhook_token}", local_var_configuration.base_path, webhook_id=crate::apis::urlencode(webhook_id), webhook_token=crate::apis::urlencode(webhook_token)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&update_webhook_by_token_request); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn update_webhook_message<'webhook_id, 'webhook_token, 'message_id, 'incoming_webhook_update_request_partial, 'thread_id, 'with_components>(&self, webhook_id: &'webhook_id str, webhook_token: &'webhook_token str, message_id: &'message_id str, incoming_webhook_update_request_partial: models::IncomingWebhookUpdateRequestPartial, thread_id: Option<&'thread_id str>, with_components: Option) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/webhooks/{webhook_id}/{webhook_token}/messages/{message_id}", local_var_configuration.base_path, webhook_id=crate::apis::urlencode(webhook_id), webhook_token=crate::apis::urlencode(webhook_token), message_id=crate::apis::urlencode(message_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::PATCH, local_var_uri_str.as_str()); - - if let Some(ref param_value) = thread_id { - local_var_req_builder = local_var_req_builder.query(&[("thread_id", ¶m_value.to_string())]); - } - if let Some(ref param_value) = with_components { - local_var_req_builder = local_var_req_builder.query(&[("with_components", ¶m_value.to_string())]); - } - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - local_var_req_builder = local_var_req_builder.json(&incoming_webhook_update_request_partial); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; - - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; - - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } - } - - async fn upload_application_attachment<'application_id, 'file>(&self, application_id: &'application_id str, file: &'file str) -> Result, Error> { - let local_var_configuration = &self.configuration; - - let local_var_client = &local_var_configuration.client; - - let local_var_uri_str = format!("{}/applications/{application_id}/attachment", local_var_configuration.base_path, application_id=crate::apis::urlencode(application_id)); - let mut local_var_req_builder = local_var_client.request(reqwest::Method::POST, local_var_uri_str.as_str()); - - if let Some(ref local_var_user_agent) = local_var_configuration.user_agent { - local_var_req_builder = local_var_req_builder.header(reqwest::header::USER_AGENT, local_var_user_agent.clone()); - } - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_token) = local_var_configuration.oauth_access_token { - local_var_req_builder = local_var_req_builder.bearer_auth(local_var_token.to_owned()); - }; - if let Some(ref local_var_apikey) = local_var_configuration.api_key { - let local_var_key = local_var_apikey.key.clone(); - let local_var_value = match local_var_apikey.prefix { - Some(ref local_var_prefix) => format!("{} {}", local_var_prefix, local_var_key), - None => local_var_key, - }; - local_var_req_builder = local_var_req_builder.header("Authorization", local_var_value); - }; - let mut local_var_form = reqwest::multipart::Form::new(); - local_var_form = local_var_form.text("file", file.to_string()); - local_var_req_builder = local_var_req_builder.multipart(local_var_form); - - let local_var_req = local_var_req_builder.build()?; - let local_var_resp = local_var_client.execute(local_var_req).await?; +pub async fn get_soundboard_default_sounds(configuration: &configuration::Configuration, ) -> Result, Error> { - let local_var_status = local_var_resp.status(); - let local_var_content = local_var_resp.text().await?; + let uri_str = format!("{}/soundboard-default-sounds", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); - if !local_var_status.is_client_error() && !local_var_status.is_server_error() { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_result = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Ok(local_var_result) - } else { - let local_var_entity: Option = serde_json::from_str(&local_var_content).ok(); - let local_var_error = ResponseContent { status: local_var_status, content: local_var_content, entity: local_var_entity }; - Err(Error::ResponseError(local_var_error)) - } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -} - -/// struct for typed successes of method [`add_group_dm_user`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AddGroupDmUserSuccess { - Status201(models::AddGroupDmUser201Response), - Status204(), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`add_guild_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AddGuildMemberSuccess { - Status201(models::GuildMemberResponse), - Status204(), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`add_guild_member_role`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AddGuildMemberRoleSuccess { - Status204(), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`add_lobby_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AddLobbyMemberSuccess { - Status200(models::LobbyMemberResponse), - UnknownValue(serde_json::Value), -} +pub async fn get_stage_instance(configuration: &configuration::Configuration, channel_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; -/// struct for typed successes of method [`add_my_message_reaction`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AddMyMessageReactionSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/stage-instances/{channel_id}", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`add_thread_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AddThreadMemberSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`applications_get_activity_instance`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ApplicationsGetActivityInstanceSuccess { - Status200(models::EmbeddedActivityInstance), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`ban_user_from_guild`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum BanUserFromGuildSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`bulk_ban_users_from_guild`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum BulkBanUsersFromGuildSuccess { - Status200(models::BulkBanUsersResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`bulk_delete_messages`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum BulkDeleteMessagesSuccess { - Status204(), - UnknownValue(serde_json::Value), -} +pub async fn get_sticker(configuration: &configuration::Configuration, sticker_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_sticker_id = sticker_id; -/// struct for typed successes of method [`bulk_set_application_commands`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum BulkSetApplicationCommandsSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/stickers/{sticker_id}", configuration.base_path, sticker_id=crate::apis::urlencode(p_sticker_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`bulk_set_guild_application_commands`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum BulkSetGuildApplicationCommandsSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`bulk_update_guild_channels`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum BulkUpdateGuildChannelsSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`bulk_update_guild_roles`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum BulkUpdateGuildRolesSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`bulk_update_lobby_members`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum BulkUpdateLobbyMembersSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`consume_entitlement`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ConsumeEntitlementSuccess { - Status204(), - UnknownValue(serde_json::Value), -} +pub async fn get_sticker_pack(configuration: &configuration::Configuration, pack_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_pack_id = pack_id; -/// struct for typed successes of method [`create_application_command`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateApplicationCommandSuccess { - Status200(models::ApplicationCommandResponse), - Status201(models::ApplicationCommandResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/sticker-packs/{pack_id}", configuration.base_path, pack_id=crate::apis::urlencode(p_pack_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`create_application_emoji`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateApplicationEmojiSuccess { - Status201(models::EmojiResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`create_auto_moderation_rule`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateAutoModerationRuleSuccess { - Status200(models::CreateAutoModerationRule200Response), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`create_channel_invite`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateChannelInviteSuccess { - Status200(models::ListChannelInvites200ResponseInner), - Status204(), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`create_dm`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateDmSuccess { - Status200(models::AddGroupDmUser201Response), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`create_entitlement`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateEntitlementSuccess { - Status200(models::EntitlementResponse), - UnknownValue(serde_json::Value), -} +pub async fn get_thread_member(configuration: &configuration::Configuration, channel_id: &str, user_id: &str, with_member: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_user_id = user_id; + let p_with_member = with_member; -/// struct for typed successes of method [`create_guild`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateGuildSuccess { - Status201(models::GuildResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/channels/{channel_id}/thread-members/{user_id}", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id), user_id=crate::apis::urlencode(p_user_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`create_guild_application_command`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateGuildApplicationCommandSuccess { - Status200(models::ApplicationCommandResponse), - Status201(models::ApplicationCommandResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref param_value) = p_with_member { + req_builder = req_builder.query(&[("with_member", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`create_guild_channel`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateGuildChannelSuccess { - Status201(models::GuildChannelResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`create_guild_emoji`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateGuildEmojiSuccess { - Status201(models::EmojiResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`create_guild_from_template`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateGuildFromTemplateSuccess { - Status201(models::GuildResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`create_guild_role`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateGuildRoleSuccess { - Status200(models::GuildRoleResponse), - UnknownValue(serde_json::Value), -} +pub async fn get_user(configuration: &configuration::Configuration, user_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_user_id = user_id; -/// struct for typed successes of method [`create_guild_scheduled_event`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateGuildScheduledEventSuccess { - Status200(models::ListGuildScheduledEvents200ResponseInner), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/users/{user_id}", configuration.base_path, user_id=crate::apis::urlencode(p_user_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`create_guild_soundboard_sound`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateGuildSoundboardSoundSuccess { - Status201(models::SoundboardSoundResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`create_guild_sticker`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateGuildStickerSuccess { - Status201(models::GuildStickerResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`create_guild_template`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateGuildTemplateSuccess { - Status200(models::GuildTemplateResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`create_interaction_response`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateInteractionResponseSuccess { - Status200(models::InteractionCallbackResponse), - Status204(), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`create_lobby`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateLobbySuccess { - Status201(models::LobbyResponse), - UnknownValue(serde_json::Value), -} +pub async fn get_voice_state(configuration: &configuration::Configuration, guild_id: &str, user_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_user_id = user_id; -/// struct for typed successes of method [`create_lobby_message`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateLobbyMessageSuccess { - Status201(models::LobbyMessageResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/guilds/{guild_id}/voice-states/{user_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), user_id=crate::apis::urlencode(p_user_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`create_message`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateMessageSuccess { - Status200(models::MessageResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`create_or_join_lobby`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateOrJoinLobbySuccess { - Status200(models::LobbyResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`create_pin`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreatePinSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`create_stage_instance`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateStageInstanceSuccess { - Status200(models::StageInstanceResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`create_thread`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateThreadSuccess { - Status201(models::CreatedThreadResponse), - UnknownValue(serde_json::Value), -} +pub async fn get_webhook(configuration: &configuration::Configuration, webhook_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_webhook_id = webhook_id; -/// struct for typed successes of method [`create_thread_from_message`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateThreadFromMessageSuccess { - Status201(models::ThreadResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/webhooks/{webhook_id}", configuration.base_path, webhook_id=crate::apis::urlencode(p_webhook_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`create_webhook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateWebhookSuccess { - Status200(models::GuildIncomingWebhookResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`crosspost_message`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CrosspostMessageSuccess { - Status200(models::MessageResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`delete_all_message_reactions`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteAllMessageReactionsSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`delete_all_message_reactions_by_emoji`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteAllMessageReactionsByEmojiSuccess { - Status204(), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`delete_application_command`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteApplicationCommandSuccess { - Status204(), - UnknownValue(serde_json::Value), -} +pub async fn get_webhook_by_token(configuration: &configuration::Configuration, webhook_id: &str, webhook_token: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_webhook_id = webhook_id; + let p_webhook_token = webhook_token; -/// struct for typed successes of method [`delete_application_emoji`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteApplicationEmojiSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/webhooks/{webhook_id}/{webhook_token}", configuration.base_path, webhook_id=crate::apis::urlencode(p_webhook_id), webhook_token=crate::apis::urlencode(p_webhook_token)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`delete_application_user_role_connection`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteApplicationUserRoleConnectionSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`delete_auto_moderation_rule`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteAutoModerationRuleSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); -/// struct for typed successes of method [`delete_channel`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteChannelSuccess { - Status200(models::GetChannel200Response), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`delete_channel_permission_overwrite`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteChannelPermissionOverwriteSuccess { - Status204(), - UnknownValue(serde_json::Value), -} +pub async fn get_webhook_message(configuration: &configuration::Configuration, webhook_id: &str, webhook_token: &str, message_id: &str, thread_id: Option<&str>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_webhook_id = webhook_id; + let p_webhook_token = webhook_token; + let p_message_id = message_id; + let p_thread_id = thread_id; -/// struct for typed successes of method [`delete_entitlement`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteEntitlementSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/webhooks/{webhook_id}/{webhook_token}/messages/{message_id}", configuration.base_path, webhook_id=crate::apis::urlencode(p_webhook_id), webhook_token=crate::apis::urlencode(p_webhook_token), message_id=crate::apis::urlencode(p_message_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`delete_group_dm_user`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteGroupDmUserSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + if let Some(ref param_value) = p_thread_id { + req_builder = req_builder.query(&[("thread_id", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`delete_guild`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteGuildSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`delete_guild_application_command`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteGuildApplicationCommandSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`delete_guild_emoji`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteGuildEmojiSuccess { - Status204(), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`delete_guild_integration`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteGuildIntegrationSuccess { - Status204(), - UnknownValue(serde_json::Value), -} +pub async fn invite_resolve(configuration: &configuration::Configuration, code: &str, with_counts: Option, guild_scheduled_event_id: Option<&str>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_code = code; + let p_with_counts = with_counts; + let p_guild_scheduled_event_id = guild_scheduled_event_id; -/// struct for typed successes of method [`delete_guild_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteGuildMemberSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/invites/{code}", configuration.base_path, code=crate::apis::urlencode(p_code)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`delete_guild_member_role`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteGuildMemberRoleSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + if let Some(ref param_value) = p_with_counts { + req_builder = req_builder.query(&[("with_counts", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_guild_scheduled_event_id { + req_builder = req_builder.query(&[("guild_scheduled_event_id", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`delete_guild_role`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteGuildRoleSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`delete_guild_scheduled_event`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteGuildScheduledEventSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`delete_guild_soundboard_sound`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteGuildSoundboardSoundSuccess { - Status204(), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`delete_guild_sticker`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteGuildStickerSuccess { - Status204(), - UnknownValue(serde_json::Value), -} +pub async fn invite_revoke(configuration: &configuration::Configuration, code: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_code = code; -/// struct for typed successes of method [`delete_guild_template`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteGuildTemplateSuccess { - Status200(models::GuildTemplateResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/invites/{code}", configuration.base_path, code=crate::apis::urlencode(p_code)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); -/// struct for typed successes of method [`delete_lobby_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteLobbyMemberSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`delete_message`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteMessageSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`delete_my_message_reaction`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteMyMessageReactionSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`delete_original_webhook_message`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteOriginalWebhookMessageSuccess { - Status204(), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`delete_pin`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeletePinSuccess { - Status204(), - UnknownValue(serde_json::Value), -} +pub async fn join_thread(configuration: &configuration::Configuration, channel_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; -/// struct for typed successes of method [`delete_stage_instance`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteStageInstanceSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/channels/{channel_id}/thread-members/@me", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); -/// struct for typed successes of method [`delete_thread_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteThreadMemberSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`delete_user_message_reaction`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteUserMessageReactionSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`delete_webhook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteWebhookSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`delete_webhook_by_token`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteWebhookByTokenSuccess { - Status204(), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`delete_webhook_message`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteWebhookMessageSuccess { - Status204(), - UnknownValue(serde_json::Value), -} +pub async fn leave_guild(configuration: &configuration::Configuration, guild_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; -/// struct for typed successes of method [`deprecated_create_pin`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeprecatedCreatePinSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/users/@me/guilds/{guild_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); -/// struct for typed successes of method [`deprecated_delete_pin`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeprecatedDeletePinSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`deprecated_list_pins`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeprecatedListPinsSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`edit_lobby`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum EditLobbySuccess { - Status200(models::LobbyResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`edit_lobby_channel_link`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum EditLobbyChannelLinkSuccess { - Status200(models::LobbyResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`execute_github_compatible_webhook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ExecuteGithubCompatibleWebhookSuccess { - Status204(), - UnknownValue(serde_json::Value), -} +pub async fn leave_lobby(configuration: &configuration::Configuration, lobby_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_lobby_id = lobby_id; -/// struct for typed successes of method [`execute_slack_compatible_webhook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ExecuteSlackCompatibleWebhookSuccess { - Status200(String), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/lobbies/{lobby_id}/members/@me", configuration.base_path, lobby_id=crate::apis::urlencode(p_lobby_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); -/// struct for typed successes of method [`execute_webhook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ExecuteWebhookSuccess { - Status200(models::MessageResponse), - Status204(), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); -/// struct for typed successes of method [`follow_channel`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum FollowChannelSuccess { - Status200(models::ChannelFollowerResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`get_active_guild_threads`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetActiveGuildThreadsSuccess { - Status200(models::ThreadsResponse), - UnknownValue(serde_json::Value), -} +pub async fn leave_thread(configuration: &configuration::Configuration, channel_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; -/// struct for typed successes of method [`get_answer_voters`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetAnswerVotersSuccess { - Status200(models::PollAnswerDetailsResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/channels/{channel_id}/thread-members/@me", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); -/// struct for typed successes of method [`get_application`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetApplicationSuccess { - Status200(models::PrivateApplicationResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`get_application_command`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetApplicationCommandSuccess { - Status200(models::ApplicationCommandResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`get_application_emoji`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetApplicationEmojiSuccess { - Status200(models::EmojiResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`get_application_role_connections_metadata`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetApplicationRoleConnectionsMetadataSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`get_application_user_role_connection`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetApplicationUserRoleConnectionSuccess { - Status200(models::ApplicationUserRoleConnectionResponse), - UnknownValue(serde_json::Value), -} +pub async fn list_application_commands(configuration: &configuration::Configuration, application_id: &str, with_localizations: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_with_localizations = with_localizations; -/// struct for typed successes of method [`get_auto_moderation_rule`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetAutoModerationRuleSuccess { - Status200(models::CreateAutoModerationRule200Response), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/applications/{application_id}/commands", configuration.base_path, application_id=crate::apis::urlencode(p_application_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`get_bot_gateway`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetBotGatewaySuccess { - Status200(models::GatewayBotResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref param_value) = p_with_localizations { + req_builder = req_builder.query(&[("with_localizations", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`get_channel`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetChannelSuccess { - Status200(models::GetChannel200Response), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`get_entitlement`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetEntitlementSuccess { - Status200(models::EntitlementResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`get_entitlements`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetEntitlementsSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`get_gateway`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGatewaySuccess { - Status200(models::GatewayResponse), - UnknownValue(serde_json::Value), -} +pub async fn list_application_emojis(configuration: &configuration::Configuration, application_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; -/// struct for typed successes of method [`get_guild`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildSuccess { - Status200(models::GuildWithCountsResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/applications/{application_id}/emojis", configuration.base_path, application_id=crate::apis::urlencode(p_application_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`get_guild_application_command`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildApplicationCommandSuccess { - Status200(models::ApplicationCommandResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`get_guild_application_command_permissions`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildApplicationCommandPermissionsSuccess { - Status200(models::CommandPermissionsResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`get_guild_ban`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildBanSuccess { - Status200(models::GuildBanResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`get_guild_emoji`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildEmojiSuccess { - Status200(models::EmojiResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`get_guild_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildMemberSuccess { - Status200(models::GuildMemberResponse), - UnknownValue(serde_json::Value), -} +pub async fn list_auto_moderation_rules(configuration: &configuration::Configuration, guild_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; -/// struct for typed successes of method [`get_guild_new_member_welcome`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildNewMemberWelcomeSuccess { - Status200(models::GuildHomeSettingsResponse), - Status204(), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/guilds/{guild_id}/auto-moderation/rules", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`get_guild_preview`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildPreviewSuccess { - Status200(models::GuildPreviewResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`get_guild_role`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildRoleSuccess { - Status200(models::GuildRoleResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`get_guild_scheduled_event`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildScheduledEventSuccess { - Status200(models::ListGuildScheduledEvents200ResponseInner), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`get_guild_soundboard_sound`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildSoundboardSoundSuccess { - Status200(models::SoundboardSoundResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`get_guild_sticker`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildStickerSuccess { - Status200(models::GuildStickerResponse), - UnknownValue(serde_json::Value), -} +pub async fn list_channel_invites(configuration: &configuration::Configuration, channel_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; -/// struct for typed successes of method [`get_guild_template`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildTemplateSuccess { - Status200(models::GuildTemplateResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/channels/{channel_id}/invites", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`get_guild_vanity_url`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildVanityUrlSuccess { - Status200(models::VanityUrlResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`get_guild_webhooks`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildWebhooksSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`get_guild_welcome_screen`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildWelcomeScreenSuccess { - Status200(models::GuildWelcomeScreenResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`get_guild_widget`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildWidgetSuccess { - Status200(models::WidgetResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`get_guild_widget_png`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildWidgetPngSuccess { - Status200(String), - UnknownValue(serde_json::Value), -} +pub async fn list_channel_webhooks(configuration: &configuration::Configuration, channel_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; -/// struct for typed successes of method [`get_guild_widget_settings`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildWidgetSettingsSuccess { - Status200(models::WidgetSettingsResponse), - UnknownValue(serde_json::Value), + let uri_str = format!("{}/channels/{channel_id}/webhooks", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`get_guilds_onboarding`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildsOnboardingSuccess { - Status200(models::UserGuildOnboardingResponse), - UnknownValue(serde_json::Value), +pub async fn list_guild_application_command_permissions(configuration: &configuration::Configuration, application_id: &str, guild_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_guild_id = guild_id; + + let uri_str = format!("{}/applications/{application_id}/guilds/{guild_id}/commands/permissions", configuration.base_path, application_id=crate::apis::urlencode(p_application_id), guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`get_lobby`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetLobbySuccess { - Status200(models::LobbyResponse), - UnknownValue(serde_json::Value), -} +pub async fn list_guild_application_commands(configuration: &configuration::Configuration, application_id: &str, guild_id: &str, with_localizations: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_guild_id = guild_id; + let p_with_localizations = with_localizations; -/// struct for typed successes of method [`get_lobby_messages`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetLobbyMessagesSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/applications/{application_id}/guilds/{guild_id}/commands", configuration.base_path, application_id=crate::apis::urlencode(p_application_id), guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`get_message`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetMessageSuccess { - Status200(models::MessageResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref param_value) = p_with_localizations { + req_builder = req_builder.query(&[("with_localizations", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`get_my_application`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetMyApplicationSuccess { - Status200(models::PrivateApplicationResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`get_my_guild_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetMyGuildMemberSuccess { - Status200(models::PrivateGuildMemberResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`get_my_oauth2_application`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetMyOauth2ApplicationSuccess { - Status200(models::PrivateApplicationResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`get_my_oauth2_authorization`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetMyOauth2AuthorizationSuccess { - Status200(models::OAuth2GetAuthorizationResponse), - UnknownValue(serde_json::Value), -} +pub async fn list_guild_audit_log_entries(configuration: &configuration::Configuration, guild_id: &str, user_id: Option<&str>, target_id: Option<&str>, action_type: Option, before: Option<&str>, after: Option<&str>, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_user_id = user_id; + let p_target_id = target_id; + let p_action_type = action_type; + let p_before = before; + let p_after = after; + let p_limit = limit; -/// struct for typed successes of method [`get_my_user`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetMyUserSuccess { - Status200(models::UserPiiResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/guilds/{guild_id}/audit-logs", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`get_openid_connect_userinfo`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetOpenidConnectUserinfoSuccess { - Status200(models::OAuth2GetOpenIdConnectUserInfoResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref param_value) = p_user_id { + req_builder = req_builder.query(&[("user_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_target_id { + req_builder = req_builder.query(&[("target_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_action_type { + req_builder = req_builder.query(&[("action_type", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_before { + req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_after { + req_builder = req_builder.query(&[("after", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`get_original_webhook_message`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetOriginalWebhookMessageSuccess { - Status200(models::MessageResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`get_public_keys`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetPublicKeysSuccess { - Status200(models::OAuth2GetKeys), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`get_self_voice_state`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetSelfVoiceStateSuccess { - Status200(models::VoiceStateResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`get_soundboard_default_sounds`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetSoundboardDefaultSoundsSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), -} +pub async fn list_guild_bans(configuration: &configuration::Configuration, guild_id: &str, limit: Option, before: Option<&str>, after: Option<&str>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_limit = limit; + let p_before = before; + let p_after = after; -/// struct for typed successes of method [`get_stage_instance`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetStageInstanceSuccess { - Status200(models::StageInstanceResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/guilds/{guild_id}/bans", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`get_sticker`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetStickerSuccess { - Status200(models::GetSticker200Response), - UnknownValue(serde_json::Value), -} + if let Some(ref param_value) = p_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_before { + req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_after { + req_builder = req_builder.query(&[("after", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`get_sticker_pack`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetStickerPackSuccess { - Status200(models::StickerPackResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`get_thread_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetThreadMemberSuccess { - Status200(models::ThreadMemberResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`get_user`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetUserSuccess { - Status200(models::UserResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`get_voice_state`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetVoiceStateSuccess { - Status200(models::VoiceStateResponse), - UnknownValue(serde_json::Value), -} +pub async fn list_guild_channels(configuration: &configuration::Configuration, guild_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; -/// struct for typed successes of method [`get_webhook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetWebhookSuccess { - Status200(models::ListChannelWebhooks200ResponseInner), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/guilds/{guild_id}/channels", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`get_webhook_by_token`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetWebhookByTokenSuccess { - Status200(models::ListChannelWebhooks200ResponseInner), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`get_webhook_message`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetWebhookMessageSuccess { - Status200(models::MessageResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`invite_resolve`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum InviteResolveSuccess { - Status200(models::ListChannelInvites200ResponseInner), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`invite_revoke`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum InviteRevokeSuccess { - Status200(models::ListChannelInvites200ResponseInner), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`join_thread`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum JoinThreadSuccess { - Status204(), - UnknownValue(serde_json::Value), -} +pub async fn list_guild_emojis(configuration: &configuration::Configuration, guild_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; -/// struct for typed successes of method [`leave_guild`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum LeaveGuildSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/guilds/{guild_id}/emojis", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`leave_lobby`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum LeaveLobbySuccess { - Status204(), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`leave_thread`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum LeaveThreadSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`list_application_commands`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListApplicationCommandsSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`list_application_emojis`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListApplicationEmojisSuccess { - Status200(models::ListApplicationEmojisResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`list_auto_moderation_rules`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListAutoModerationRulesSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), +pub async fn list_guild_integrations(configuration: &configuration::Configuration, guild_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + + let uri_str = format!("{}/guilds/{guild_id}/integrations", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`list_channel_invites`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListChannelInvitesSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), +pub async fn list_guild_invites(configuration: &configuration::Configuration, guild_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + + let uri_str = format!("{}/guilds/{guild_id}/invites", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`list_channel_webhooks`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListChannelWebhooksSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), -} +pub async fn list_guild_members(configuration: &configuration::Configuration, guild_id: &str, limit: Option, after: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_limit = limit; + let p_after = after; -/// struct for typed successes of method [`list_guild_application_command_permissions`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildApplicationCommandPermissionsSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/guilds/{guild_id}/members", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`list_guild_application_commands`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildApplicationCommandsSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), -} + if let Some(ref param_value) = p_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_after { + req_builder = req_builder.query(&[("after", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`list_guild_audit_log_entries`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildAuditLogEntriesSuccess { - Status200(models::GuildAuditLogResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`list_guild_bans`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildBansSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`list_guild_channels`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildChannelsSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`list_guild_emojis`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildEmojisSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), -} +pub async fn list_guild_roles(configuration: &configuration::Configuration, guild_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; -/// struct for typed successes of method [`list_guild_integrations`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildIntegrationsSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/guilds/{guild_id}/roles", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`list_guild_invites`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildInvitesSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`list_guild_members`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildMembersSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`list_guild_roles`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildRolesSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`list_guild_scheduled_event_users`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildScheduledEventUsersSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`list_guild_scheduled_events`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildScheduledEventsSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), -} +pub async fn list_guild_scheduled_event_users(configuration: &configuration::Configuration, guild_id: &str, guild_scheduled_event_id: &str, with_member: Option, limit: Option, before: Option<&str>, after: Option<&str>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_guild_scheduled_event_id = guild_scheduled_event_id; + let p_with_member = with_member; + let p_limit = limit; + let p_before = before; + let p_after = after; -/// struct for typed successes of method [`list_guild_soundboard_sounds`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildSoundboardSoundsSuccess { - Status200(models::ListGuildSoundboardSoundsResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id}/users", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), guild_scheduled_event_id=crate::apis::urlencode(p_guild_scheduled_event_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`list_guild_stickers`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildStickersSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), -} + if let Some(ref param_value) = p_with_member { + req_builder = req_builder.query(&[("with_member", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_before { + req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_after { + req_builder = req_builder.query(&[("after", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`list_guild_templates`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildTemplatesSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`list_guild_voice_regions`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildVoiceRegionsSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`list_message_reactions_by_emoji`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListMessageReactionsByEmojiSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`list_messages`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListMessagesSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), -} +pub async fn list_guild_scheduled_events(configuration: &configuration::Configuration, guild_id: &str, with_user_count: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_with_user_count = with_user_count; -/// struct for typed successes of method [`list_my_connections`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListMyConnectionsSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/guilds/{guild_id}/scheduled-events", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`list_my_guilds`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListMyGuildsSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), -} + if let Some(ref param_value) = p_with_user_count { + req_builder = req_builder.query(&[("with_user_count", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`list_my_private_archived_threads`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListMyPrivateArchivedThreadsSuccess { - Status200(models::ThreadsResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`list_pins`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListPinsSuccess { - Status200(models::PinnedMessagesResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`list_private_archived_threads`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListPrivateArchivedThreadsSuccess { - Status200(models::ThreadsResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`list_public_archived_threads`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListPublicArchivedThreadsSuccess { - Status200(models::ThreadsResponse), - UnknownValue(serde_json::Value), -} +pub async fn list_guild_soundboard_sounds(configuration: &configuration::Configuration, guild_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; -/// struct for typed successes of method [`list_sticker_packs`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListStickerPacksSuccess { - Status200(models::StickerPackCollectionResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/guilds/{guild_id}/soundboard-sounds", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`list_thread_members`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListThreadMembersSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`list_voice_regions`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListVoiceRegionsSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`partner_sdk_token`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum PartnerSdkTokenSuccess { - Status200(models::ProvisionalTokenResponse), - UnknownValue(serde_json::Value), + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`partner_sdk_unmerge_provisional_account`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum PartnerSdkUnmergeProvisionalAccountSuccess { - Status204(), - UnknownValue(serde_json::Value), +pub async fn list_guild_stickers(configuration: &configuration::Configuration, guild_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + + let uri_str = format!("{}/guilds/{guild_id}/stickers", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`poll_expire`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum PollExpireSuccess { - Status200(models::MessageResponse), - UnknownValue(serde_json::Value), +pub async fn list_guild_templates(configuration: &configuration::Configuration, guild_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + + let uri_str = format!("{}/guilds/{guild_id}/templates", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`preview_prune_guild`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum PreviewPruneGuildSuccess { - Status200(models::GuildPruneResponse), - UnknownValue(serde_json::Value), -} +pub async fn list_guild_voice_regions(configuration: &configuration::Configuration, guild_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; -/// struct for typed successes of method [`prune_guild`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum PruneGuildSuccess { - Status200(models::GuildPruneResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/guilds/{guild_id}/regions", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`put_guilds_onboarding`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum PutGuildsOnboardingSuccess { - Status200(models::GuildOnboardingResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`search_guild_members`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum SearchGuildMembersSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`send_soundboard_sound`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum SendSoundboardSoundSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`set_channel_permission_overwrite`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum SetChannelPermissionOverwriteSuccess { - Status204(), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`set_guild_application_command_permissions`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum SetGuildApplicationCommandPermissionsSuccess { - Status200(models::CommandPermissionsResponse), - UnknownValue(serde_json::Value), -} +pub async fn list_message_reactions_by_emoji(configuration: &configuration::Configuration, channel_id: &str, message_id: &str, emoji_name: &str, after: Option<&str>, limit: Option, r#type: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_message_id = message_id; + let p_emoji_name = emoji_name; + let p_after = after; + let p_limit = limit; + let p_type = r#type; -/// struct for typed successes of method [`set_guild_mfa_level`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum SetGuildMfaLevelSuccess { - Status200(models::GuildMfaLevelResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/channels/{channel_id}/messages/{message_id}/reactions/{emoji_name}", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id), message_id=crate::apis::urlencode(p_message_id), emoji_name=crate::apis::urlencode(p_emoji_name)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`sync_guild_template`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum SyncGuildTemplateSuccess { - Status200(models::GuildTemplateResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref param_value) = p_after { + req_builder = req_builder.query(&[("after", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_type { + req_builder = req_builder.query(&[("type", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`thread_search`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ThreadSearchSuccess { - Status200(models::ThreadSearchResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`trigger_typing_indicator`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum TriggerTypingIndicatorSuccess { - Status200(serde_json::Value), - Status204(), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`unban_user_from_guild`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UnbanUserFromGuildSuccess { - Status204(), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`update_application`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateApplicationSuccess { - Status200(models::PrivateApplicationResponse), - UnknownValue(serde_json::Value), -} +pub async fn list_messages(configuration: &configuration::Configuration, channel_id: &str, around: Option<&str>, before: Option<&str>, after: Option<&str>, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_around = around; + let p_before = before; + let p_after = after; + let p_limit = limit; -/// struct for typed successes of method [`update_application_command`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateApplicationCommandSuccess { - Status200(models::ApplicationCommandResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/channels/{channel_id}/messages", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`update_application_emoji`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateApplicationEmojiSuccess { - Status200(models::EmojiResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref param_value) = p_around { + req_builder = req_builder.query(&[("around", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_before { + req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_after { + req_builder = req_builder.query(&[("after", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`update_application_role_connections_metadata`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateApplicationRoleConnectionsMetadataSuccess { - Status200(Vec), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`update_application_user_role_connection`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateApplicationUserRoleConnectionSuccess { - Status200(models::ApplicationUserRoleConnectionResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`update_auto_moderation_rule`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateAutoModerationRuleSuccess { - Status200(models::CreateAutoModerationRule200Response), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`update_channel`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateChannelSuccess { - Status200(models::GetChannel200Response), - UnknownValue(serde_json::Value), -} +pub async fn list_my_connections(configuration: &configuration::Configuration, ) -> Result, Error> { -/// struct for typed successes of method [`update_guild`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateGuildSuccess { - Status200(models::GuildResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/users/@me/connections", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`update_guild_application_command`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateGuildApplicationCommandSuccess { - Status200(models::ApplicationCommandResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`update_guild_emoji`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateGuildEmojiSuccess { - Status200(models::EmojiResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`update_guild_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateGuildMemberSuccess { - Status200(models::GuildMemberResponse), - Status204(), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`update_guild_role`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateGuildRoleSuccess { - Status200(models::GuildRoleResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`update_guild_scheduled_event`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateGuildScheduledEventSuccess { - Status200(models::ListGuildScheduledEvents200ResponseInner), - UnknownValue(serde_json::Value), -} +pub async fn list_my_guilds(configuration: &configuration::Configuration, before: Option<&str>, after: Option<&str>, limit: Option, with_counts: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_before = before; + let p_after = after; + let p_limit = limit; + let p_with_counts = with_counts; -/// struct for typed successes of method [`update_guild_soundboard_sound`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateGuildSoundboardSoundSuccess { - Status200(models::SoundboardSoundResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/users/@me/guilds", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`update_guild_sticker`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateGuildStickerSuccess { - Status200(models::GuildStickerResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref param_value) = p_before { + req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_after { + req_builder = req_builder.query(&[("after", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_with_counts { + req_builder = req_builder.query(&[("with_counts", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`update_guild_template`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateGuildTemplateSuccess { - Status200(models::GuildTemplateResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`update_guild_welcome_screen`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateGuildWelcomeScreenSuccess { - Status200(models::GuildWelcomeScreenResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`update_guild_widget_settings`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateGuildWidgetSettingsSuccess { - Status200(models::WidgetSettingsResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`update_message`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateMessageSuccess { - Status200(models::MessageResponse), - UnknownValue(serde_json::Value), +pub async fn list_my_private_archived_threads(configuration: &configuration::Configuration, channel_id: &str, before: Option<&str>, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_before = before; + let p_limit = limit; + + let uri_str = format!("{}/channels/{channel_id}/users/@me/threads/archived/private", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_before { + req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`update_my_application`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateMyApplicationSuccess { - Status200(models::PrivateApplicationResponse), - UnknownValue(serde_json::Value), -} +pub async fn list_pins(configuration: &configuration::Configuration, channel_id: &str, before: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_before = before; + let p_limit = limit; + + let uri_str = format!("{}/channels/{channel_id}/messages/pins", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_before { + req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`update_my_guild_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateMyGuildMemberSuccess { - Status200(models::PrivateGuildMemberResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`update_my_user`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateMyUserSuccess { - Status200(models::UserPiiResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`update_original_webhook_message`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateOriginalWebhookMessageSuccess { - Status200(models::MessageResponse), - UnknownValue(serde_json::Value), -} +pub async fn list_private_archived_threads(configuration: &configuration::Configuration, channel_id: &str, before: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_before = before; + let p_limit = limit; -/// struct for typed successes of method [`update_self_voice_state`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateSelfVoiceStateSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/channels/{channel_id}/threads/archived/private", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed successes of method [`update_stage_instance`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateStageInstanceSuccess { - Status200(models::StageInstanceResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref param_value) = p_before { + req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed successes of method [`update_voice_state`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateVoiceStateSuccess { - Status204(), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed successes of method [`update_webhook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateWebhookSuccess { - Status200(models::ListChannelWebhooks200ResponseInner), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed successes of method [`update_webhook_by_token`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateWebhookByTokenSuccess { - Status200(models::ListChannelWebhooks200ResponseInner), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed successes of method [`update_webhook_message`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateWebhookMessageSuccess { - Status200(models::MessageResponse), - UnknownValue(serde_json::Value), -} +pub async fn list_public_archived_threads(configuration: &configuration::Configuration, channel_id: &str, before: Option, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_before = before; + let p_limit = limit; -/// struct for typed successes of method [`upload_application_attachment`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UploadApplicationAttachmentSuccess { - Status200(models::ActivitiesAttachmentResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/channels/{channel_id}/threads/archived/public", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed errors of method [`add_group_dm_user`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AddGroupDmUserError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref param_value) = p_before { + req_builder = req_builder.query(&[("before", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed errors of method [`add_guild_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AddGuildMemberError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`add_guild_member_role`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AddGuildMemberRoleError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`add_lobby_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AddLobbyMemberError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`add_my_message_reaction`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AddMyMessageReactionError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn list_sticker_packs(configuration: &configuration::Configuration, ) -> Result, Error> { -/// struct for typed errors of method [`add_thread_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum AddThreadMemberError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/sticker-packs", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed errors of method [`applications_get_activity_instance`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ApplicationsGetActivityInstanceError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed errors of method [`ban_user_from_guild`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum BanUserFromGuildError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`bulk_ban_users_from_guild`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum BulkBanUsersFromGuildError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`bulk_delete_messages`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum BulkDeleteMessagesError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`bulk_set_application_commands`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum BulkSetApplicationCommandsError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn list_thread_members(configuration: &configuration::Configuration, channel_id: &str, with_member: Option, limit: Option, after: Option<&str>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_with_member = with_member; + let p_limit = limit; + let p_after = after; -/// struct for typed errors of method [`bulk_set_guild_application_commands`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum BulkSetGuildApplicationCommandsError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/channels/{channel_id}/thread-members", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed errors of method [`bulk_update_guild_channels`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum BulkUpdateGuildChannelsError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref param_value) = p_with_member { + req_builder = req_builder.query(&[("with_member", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_after { + req_builder = req_builder.query(&[("after", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed errors of method [`bulk_update_guild_roles`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum BulkUpdateGuildRolesError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`bulk_update_lobby_members`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum BulkUpdateLobbyMembersError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`consume_entitlement`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ConsumeEntitlementError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`create_application_command`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateApplicationCommandError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn list_voice_regions(configuration: &configuration::Configuration, ) -> Result, Error> { -/// struct for typed errors of method [`create_application_emoji`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateApplicationEmojiError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/voice/regions", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed errors of method [`create_auto_moderation_rule`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateAutoModerationRuleError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed errors of method [`create_channel_invite`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateChannelInviteError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`create_dm`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateDmError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`create_entitlement`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateEntitlementError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), +pub async fn partner_sdk_token(configuration: &configuration::Configuration, partner_sdk_unmerge_provisional_account_request: models::PartnerSdkUnmergeProvisionalAccountRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_partner_sdk_unmerge_provisional_account_request = partner_sdk_unmerge_provisional_account_request; + + let uri_str = format!("{}/partner-sdk/token", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_partner_sdk_unmerge_provisional_account_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`create_guild`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateGuildError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn partner_sdk_unmerge_provisional_account(configuration: &configuration::Configuration, partner_sdk_unmerge_provisional_account_request: models::PartnerSdkUnmergeProvisionalAccountRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_partner_sdk_unmerge_provisional_account_request = partner_sdk_unmerge_provisional_account_request; -/// struct for typed errors of method [`create_guild_application_command`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateGuildApplicationCommandError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/partner-sdk/provisional-accounts/unmerge", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); -/// struct for typed errors of method [`create_guild_channel`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateGuildChannelError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_partner_sdk_unmerge_provisional_account_request); -/// struct for typed errors of method [`create_guild_emoji`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateGuildEmojiError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`create_guild_from_template`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateGuildFromTemplateError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`create_guild_role`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateGuildRoleError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`create_guild_scheduled_event`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateGuildScheduledEventError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn poll_expire(configuration: &configuration::Configuration, channel_id: &str, message_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_message_id = message_id; -/// struct for typed errors of method [`create_guild_soundboard_sound`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateGuildSoundboardSoundError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/channels/{channel_id}/polls/{message_id}/expire", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id), message_id=crate::apis::urlencode(p_message_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); -/// struct for typed errors of method [`create_guild_sticker`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateGuildStickerError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed errors of method [`create_guild_template`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateGuildTemplateError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`create_interaction_response`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateInteractionResponseError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`create_lobby`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateLobbyError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`create_lobby_message`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateLobbyMessageError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn preview_prune_guild(configuration: &configuration::Configuration, guild_id: &str, days: Option, include_roles: Option<&str>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_days = days; + let p_include_roles = include_roles; -/// struct for typed errors of method [`create_message`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateMessageError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/guilds/{guild_id}/prune", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed errors of method [`create_or_join_lobby`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateOrJoinLobbyError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref param_value) = p_days { + req_builder = req_builder.query(&[("days", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_include_roles { + req_builder = req_builder.query(&[("include_roles", &serde_json::to_string(param_value)?)]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed errors of method [`create_pin`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreatePinError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`create_stage_instance`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateStageInstanceError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`create_thread`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateThreadError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`create_thread_from_message`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateThreadFromMessageError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn prune_guild(configuration: &configuration::Configuration, guild_id: &str, prune_guild_request: models::PruneGuildRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_prune_guild_request = prune_guild_request; -/// struct for typed errors of method [`create_webhook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CreateWebhookError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/guilds/{guild_id}/prune", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); -/// struct for typed errors of method [`crosspost_message`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum CrosspostMessageError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_prune_guild_request); -/// struct for typed errors of method [`delete_all_message_reactions`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteAllMessageReactionsError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`delete_all_message_reactions_by_emoji`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteAllMessageReactionsByEmojiError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`delete_application_command`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteApplicationCommandError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`delete_application_emoji`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteApplicationEmojiError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn put_guilds_onboarding(configuration: &configuration::Configuration, guild_id: &str, update_guild_onboarding_request: models::UpdateGuildOnboardingRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_update_guild_onboarding_request = update_guild_onboarding_request; -/// struct for typed errors of method [`delete_application_user_role_connection`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteApplicationUserRoleConnectionError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/guilds/{guild_id}/onboarding", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); -/// struct for typed errors of method [`delete_auto_moderation_rule`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteAutoModerationRuleError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_update_guild_onboarding_request); -/// struct for typed errors of method [`delete_channel`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteChannelError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`delete_channel_permission_overwrite`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteChannelPermissionOverwriteError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`delete_entitlement`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteEntitlementError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`delete_group_dm_user`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteGroupDmUserError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn search_guild_members(configuration: &configuration::Configuration, query: &str, guild_id: &str, limit: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_query = query; + let p_guild_id = guild_id; + let p_limit = limit; -/// struct for typed errors of method [`delete_guild`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteGuildError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/guilds/{guild_id}/members/search", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed errors of method [`delete_guild_application_command`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteGuildApplicationCommandError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref param_value) = p_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + req_builder = req_builder.query(&[("query", &p_query.to_string())]); + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed errors of method [`delete_guild_emoji`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteGuildEmojiError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`delete_guild_integration`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteGuildIntegrationError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`delete_guild_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteGuildMemberError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`delete_guild_member_role`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteGuildMemberRoleError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn send_soundboard_sound(configuration: &configuration::Configuration, channel_id: &str, soundboard_sound_send_request: models::SoundboardSoundSendRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_soundboard_sound_send_request = soundboard_sound_send_request; -/// struct for typed errors of method [`delete_guild_role`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteGuildRoleError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/channels/{channel_id}/send-soundboard-sound", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); -/// struct for typed errors of method [`delete_guild_scheduled_event`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteGuildScheduledEventError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_soundboard_sound_send_request); -/// struct for typed errors of method [`delete_guild_soundboard_sound`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteGuildSoundboardSoundError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`delete_guild_sticker`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteGuildStickerError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`delete_guild_template`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteGuildTemplateError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`delete_lobby_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteLobbyMemberError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn set_channel_permission_overwrite(configuration: &configuration::Configuration, channel_id: &str, overwrite_id: &str, set_channel_permission_overwrite_request: models::SetChannelPermissionOverwriteRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_overwrite_id = overwrite_id; + let p_set_channel_permission_overwrite_request = set_channel_permission_overwrite_request; -/// struct for typed errors of method [`delete_message`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteMessageError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/channels/{channel_id}/permissions/{overwrite_id}", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id), overwrite_id=crate::apis::urlencode(p_overwrite_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); -/// struct for typed errors of method [`delete_my_message_reaction`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteMyMessageReactionError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_set_channel_permission_overwrite_request); -/// struct for typed errors of method [`delete_original_webhook_message`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteOriginalWebhookMessageError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`delete_pin`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeletePinError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`delete_stage_instance`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteStageInstanceError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`delete_thread_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteThreadMemberError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn set_guild_application_command_permissions(configuration: &configuration::Configuration, application_id: &str, guild_id: &str, command_id: &str, set_guild_application_command_permissions_request: models::SetGuildApplicationCommandPermissionsRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_guild_id = guild_id; + let p_command_id = command_id; + let p_set_guild_application_command_permissions_request = set_guild_application_command_permissions_request; -/// struct for typed errors of method [`delete_user_message_reaction`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteUserMessageReactionError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/applications/{application_id}/guilds/{guild_id}/commands/{command_id}/permissions", configuration.base_path, application_id=crate::apis::urlencode(p_application_id), guild_id=crate::apis::urlencode(p_guild_id), command_id=crate::apis::urlencode(p_command_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); -/// struct for typed errors of method [`delete_webhook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteWebhookError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_set_guild_application_command_permissions_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} -/// struct for typed errors of method [`delete_webhook_by_token`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteWebhookByTokenError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn set_guild_mfa_level(configuration: &configuration::Configuration, guild_id: &str, guild_mfa_request: models::GuildMfaRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_guild_mfa_request = guild_mfa_request; + + let uri_str = format!("{}/guilds/{guild_id}/mfa", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); -/// struct for typed errors of method [`delete_webhook_message`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeleteWebhookMessageError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_guild_mfa_request); -/// struct for typed errors of method [`deprecated_create_pin`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeprecatedCreatePinError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`deprecated_delete_pin`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeprecatedDeletePinError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`deprecated_list_pins`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum DeprecatedListPinsError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`edit_lobby`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum EditLobbyError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn sync_guild_template(configuration: &configuration::Configuration, guild_id: &str, code: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_code = code; -/// struct for typed errors of method [`edit_lobby_channel_link`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum EditLobbyChannelLinkError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/guilds/{guild_id}/templates/{code}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), code=crate::apis::urlencode(p_code)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); -/// struct for typed errors of method [`execute_github_compatible_webhook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ExecuteGithubCompatibleWebhookError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed errors of method [`execute_slack_compatible_webhook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ExecuteSlackCompatibleWebhookError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`execute_webhook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ExecuteWebhookError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`follow_channel`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum FollowChannelError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`get_active_guild_threads`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetActiveGuildThreadsError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn thread_search(configuration: &configuration::Configuration, channel_id: &str, name: Option<&str>, slop: Option, min_id: Option<&str>, max_id: Option<&str>, tag: Option<&str>, tag_setting: Option<&str>, archived: Option, sort_by: Option<&str>, sort_order: Option<&str>, limit: Option, offset: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_name = name; + let p_slop = slop; + let p_min_id = min_id; + let p_max_id = max_id; + let p_tag = tag; + let p_tag_setting = tag_setting; + let p_archived = archived; + let p_sort_by = sort_by; + let p_sort_order = sort_order; + let p_limit = limit; + let p_offset = offset; -/// struct for typed errors of method [`get_answer_voters`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetAnswerVotersError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/channels/{channel_id}/threads/search", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); -/// struct for typed errors of method [`get_application`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetApplicationError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref param_value) = p_name { + req_builder = req_builder.query(&[("name", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_slop { + req_builder = req_builder.query(&[("slop", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_min_id { + req_builder = req_builder.query(&[("min_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_max_id { + req_builder = req_builder.query(&[("max_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_tag { + req_builder = req_builder.query(&[("tag", &serde_json::to_string(param_value)?)]); + } + if let Some(ref param_value) = p_tag_setting { + req_builder = req_builder.query(&[("tag_setting", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_archived { + req_builder = req_builder.query(&[("archived", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_sort_by { + req_builder = req_builder.query(&[("sort_by", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_sort_order { + req_builder = req_builder.query(&[("sort_order", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_offset { + req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; -/// struct for typed errors of method [`get_application_command`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetApplicationCommandError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`get_application_emoji`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetApplicationEmojiError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`get_application_role_connections_metadata`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetApplicationRoleConnectionsMetadataError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), +pub async fn trigger_typing_indicator(configuration: &configuration::Configuration, channel_id: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + + let uri_str = format!("{}/channels/{channel_id}/typing", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`get_application_user_role_connection`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetApplicationUserRoleConnectionError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn unban_user_from_guild(configuration: &configuration::Configuration, guild_id: &str, user_id: &str, body: serde_json::Value) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_user_id = user_id; + let p_body = body; -/// struct for typed errors of method [`get_auto_moderation_rule`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetAutoModerationRuleError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/guilds/{guild_id}/bans/{user_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), user_id=crate::apis::urlencode(p_user_id)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); -/// struct for typed errors of method [`get_bot_gateway`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetBotGatewayError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_body); -/// struct for typed errors of method [`get_channel`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetChannelError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`get_entitlement`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetEntitlementError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`get_entitlements`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetEntitlementsError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`get_gateway`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGatewayError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn update_application(configuration: &configuration::Configuration, application_id: &str, application_form_partial: models::ApplicationFormPartial) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_application_form_partial = application_form_partial; -/// struct for typed errors of method [`get_guild`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/applications/{application_id}", configuration.base_path, application_id=crate::apis::urlencode(p_application_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); -/// struct for typed errors of method [`get_guild_application_command`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildApplicationCommandError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_application_form_partial); -/// struct for typed errors of method [`get_guild_application_command_permissions`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildApplicationCommandPermissionsError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`get_guild_ban`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildBanError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`get_guild_emoji`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildEmojiError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`get_guild_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildMemberError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn update_application_command(configuration: &configuration::Configuration, application_id: &str, command_id: &str, application_command_patch_request_partial: models::ApplicationCommandPatchRequestPartial) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_command_id = command_id; + let p_application_command_patch_request_partial = application_command_patch_request_partial; -/// struct for typed errors of method [`get_guild_new_member_welcome`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildNewMemberWelcomeError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/applications/{application_id}/commands/{command_id}", configuration.base_path, application_id=crate::apis::urlencode(p_application_id), command_id=crate::apis::urlencode(p_command_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); -/// struct for typed errors of method [`get_guild_preview`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildPreviewError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_application_command_patch_request_partial); -/// struct for typed errors of method [`get_guild_role`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildRoleError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`get_guild_scheduled_event`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildScheduledEventError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`get_guild_soundboard_sound`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildSoundboardSoundError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`get_guild_sticker`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildStickerError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn update_application_emoji(configuration: &configuration::Configuration, application_id: &str, emoji_id: &str, update_application_emoji_request: models::UpdateApplicationEmojiRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_emoji_id = emoji_id; + let p_update_application_emoji_request = update_application_emoji_request; + + let uri_str = format!("{}/applications/{application_id}/emojis/{emoji_id}", configuration.base_path, application_id=crate::apis::urlencode(p_application_id), emoji_id=crate::apis::urlencode(p_emoji_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_update_application_emoji_request); -/// struct for typed errors of method [`get_guild_template`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildTemplateError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`get_guild_vanity_url`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildVanityUrlError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`get_guild_webhooks`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildWebhooksError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`get_guild_welcome_screen`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildWelcomeScreenError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn update_application_role_connections_metadata(configuration: &configuration::Configuration, application_id: &str, application_role_connections_metadata_item_request: Option>) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_application_role_connections_metadata_item_request = application_role_connections_metadata_item_request; + + let uri_str = format!("{}/applications/{application_id}/role-connections/metadata", configuration.base_path, application_id=crate::apis::urlencode(p_application_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_application_role_connections_metadata_item_request); -/// struct for typed errors of method [`get_guild_widget`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildWidgetError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`get_guild_widget_png`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildWidgetPngError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`get_guild_widget_settings`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildWidgetSettingsError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`get_guilds_onboarding`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetGuildsOnboardingError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn update_application_user_role_connection(configuration: &configuration::Configuration, application_id: &str, update_application_user_role_connection_request: models::UpdateApplicationUserRoleConnectionRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_update_application_user_role_connection_request = update_application_user_role_connection_request; -/// struct for typed errors of method [`get_lobby`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetLobbyError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/users/@me/applications/{application_id}/role-connection", configuration.base_path, application_id=crate::apis::urlencode(p_application_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PUT, &uri_str); -/// struct for typed errors of method [`get_lobby_messages`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetLobbyMessagesError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_update_application_user_role_connection_request); -/// struct for typed errors of method [`get_message`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetMessageError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`get_my_application`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetMyApplicationError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`get_my_guild_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetMyGuildMemberError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`get_my_oauth2_application`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetMyOauth2ApplicationError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn update_auto_moderation_rule(configuration: &configuration::Configuration, guild_id: &str, rule_id: &str, update_auto_moderation_rule_request: models::UpdateAutoModerationRuleRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_rule_id = rule_id; + let p_update_auto_moderation_rule_request = update_auto_moderation_rule_request; + + let uri_str = format!("{}/guilds/{guild_id}/auto-moderation/rules/{rule_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), rule_id=crate::apis::urlencode(p_rule_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_update_auto_moderation_rule_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn update_channel(configuration: &configuration::Configuration, channel_id: &str, update_channel_request: models::UpdateChannelRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_update_channel_request = update_channel_request; + + let uri_str = format!("{}/channels/{channel_id}", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_update_channel_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn update_guild(configuration: &configuration::Configuration, guild_id: &str, guild_patch_request_partial: models::GuildPatchRequestPartial) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_guild_patch_request_partial = guild_patch_request_partial; + + let uri_str = format!("{}/guilds/{guild_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_guild_patch_request_partial); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`get_my_oauth2_authorization`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetMyOauth2AuthorizationError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`get_my_user`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetMyUserError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`get_openid_connect_userinfo`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetOpenidConnectUserinfoError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn update_guild_application_command(configuration: &configuration::Configuration, application_id: &str, guild_id: &str, command_id: &str, application_command_patch_request_partial: models::ApplicationCommandPatchRequestPartial) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_guild_id = guild_id; + let p_command_id = command_id; + let p_application_command_patch_request_partial = application_command_patch_request_partial; -/// struct for typed errors of method [`get_original_webhook_message`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetOriginalWebhookMessageError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/applications/{application_id}/guilds/{guild_id}/commands/{command_id}", configuration.base_path, application_id=crate::apis::urlencode(p_application_id), guild_id=crate::apis::urlencode(p_guild_id), command_id=crate::apis::urlencode(p_command_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); -/// struct for typed errors of method [`get_public_keys`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetPublicKeysError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_application_command_patch_request_partial); -/// struct for typed errors of method [`get_self_voice_state`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetSelfVoiceStateError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`get_soundboard_default_sounds`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetSoundboardDefaultSoundsError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`get_stage_instance`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetStageInstanceError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`get_sticker`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetStickerError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn update_guild_emoji(configuration: &configuration::Configuration, guild_id: &str, emoji_id: &str, update_guild_emoji_request: models::UpdateGuildEmojiRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_emoji_id = emoji_id; + let p_update_guild_emoji_request = update_guild_emoji_request; -/// struct for typed errors of method [`get_sticker_pack`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetStickerPackError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/guilds/{guild_id}/emojis/{emoji_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), emoji_id=crate::apis::urlencode(p_emoji_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); -/// struct for typed errors of method [`get_thread_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetThreadMemberError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_update_guild_emoji_request); -/// struct for typed errors of method [`get_user`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetUserError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`get_voice_state`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetVoiceStateError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`get_webhook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetWebhookError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`get_webhook_by_token`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetWebhookByTokenError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn update_guild_member(configuration: &configuration::Configuration, guild_id: &str, user_id: &str, update_guild_member_request: models::UpdateGuildMemberRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_user_id = user_id; + let p_update_guild_member_request = update_guild_member_request; -/// struct for typed errors of method [`get_webhook_message`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum GetWebhookMessageError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/guilds/{guild_id}/members/{user_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), user_id=crate::apis::urlencode(p_user_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); -/// struct for typed errors of method [`invite_resolve`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum InviteResolveError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_update_guild_member_request); -/// struct for typed errors of method [`invite_revoke`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum InviteRevokeError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`join_thread`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum JoinThreadError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`leave_guild`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum LeaveGuildError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`leave_lobby`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum LeaveLobbyError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn update_guild_role(configuration: &configuration::Configuration, guild_id: &str, role_id: &str, update_role_request_partial: models::UpdateRoleRequestPartial) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_role_id = role_id; + let p_update_role_request_partial = update_role_request_partial; -/// struct for typed errors of method [`leave_thread`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum LeaveThreadError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/guilds/{guild_id}/roles/{role_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), role_id=crate::apis::urlencode(p_role_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); -/// struct for typed errors of method [`list_application_commands`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListApplicationCommandsError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_update_role_request_partial); -/// struct for typed errors of method [`list_application_emojis`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListApplicationEmojisError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`list_auto_moderation_rules`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListAutoModerationRulesError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`list_channel_invites`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListChannelInvitesError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`list_channel_webhooks`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListChannelWebhooksError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn update_guild_scheduled_event(configuration: &configuration::Configuration, guild_id: &str, guild_scheduled_event_id: &str, update_guild_scheduled_event_request: models::UpdateGuildScheduledEventRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_guild_scheduled_event_id = guild_scheduled_event_id; + let p_update_guild_scheduled_event_request = update_guild_scheduled_event_request; -/// struct for typed errors of method [`list_guild_application_command_permissions`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildApplicationCommandPermissionsError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/guilds/{guild_id}/scheduled-events/{guild_scheduled_event_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), guild_scheduled_event_id=crate::apis::urlencode(p_guild_scheduled_event_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); -/// struct for typed errors of method [`list_guild_application_commands`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildApplicationCommandsError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_update_guild_scheduled_event_request); -/// struct for typed errors of method [`list_guild_audit_log_entries`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildAuditLogEntriesError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`list_guild_bans`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildBansError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`list_guild_channels`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildChannelsError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`list_guild_emojis`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildEmojisError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn update_guild_soundboard_sound(configuration: &configuration::Configuration, guild_id: &str, sound_id: &str, soundboard_patch_request_partial: models::SoundboardPatchRequestPartial) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_sound_id = sound_id; + let p_soundboard_patch_request_partial = soundboard_patch_request_partial; + + let uri_str = format!("{}/guilds/{guild_id}/soundboard-sounds/{sound_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), sound_id=crate::apis::urlencode(p_sound_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_soundboard_patch_request_partial); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); -/// struct for typed errors of method [`list_guild_integrations`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildIntegrationsError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`list_guild_invites`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildInvitesError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn update_guild_sticker(configuration: &configuration::Configuration, guild_id: &str, sticker_id: &str, update_guild_sticker_request: models::UpdateGuildStickerRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_sticker_id = sticker_id; + let p_update_guild_sticker_request = update_guild_sticker_request; -/// struct for typed errors of method [`list_guild_members`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildMembersError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/guilds/{guild_id}/stickers/{sticker_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), sticker_id=crate::apis::urlencode(p_sticker_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); -/// struct for typed errors of method [`list_guild_roles`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildRolesError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_update_guild_sticker_request); -/// struct for typed errors of method [`list_guild_scheduled_event_users`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildScheduledEventUsersError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`list_guild_scheduled_events`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildScheduledEventsError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`list_guild_soundboard_sounds`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildSoundboardSoundsError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`list_guild_stickers`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildStickersError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn update_guild_template(configuration: &configuration::Configuration, guild_id: &str, code: &str, update_guild_template_request: models::UpdateGuildTemplateRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_code = code; + let p_update_guild_template_request = update_guild_template_request; -/// struct for typed errors of method [`list_guild_templates`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildTemplatesError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/guilds/{guild_id}/templates/{code}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), code=crate::apis::urlencode(p_code)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); -/// struct for typed errors of method [`list_guild_voice_regions`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListGuildVoiceRegionsError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_update_guild_template_request); -/// struct for typed errors of method [`list_message_reactions_by_emoji`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListMessageReactionsByEmojiError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`list_messages`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListMessagesError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`list_my_connections`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListMyConnectionsError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`list_my_guilds`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListMyGuildsError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn update_guild_welcome_screen(configuration: &configuration::Configuration, guild_id: &str, welcome_screen_patch_request_partial: models::WelcomeScreenPatchRequestPartial) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_welcome_screen_patch_request_partial = welcome_screen_patch_request_partial; -/// struct for typed errors of method [`list_my_private_archived_threads`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListMyPrivateArchivedThreadsError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/guilds/{guild_id}/welcome-screen", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); -/// struct for typed errors of method [`list_pins`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListPinsError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_welcome_screen_patch_request_partial); -/// struct for typed errors of method [`list_private_archived_threads`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListPrivateArchivedThreadsError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`list_public_archived_threads`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListPublicArchivedThreadsError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`list_sticker_packs`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListStickerPacksError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`list_thread_members`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListThreadMembersError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn update_guild_widget_settings(configuration: &configuration::Configuration, guild_id: &str, update_guild_widget_settings_request: models::UpdateGuildWidgetSettingsRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_update_guild_widget_settings_request = update_guild_widget_settings_request; -/// struct for typed errors of method [`list_voice_regions`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ListVoiceRegionsError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/guilds/{guild_id}/widget", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); -/// struct for typed errors of method [`partner_sdk_token`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum PartnerSdkTokenError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_update_guild_widget_settings_request); -/// struct for typed errors of method [`partner_sdk_unmerge_provisional_account`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum PartnerSdkUnmergeProvisionalAccountError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`poll_expire`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum PollExpireError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`preview_prune_guild`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum PreviewPruneGuildError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`prune_guild`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum PruneGuildError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn update_message(configuration: &configuration::Configuration, channel_id: &str, message_id: &str, message_edit_request_partial: models::MessageEditRequestPartial) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_message_id = message_id; + let p_message_edit_request_partial = message_edit_request_partial; -/// struct for typed errors of method [`put_guilds_onboarding`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum PutGuildsOnboardingError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/channels/{channel_id}/messages/{message_id}", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id), message_id=crate::apis::urlencode(p_message_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); -/// struct for typed errors of method [`search_guild_members`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum SearchGuildMembersError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_message_edit_request_partial); -/// struct for typed errors of method [`send_soundboard_sound`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum SendSoundboardSoundError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`set_channel_permission_overwrite`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum SetChannelPermissionOverwriteError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`set_guild_application_command_permissions`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum SetGuildApplicationCommandPermissionsError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), +pub async fn update_my_application(configuration: &configuration::Configuration, application_form_partial: models::ApplicationFormPartial) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_form_partial = application_form_partial; + + let uri_str = format!("{}/applications/@me", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_application_form_partial); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`set_guild_mfa_level`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum SetGuildMfaLevelError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), +pub async fn update_my_guild_member(configuration: &configuration::Configuration, guild_id: &str, update_my_guild_member_request: models::UpdateMyGuildMemberRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_update_my_guild_member_request = update_my_guild_member_request; + + let uri_str = format!("{}/guilds/{guild_id}/members/@me", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_update_my_guild_member_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`sync_guild_template`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum SyncGuildTemplateError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), +pub async fn update_my_user(configuration: &configuration::Configuration, bot_account_patch_request: models::BotAccountPatchRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_bot_account_patch_request = bot_account_patch_request; + + let uri_str = format!("{}/users/@me", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_bot_account_patch_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`thread_search`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum ThreadSearchError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn update_original_webhook_message(configuration: &configuration::Configuration, webhook_id: &str, webhook_token: &str, incoming_webhook_update_request_partial: models::IncomingWebhookUpdateRequestPartial, thread_id: Option<&str>, with_components: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_webhook_id = webhook_id; + let p_webhook_token = webhook_token; + let p_incoming_webhook_update_request_partial = incoming_webhook_update_request_partial; + let p_thread_id = thread_id; + let p_with_components = with_components; -/// struct for typed errors of method [`trigger_typing_indicator`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum TriggerTypingIndicatorError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/webhooks/{webhook_id}/{webhook_token}/messages/@original", configuration.base_path, webhook_id=crate::apis::urlencode(p_webhook_id), webhook_token=crate::apis::urlencode(p_webhook_token)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); -/// struct for typed errors of method [`unban_user_from_guild`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UnbanUserFromGuildError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref param_value) = p_thread_id { + req_builder = req_builder.query(&[("thread_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_with_components { + req_builder = req_builder.query(&[("with_components", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_incoming_webhook_update_request_partial); -/// struct for typed errors of method [`update_application`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateApplicationError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`update_application_command`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateApplicationCommandError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`update_application_emoji`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateApplicationEmojiError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`update_application_role_connections_metadata`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateApplicationRoleConnectionsMetadataError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn update_self_voice_state(configuration: &configuration::Configuration, guild_id: &str, update_self_voice_state_request_partial: models::UpdateSelfVoiceStateRequestPartial) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_update_self_voice_state_request_partial = update_self_voice_state_request_partial; -/// struct for typed errors of method [`update_application_user_role_connection`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateApplicationUserRoleConnectionError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/guilds/{guild_id}/voice-states/@me", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); -/// struct for typed errors of method [`update_auto_moderation_rule`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateAutoModerationRuleError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_update_self_voice_state_request_partial); -/// struct for typed errors of method [`update_channel`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateChannelError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`update_guild`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateGuildError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`update_guild_application_command`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateGuildApplicationCommandError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`update_guild_emoji`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateGuildEmojiError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn update_stage_instance(configuration: &configuration::Configuration, channel_id: &str, update_stage_instance_request: models::UpdateStageInstanceRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_channel_id = channel_id; + let p_update_stage_instance_request = update_stage_instance_request; -/// struct for typed errors of method [`update_guild_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateGuildMemberError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/stage-instances/{channel_id}", configuration.base_path, channel_id=crate::apis::urlencode(p_channel_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); -/// struct for typed errors of method [`update_guild_role`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateGuildRoleError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_update_stage_instance_request); -/// struct for typed errors of method [`update_guild_scheduled_event`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateGuildScheduledEventError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`update_guild_soundboard_sound`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateGuildSoundboardSoundError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`update_guild_sticker`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateGuildStickerError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`update_guild_template`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateGuildTemplateError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn update_voice_state(configuration: &configuration::Configuration, guild_id: &str, user_id: &str, update_voice_state_request_partial: models::UpdateVoiceStateRequestPartial) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_guild_id = guild_id; + let p_user_id = user_id; + let p_update_voice_state_request_partial = update_voice_state_request_partial; -/// struct for typed errors of method [`update_guild_welcome_screen`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateGuildWelcomeScreenError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/guilds/{guild_id}/voice-states/{user_id}", configuration.base_path, guild_id=crate::apis::urlencode(p_guild_id), user_id=crate::apis::urlencode(p_user_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); -/// struct for typed errors of method [`update_guild_widget_settings`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateGuildWidgetSettingsError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_update_voice_state_request_partial); -/// struct for typed errors of method [`update_message`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateMessageError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`update_my_application`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateMyApplicationError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`update_my_guild_member`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateMyGuildMemberError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`update_my_user`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateMyUserError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn update_webhook(configuration: &configuration::Configuration, webhook_id: &str, update_webhook_request: models::UpdateWebhookRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_webhook_id = webhook_id; + let p_update_webhook_request = update_webhook_request; -/// struct for typed errors of method [`update_original_webhook_message`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateOriginalWebhookMessageError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let uri_str = format!("{}/webhooks/{webhook_id}", configuration.base_path, webhook_id=crate::apis::urlencode(p_webhook_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); -/// struct for typed errors of method [`update_self_voice_state`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateSelfVoiceStateError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_update_webhook_request); -/// struct for typed errors of method [`update_stage_instance`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateStageInstanceError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; -/// struct for typed errors of method [`update_voice_state`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateVoiceStateError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} + let status = resp.status(); -/// struct for typed errors of method [`update_webhook`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateWebhookError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`update_webhook_by_token`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateWebhookByTokenError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), -} +pub async fn update_webhook_by_token(configuration: &configuration::Configuration, webhook_id: &str, webhook_token: &str, update_webhook_by_token_request: models::UpdateWebhookByTokenRequest) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_webhook_id = webhook_id; + let p_webhook_token = webhook_token; + let p_update_webhook_by_token_request = update_webhook_by_token_request; -/// struct for typed errors of method [`update_webhook_message`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UpdateWebhookMessageError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), + let uri_str = format!("{}/webhooks/{webhook_id}/{webhook_token}", configuration.base_path, webhook_id=crate::apis::urlencode(p_webhook_id), webhook_token=crate::apis::urlencode(p_webhook_token)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_update_webhook_by_token_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } -/// struct for typed errors of method [`upload_application_attachment`] -#[derive(Debug, Clone, Serialize, Deserialize)] -#[serde(untagged)] -pub enum UploadApplicationAttachmentError { - Status4XX(models::ErrorResponse), - UnknownValue(serde_json::Value), +pub async fn update_webhook_message(configuration: &configuration::Configuration, webhook_id: &str, webhook_token: &str, message_id: &str, incoming_webhook_update_request_partial: models::IncomingWebhookUpdateRequestPartial, thread_id: Option<&str>, with_components: Option) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_webhook_id = webhook_id; + let p_webhook_token = webhook_token; + let p_message_id = message_id; + let p_incoming_webhook_update_request_partial = incoming_webhook_update_request_partial; + let p_thread_id = thread_id; + let p_with_components = with_components; + + let uri_str = format!("{}/webhooks/{webhook_id}/{webhook_token}/messages/{message_id}", configuration.base_path, webhook_id=crate::apis::urlencode(p_webhook_id), webhook_token=crate::apis::urlencode(p_webhook_token), message_id=crate::apis::urlencode(p_message_id)); + let mut req_builder = configuration.client.request(reqwest::Method::PATCH, &uri_str); + + if let Some(ref param_value) = p_thread_id { + req_builder = req_builder.query(&[("thread_id", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_with_components { + req_builder = req_builder.query(&[("with_components", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + req_builder = req_builder.json(&p_incoming_webhook_update_request_partial); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +pub async fn upload_application_attachment(configuration: &configuration::Configuration, application_id: &str, file: &str) -> Result, Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_application_id = application_id; + let p_file = file; + + let uri_str = format!("{}/applications/{application_id}/attachment", configuration.base_path, application_id=crate::apis::urlencode(p_application_id)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref token) = configuration.oauth_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + if let Some(ref apikey) = configuration.api_key { + let key = apikey.key.clone(); + let value = match apikey.prefix { + Some(ref prefix) => format!("{} {}", prefix, key), + None => key, + }; + req_builder = req_builder.header("Authorization", value); + }; + let mut multipart_form = reqwest::multipart::Form::new(); + multipart_form = multipart_form.text("file", p_file.to_string()); + req_builder = req_builder.multipart(multipart_form); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Ok(ResponseContent { status, content, entity }) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } } diff --git a/src/apis/mod.rs b/src/apis/mod.rs index d0164ea..a3fd435 100644 --- a/src/apis/mod.rs +++ b/src/apis/mod.rs @@ -127,4 +127,3 @@ impl From<&str> for ContentType { pub mod default_api; pub mod configuration; - diff --git a/src/lib.rs b/src/lib.rs index edc482e..e152062 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,6 +5,7 @@ extern crate serde_repr; extern crate serde; extern crate serde_json; extern crate url; +extern crate reqwest; pub mod apis; pub mod models; diff --git a/src/models/account_response.rs b/src/models/account_response.rs index 8ec0453..3d54ba7 100644 --- a/src/models/account_response.rs +++ b/src/models/account_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/action_row_component_for_message_request.rs b/src/models/action_row_component_for_message_request.rs index f2984fa..9772899 100644 --- a/src/models/action_row_component_for_message_request.rs +++ b/src/models/action_row_component_for_message_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -48,6 +48,8 @@ use serde::{Deserialize, Serialize}; pub struct ActionRowComponentForMessageRequest { #[serde(rename = "type")] pub r#type: i32, + #[serde(rename = "id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub id: Option>, #[serde(rename = "components")] pub components: Vec, } @@ -56,6 +58,7 @@ impl ActionRowComponentForMessageRequest { pub fn new(r#type: i32, components: Vec) -> ActionRowComponentForMessageRequest { ActionRowComponentForMessageRequest { r#type, + id: None, components, } } diff --git a/src/models/action_row_component_for_message_request_components_inner.rs b/src/models/action_row_component_for_message_request_components_inner.rs index d305cd5..093195b 100644 --- a/src/models/action_row_component_for_message_request_components_inner.rs +++ b/src/models/action_row_component_for_message_request_components_inner.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/action_row_component_for_modal_request.rs b/src/models/action_row_component_for_modal_request.rs index dc896ba..cb613c9 100644 --- a/src/models/action_row_component_for_modal_request.rs +++ b/src/models/action_row_component_for_modal_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -48,6 +48,8 @@ use serde::{Deserialize, Serialize}; pub struct ActionRowComponentForModalRequest { #[serde(rename = "type")] pub r#type: i32, + #[serde(rename = "id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub id: Option>, #[serde(rename = "components")] pub components: Vec, } @@ -56,6 +58,7 @@ impl ActionRowComponentForModalRequest { pub fn new(r#type: i32, components: Vec) -> ActionRowComponentForModalRequest { ActionRowComponentForModalRequest { r#type, + id: None, components, } } diff --git a/src/models/action_row_component_response.rs b/src/models/action_row_component_response.rs index 5edc24e..56e58fb 100644 --- a/src/models/action_row_component_response.rs +++ b/src/models/action_row_component_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,16 +50,16 @@ pub struct ActionRowComponentResponse { pub r#type: i32, #[serde(rename = "id")] pub id: i32, - #[serde(rename = "components", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub components: Option>>, + #[serde(rename = "components")] + pub components: Vec, } impl ActionRowComponentResponse { - pub fn new(r#type: i32, id: i32) -> ActionRowComponentResponse { + pub fn new(r#type: i32, id: i32, components: Vec) -> ActionRowComponentResponse { ActionRowComponentResponse { r#type, id, - components: None, + components, } } } diff --git a/src/models/action_row_component_response_components_inner.rs b/src/models/action_row_component_response_components_inner.rs index e5da384..8bce1bc 100644 --- a/src/models/action_row_component_response_components_inner.rs +++ b/src/models/action_row_component_response_components_inner.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/activities_attachment_response.rs b/src/models/activities_attachment_response.rs index 1962a11..b7efeb1 100644 --- a/src/models/activities_attachment_response.rs +++ b/src/models/activities_attachment_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/add_group_dm_user_201_response.rs b/src/models/add_group_dm_user_201_response.rs index dd6e5b6..ba87356 100644 --- a/src/models/add_group_dm_user_201_response.rs +++ b/src/models/add_group_dm_user_201_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/add_group_dm_user_request.rs b/src/models/add_group_dm_user_request.rs index a6caa25..1078704 100644 --- a/src/models/add_group_dm_user_request.rs +++ b/src/models/add_group_dm_user_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/add_lobby_member_request.rs b/src/models/add_lobby_member_request.rs index aa3d826..e4c7956 100644 --- a/src/models/add_lobby_member_request.rs +++ b/src/models/add_lobby_member_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_command_attachment_option.rs b/src/models/application_command_attachment_option.rs index 90c5651..e6ddc82 100644 --- a/src/models/application_command_attachment_option.rs +++ b/src/models/application_command_attachment_option.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_command_attachment_option_response.rs b/src/models/application_command_attachment_option_response.rs index 03c48d9..754e5b2 100644 --- a/src/models/application_command_attachment_option_response.rs +++ b/src/models/application_command_attachment_option_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,18 +50,18 @@ pub struct ApplicationCommandAttachmentOptionResponse { pub r#type: i32, #[serde(rename = "name")] pub name: String, - #[serde(rename = "name_localized", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub name_localized: Option>, + #[serde(rename = "name_localized", skip_serializing_if = "Option::is_none")] + pub name_localized: Option, #[serde(rename = "name_localizations", skip_serializing_if = "Option::is_none")] pub name_localizations: Option>, #[serde(rename = "description")] pub description: String, - #[serde(rename = "description_localized", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub description_localized: Option>, + #[serde(rename = "description_localized", skip_serializing_if = "Option::is_none")] + pub description_localized: Option, #[serde(rename = "description_localizations", skip_serializing_if = "Option::is_none")] pub description_localizations: Option>, - #[serde(rename = "required", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub required: Option>, + #[serde(rename = "required", skip_serializing_if = "Option::is_none")] + pub required: Option, } impl ApplicationCommandAttachmentOptionResponse { diff --git a/src/models/application_command_autocomplete_callback_request.rs b/src/models/application_command_autocomplete_callback_request.rs index 42466f4..f6347bc 100644 --- a/src/models/application_command_autocomplete_callback_request.rs +++ b/src/models/application_command_autocomplete_callback_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_command_autocomplete_callback_request_data.rs b/src/models/application_command_autocomplete_callback_request_data.rs index 229214d..c4eb8e5 100644 --- a/src/models/application_command_autocomplete_callback_request_data.rs +++ b/src/models/application_command_autocomplete_callback_request_data.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_command_boolean_option.rs b/src/models/application_command_boolean_option.rs index 1b8fb32..e900ea8 100644 --- a/src/models/application_command_boolean_option.rs +++ b/src/models/application_command_boolean_option.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_command_boolean_option_response.rs b/src/models/application_command_boolean_option_response.rs index d737ad8..05085f0 100644 --- a/src/models/application_command_boolean_option_response.rs +++ b/src/models/application_command_boolean_option_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,18 +50,18 @@ pub struct ApplicationCommandBooleanOptionResponse { pub r#type: i32, #[serde(rename = "name")] pub name: String, - #[serde(rename = "name_localized", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub name_localized: Option>, + #[serde(rename = "name_localized", skip_serializing_if = "Option::is_none")] + pub name_localized: Option, #[serde(rename = "name_localizations", skip_serializing_if = "Option::is_none")] pub name_localizations: Option>, #[serde(rename = "description")] pub description: String, - #[serde(rename = "description_localized", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub description_localized: Option>, + #[serde(rename = "description_localized", skip_serializing_if = "Option::is_none")] + pub description_localized: Option, #[serde(rename = "description_localizations", skip_serializing_if = "Option::is_none")] pub description_localizations: Option>, - #[serde(rename = "required", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub required: Option>, + #[serde(rename = "required", skip_serializing_if = "Option::is_none")] + pub required: Option, } impl ApplicationCommandBooleanOptionResponse { diff --git a/src/models/application_command_channel_option.rs b/src/models/application_command_channel_option.rs index a813fe6..4e4d605 100644 --- a/src/models/application_command_channel_option.rs +++ b/src/models/application_command_channel_option.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_command_channel_option_response.rs b/src/models/application_command_channel_option_response.rs index 91ff4ee..1e9a86a 100644 --- a/src/models/application_command_channel_option_response.rs +++ b/src/models/application_command_channel_option_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,20 +50,20 @@ pub struct ApplicationCommandChannelOptionResponse { pub r#type: i32, #[serde(rename = "name")] pub name: String, - #[serde(rename = "name_localized", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub name_localized: Option>, + #[serde(rename = "name_localized", skip_serializing_if = "Option::is_none")] + pub name_localized: Option, #[serde(rename = "name_localizations", skip_serializing_if = "Option::is_none")] pub name_localizations: Option>, #[serde(rename = "description")] pub description: String, - #[serde(rename = "description_localized", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub description_localized: Option>, + #[serde(rename = "description_localized", skip_serializing_if = "Option::is_none")] + pub description_localized: Option, #[serde(rename = "description_localizations", skip_serializing_if = "Option::is_none")] pub description_localizations: Option>, - #[serde(rename = "required", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub required: Option>, - #[serde(rename = "channel_types", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub channel_types: Option>>, + #[serde(rename = "required", skip_serializing_if = "Option::is_none")] + pub required: Option, + #[serde(rename = "channel_types", skip_serializing_if = "Option::is_none")] + pub channel_types: Option>, } impl ApplicationCommandChannelOptionResponse { diff --git a/src/models/application_command_create_request.rs b/src/models/application_command_create_request.rs index 69b5d2e..8a7cdb8 100644 --- a/src/models/application_command_create_request.rs +++ b/src/models/application_command_create_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_command_create_request_options_inner.rs b/src/models/application_command_create_request_options_inner.rs index b87ebdf..c862f4e 100644 --- a/src/models/application_command_create_request_options_inner.rs +++ b/src/models/application_command_create_request_options_inner.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_command_integer_option.rs b/src/models/application_command_integer_option.rs index e5aa22b..5219870 100644 --- a/src/models/application_command_integer_option.rs +++ b/src/models/application_command_integer_option.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_command_integer_option_response.rs b/src/models/application_command_integer_option_response.rs index 22695aa..2bdf748 100644 --- a/src/models/application_command_integer_option_response.rs +++ b/src/models/application_command_integer_option_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,22 +50,22 @@ pub struct ApplicationCommandIntegerOptionResponse { pub r#type: i32, #[serde(rename = "name")] pub name: String, - #[serde(rename = "name_localized", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub name_localized: Option>, + #[serde(rename = "name_localized", skip_serializing_if = "Option::is_none")] + pub name_localized: Option, #[serde(rename = "name_localizations", skip_serializing_if = "Option::is_none")] pub name_localizations: Option>, #[serde(rename = "description")] pub description: String, - #[serde(rename = "description_localized", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub description_localized: Option>, + #[serde(rename = "description_localized", skip_serializing_if = "Option::is_none")] + pub description_localized: Option, #[serde(rename = "description_localizations", skip_serializing_if = "Option::is_none")] pub description_localizations: Option>, - #[serde(rename = "required", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub required: Option>, - #[serde(rename = "autocomplete", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub autocomplete: Option>, - #[serde(rename = "choices", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub choices: Option>>, + #[serde(rename = "required", skip_serializing_if = "Option::is_none")] + pub required: Option, + #[serde(rename = "autocomplete", skip_serializing_if = "Option::is_none")] + pub autocomplete: Option, + #[serde(rename = "choices", skip_serializing_if = "Option::is_none")] + pub choices: Option>, #[serde(rename = "min_value", skip_serializing_if = "Option::is_none")] pub min_value: Option, #[serde(rename = "max_value", skip_serializing_if = "Option::is_none")] diff --git a/src/models/application_command_interaction_metadata_response.rs b/src/models/application_command_interaction_metadata_response.rs index d59f4b3..c2f5387 100644 --- a/src/models/application_command_interaction_metadata_response.rs +++ b/src/models/application_command_interaction_metadata_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,14 +50,14 @@ pub struct ApplicationCommandInteractionMetadataResponse { pub id: String, #[serde(rename = "type")] pub r#type: i32, - #[serde(rename = "user", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub user: Option>>, + #[serde(rename = "user", skip_serializing_if = "Option::is_none")] + pub user: Option>, #[serde(rename = "authorizing_integration_owners")] pub authorizing_integration_owners: std::collections::HashMap, #[serde(rename = "original_response_message_id", skip_serializing_if = "Option::is_none")] pub original_response_message_id: Option, - #[serde(rename = "target_user", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub target_user: Option>>, + #[serde(rename = "target_user", skip_serializing_if = "Option::is_none")] + pub target_user: Option>, #[serde(rename = "target_message_id", skip_serializing_if = "Option::is_none")] pub target_message_id: Option, } diff --git a/src/models/application_command_mentionable_option.rs b/src/models/application_command_mentionable_option.rs index f3e0fce..6b5b498 100644 --- a/src/models/application_command_mentionable_option.rs +++ b/src/models/application_command_mentionable_option.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_command_mentionable_option_response.rs b/src/models/application_command_mentionable_option_response.rs index 17a37b9..7116feb 100644 --- a/src/models/application_command_mentionable_option_response.rs +++ b/src/models/application_command_mentionable_option_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,18 +50,18 @@ pub struct ApplicationCommandMentionableOptionResponse { pub r#type: i32, #[serde(rename = "name")] pub name: String, - #[serde(rename = "name_localized", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub name_localized: Option>, + #[serde(rename = "name_localized", skip_serializing_if = "Option::is_none")] + pub name_localized: Option, #[serde(rename = "name_localizations", skip_serializing_if = "Option::is_none")] pub name_localizations: Option>, #[serde(rename = "description")] pub description: String, - #[serde(rename = "description_localized", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub description_localized: Option>, + #[serde(rename = "description_localized", skip_serializing_if = "Option::is_none")] + pub description_localized: Option, #[serde(rename = "description_localizations", skip_serializing_if = "Option::is_none")] pub description_localizations: Option>, - #[serde(rename = "required", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub required: Option>, + #[serde(rename = "required", skip_serializing_if = "Option::is_none")] + pub required: Option, } impl ApplicationCommandMentionableOptionResponse { diff --git a/src/models/application_command_number_option.rs b/src/models/application_command_number_option.rs index ab07a3f..93214df 100644 --- a/src/models/application_command_number_option.rs +++ b/src/models/application_command_number_option.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_command_number_option_response.rs b/src/models/application_command_number_option_response.rs index 8520b8f..5194baf 100644 --- a/src/models/application_command_number_option_response.rs +++ b/src/models/application_command_number_option_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,26 +50,26 @@ pub struct ApplicationCommandNumberOptionResponse { pub r#type: i32, #[serde(rename = "name")] pub name: String, - #[serde(rename = "name_localized", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub name_localized: Option>, + #[serde(rename = "name_localized", skip_serializing_if = "Option::is_none")] + pub name_localized: Option, #[serde(rename = "name_localizations", skip_serializing_if = "Option::is_none")] pub name_localizations: Option>, #[serde(rename = "description")] pub description: String, - #[serde(rename = "description_localized", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub description_localized: Option>, + #[serde(rename = "description_localized", skip_serializing_if = "Option::is_none")] + pub description_localized: Option, #[serde(rename = "description_localizations", skip_serializing_if = "Option::is_none")] pub description_localizations: Option>, - #[serde(rename = "required", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub required: Option>, - #[serde(rename = "autocomplete", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub autocomplete: Option>, - #[serde(rename = "choices", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub choices: Option>>, - #[serde(rename = "min_value", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub min_value: Option>, - #[serde(rename = "max_value", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub max_value: Option>, + #[serde(rename = "required", skip_serializing_if = "Option::is_none")] + pub required: Option, + #[serde(rename = "autocomplete", skip_serializing_if = "Option::is_none")] + pub autocomplete: Option, + #[serde(rename = "choices", skip_serializing_if = "Option::is_none")] + pub choices: Option>, + #[serde(rename = "min_value", skip_serializing_if = "Option::is_none")] + pub min_value: Option, + #[serde(rename = "max_value", skip_serializing_if = "Option::is_none")] + pub max_value: Option, } impl ApplicationCommandNumberOptionResponse { diff --git a/src/models/application_command_option_integer_choice.rs b/src/models/application_command_option_integer_choice.rs index 5ff1554..4ea3e51 100644 --- a/src/models/application_command_option_integer_choice.rs +++ b/src/models/application_command_option_integer_choice.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_command_option_integer_choice_response.rs b/src/models/application_command_option_integer_choice_response.rs index f06e3b9..4dec651 100644 --- a/src/models/application_command_option_integer_choice_response.rs +++ b/src/models/application_command_option_integer_choice_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -48,8 +48,8 @@ use serde::{Deserialize, Serialize}; pub struct ApplicationCommandOptionIntegerChoiceResponse { #[serde(rename = "name")] pub name: String, - #[serde(rename = "name_localized", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub name_localized: Option>, + #[serde(rename = "name_localized", skip_serializing_if = "Option::is_none")] + pub name_localized: Option, #[serde(rename = "name_localizations", skip_serializing_if = "Option::is_none")] pub name_localizations: Option>, #[serde(rename = "value")] diff --git a/src/models/application_command_option_number_choice.rs b/src/models/application_command_option_number_choice.rs index f97b403..0c9370e 100644 --- a/src/models/application_command_option_number_choice.rs +++ b/src/models/application_command_option_number_choice.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_command_option_number_choice_response.rs b/src/models/application_command_option_number_choice_response.rs index ed6d0c0..3225203 100644 --- a/src/models/application_command_option_number_choice_response.rs +++ b/src/models/application_command_option_number_choice_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -48,8 +48,8 @@ use serde::{Deserialize, Serialize}; pub struct ApplicationCommandOptionNumberChoiceResponse { #[serde(rename = "name")] pub name: String, - #[serde(rename = "name_localized", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub name_localized: Option>, + #[serde(rename = "name_localized", skip_serializing_if = "Option::is_none")] + pub name_localized: Option, #[serde(rename = "name_localizations", skip_serializing_if = "Option::is_none")] pub name_localizations: Option>, #[serde(rename = "value")] diff --git a/src/models/application_command_option_string_choice.rs b/src/models/application_command_option_string_choice.rs index 9be4c59..6031ab5 100644 --- a/src/models/application_command_option_string_choice.rs +++ b/src/models/application_command_option_string_choice.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_command_option_string_choice_response.rs b/src/models/application_command_option_string_choice_response.rs index 3d103f3..135f952 100644 --- a/src/models/application_command_option_string_choice_response.rs +++ b/src/models/application_command_option_string_choice_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -48,8 +48,8 @@ use serde::{Deserialize, Serialize}; pub struct ApplicationCommandOptionStringChoiceResponse { #[serde(rename = "name")] pub name: String, - #[serde(rename = "name_localized", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub name_localized: Option>, + #[serde(rename = "name_localized", skip_serializing_if = "Option::is_none")] + pub name_localized: Option, #[serde(rename = "name_localizations", skip_serializing_if = "Option::is_none")] pub name_localizations: Option>, #[serde(rename = "value")] diff --git a/src/models/application_command_patch_request_partial.rs b/src/models/application_command_patch_request_partial.rs index ecb31cf..82c643d 100644 --- a/src/models/application_command_patch_request_partial.rs +++ b/src/models/application_command_patch_request_partial.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_command_permission.rs b/src/models/application_command_permission.rs index c2251f1..0c90367 100644 --- a/src/models/application_command_permission.rs +++ b/src/models/application_command_permission.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_command_response.rs b/src/models/application_command_response.rs index 9a1bd27..ad0dea5 100644 --- a/src/models/application_command_response.rs +++ b/src/models/application_command_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -58,28 +58,28 @@ pub struct ApplicationCommandResponse { pub r#type: i32, #[serde(rename = "name")] pub name: String, - #[serde(rename = "name_localized", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub name_localized: Option>, + #[serde(rename = "name_localized", skip_serializing_if = "Option::is_none")] + pub name_localized: Option, #[serde(rename = "name_localizations", skip_serializing_if = "Option::is_none")] pub name_localizations: Option>, #[serde(rename = "description")] pub description: String, - #[serde(rename = "description_localized", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub description_localized: Option>, + #[serde(rename = "description_localized", skip_serializing_if = "Option::is_none")] + pub description_localized: Option, #[serde(rename = "description_localizations", skip_serializing_if = "Option::is_none")] pub description_localizations: Option>, #[serde(rename = "guild_id", skip_serializing_if = "Option::is_none")] pub guild_id: Option, - #[serde(rename = "dm_permission", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub dm_permission: Option>, + #[serde(rename = "dm_permission", skip_serializing_if = "Option::is_none")] + pub dm_permission: Option, #[serde(rename = "contexts", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub contexts: Option>>, - #[serde(rename = "integration_types", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub integration_types: Option>>, - #[serde(rename = "options", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub options: Option>>, - #[serde(rename = "nsfw", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub nsfw: Option>, + #[serde(rename = "integration_types", skip_serializing_if = "Option::is_none")] + pub integration_types: Option>, + #[serde(rename = "options", skip_serializing_if = "Option::is_none")] + pub options: Option>, + #[serde(rename = "nsfw", skip_serializing_if = "Option::is_none")] + pub nsfw: Option, } impl ApplicationCommandResponse { diff --git a/src/models/application_command_response_options_inner.rs b/src/models/application_command_response_options_inner.rs index 63b55b5..ffbe791 100644 --- a/src/models/application_command_response_options_inner.rs +++ b/src/models/application_command_response_options_inner.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_command_role_option.rs b/src/models/application_command_role_option.rs index 71b3077..ad314fc 100644 --- a/src/models/application_command_role_option.rs +++ b/src/models/application_command_role_option.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_command_role_option_response.rs b/src/models/application_command_role_option_response.rs index 3f25554..ead8450 100644 --- a/src/models/application_command_role_option_response.rs +++ b/src/models/application_command_role_option_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,18 +50,18 @@ pub struct ApplicationCommandRoleOptionResponse { pub r#type: i32, #[serde(rename = "name")] pub name: String, - #[serde(rename = "name_localized", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub name_localized: Option>, + #[serde(rename = "name_localized", skip_serializing_if = "Option::is_none")] + pub name_localized: Option, #[serde(rename = "name_localizations", skip_serializing_if = "Option::is_none")] pub name_localizations: Option>, #[serde(rename = "description")] pub description: String, - #[serde(rename = "description_localized", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub description_localized: Option>, + #[serde(rename = "description_localized", skip_serializing_if = "Option::is_none")] + pub description_localized: Option, #[serde(rename = "description_localizations", skip_serializing_if = "Option::is_none")] pub description_localizations: Option>, - #[serde(rename = "required", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub required: Option>, + #[serde(rename = "required", skip_serializing_if = "Option::is_none")] + pub required: Option, } impl ApplicationCommandRoleOptionResponse { diff --git a/src/models/application_command_string_option.rs b/src/models/application_command_string_option.rs index 55d546f..8073f45 100644 --- a/src/models/application_command_string_option.rs +++ b/src/models/application_command_string_option.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_command_string_option_response.rs b/src/models/application_command_string_option_response.rs index f9ecb61..26216c4 100644 --- a/src/models/application_command_string_option_response.rs +++ b/src/models/application_command_string_option_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,26 +50,26 @@ pub struct ApplicationCommandStringOptionResponse { pub r#type: i32, #[serde(rename = "name")] pub name: String, - #[serde(rename = "name_localized", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub name_localized: Option>, + #[serde(rename = "name_localized", skip_serializing_if = "Option::is_none")] + pub name_localized: Option, #[serde(rename = "name_localizations", skip_serializing_if = "Option::is_none")] pub name_localizations: Option>, #[serde(rename = "description")] pub description: String, - #[serde(rename = "description_localized", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub description_localized: Option>, + #[serde(rename = "description_localized", skip_serializing_if = "Option::is_none")] + pub description_localized: Option, #[serde(rename = "description_localizations", skip_serializing_if = "Option::is_none")] pub description_localizations: Option>, - #[serde(rename = "required", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub required: Option>, - #[serde(rename = "autocomplete", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub autocomplete: Option>, - #[serde(rename = "choices", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub choices: Option>>, - #[serde(rename = "min_length", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub min_length: Option>, - #[serde(rename = "max_length", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub max_length: Option>, + #[serde(rename = "required", skip_serializing_if = "Option::is_none")] + pub required: Option, + #[serde(rename = "autocomplete", skip_serializing_if = "Option::is_none")] + pub autocomplete: Option, + #[serde(rename = "choices", skip_serializing_if = "Option::is_none")] + pub choices: Option>, + #[serde(rename = "min_length", skip_serializing_if = "Option::is_none")] + pub min_length: Option, + #[serde(rename = "max_length", skip_serializing_if = "Option::is_none")] + pub max_length: Option, } impl ApplicationCommandStringOptionResponse { diff --git a/src/models/application_command_subcommand_group_option.rs b/src/models/application_command_subcommand_group_option.rs index adae865..bd787fa 100644 --- a/src/models/application_command_subcommand_group_option.rs +++ b/src/models/application_command_subcommand_group_option.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_command_subcommand_group_option_response.rs b/src/models/application_command_subcommand_group_option_response.rs index 9b5d62a..31f8b89 100644 --- a/src/models/application_command_subcommand_group_option_response.rs +++ b/src/models/application_command_subcommand_group_option_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,20 +50,20 @@ pub struct ApplicationCommandSubcommandGroupOptionResponse { pub r#type: i32, #[serde(rename = "name")] pub name: String, - #[serde(rename = "name_localized", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub name_localized: Option>, + #[serde(rename = "name_localized", skip_serializing_if = "Option::is_none")] + pub name_localized: Option, #[serde(rename = "name_localizations", skip_serializing_if = "Option::is_none")] pub name_localizations: Option>, #[serde(rename = "description")] pub description: String, - #[serde(rename = "description_localized", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub description_localized: Option>, + #[serde(rename = "description_localized", skip_serializing_if = "Option::is_none")] + pub description_localized: Option, #[serde(rename = "description_localizations", skip_serializing_if = "Option::is_none")] pub description_localizations: Option>, - #[serde(rename = "required", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub required: Option>, - #[serde(rename = "options", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub options: Option>>, + #[serde(rename = "required", skip_serializing_if = "Option::is_none")] + pub required: Option, + #[serde(rename = "options", skip_serializing_if = "Option::is_none")] + pub options: Option>, } impl ApplicationCommandSubcommandGroupOptionResponse { diff --git a/src/models/application_command_subcommand_option.rs b/src/models/application_command_subcommand_option.rs index 23f288c..2e3f509 100644 --- a/src/models/application_command_subcommand_option.rs +++ b/src/models/application_command_subcommand_option.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_command_subcommand_option_options_inner.rs b/src/models/application_command_subcommand_option_options_inner.rs index dd5f993..cc1fd86 100644 --- a/src/models/application_command_subcommand_option_options_inner.rs +++ b/src/models/application_command_subcommand_option_options_inner.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_command_subcommand_option_response.rs b/src/models/application_command_subcommand_option_response.rs index c729855..a52982f 100644 --- a/src/models/application_command_subcommand_option_response.rs +++ b/src/models/application_command_subcommand_option_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,20 +50,20 @@ pub struct ApplicationCommandSubcommandOptionResponse { pub r#type: i32, #[serde(rename = "name")] pub name: String, - #[serde(rename = "name_localized", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub name_localized: Option>, + #[serde(rename = "name_localized", skip_serializing_if = "Option::is_none")] + pub name_localized: Option, #[serde(rename = "name_localizations", skip_serializing_if = "Option::is_none")] pub name_localizations: Option>, #[serde(rename = "description")] pub description: String, - #[serde(rename = "description_localized", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub description_localized: Option>, + #[serde(rename = "description_localized", skip_serializing_if = "Option::is_none")] + pub description_localized: Option, #[serde(rename = "description_localizations", skip_serializing_if = "Option::is_none")] pub description_localizations: Option>, - #[serde(rename = "required", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub required: Option>, - #[serde(rename = "options", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub options: Option>>, + #[serde(rename = "required", skip_serializing_if = "Option::is_none")] + pub required: Option, + #[serde(rename = "options", skip_serializing_if = "Option::is_none")] + pub options: Option>, } impl ApplicationCommandSubcommandOptionResponse { diff --git a/src/models/application_command_subcommand_option_response_options_inner.rs b/src/models/application_command_subcommand_option_response_options_inner.rs index 041b4ae..4e311b8 100644 --- a/src/models/application_command_subcommand_option_response_options_inner.rs +++ b/src/models/application_command_subcommand_option_response_options_inner.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_command_update_request.rs b/src/models/application_command_update_request.rs index 08212b0..9f2de4b 100644 --- a/src/models/application_command_update_request.rs +++ b/src/models/application_command_update_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_command_user_option.rs b/src/models/application_command_user_option.rs index 2c33984..ac67e7d 100644 --- a/src/models/application_command_user_option.rs +++ b/src/models/application_command_user_option.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_command_user_option_response.rs b/src/models/application_command_user_option_response.rs index a0bb57f..7c0e7af 100644 --- a/src/models/application_command_user_option_response.rs +++ b/src/models/application_command_user_option_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,18 +50,18 @@ pub struct ApplicationCommandUserOptionResponse { pub r#type: i32, #[serde(rename = "name")] pub name: String, - #[serde(rename = "name_localized", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub name_localized: Option>, + #[serde(rename = "name_localized", skip_serializing_if = "Option::is_none")] + pub name_localized: Option, #[serde(rename = "name_localizations", skip_serializing_if = "Option::is_none")] pub name_localizations: Option>, #[serde(rename = "description")] pub description: String, - #[serde(rename = "description_localized", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub description_localized: Option>, + #[serde(rename = "description_localized", skip_serializing_if = "Option::is_none")] + pub description_localized: Option, #[serde(rename = "description_localizations", skip_serializing_if = "Option::is_none")] pub description_localizations: Option>, - #[serde(rename = "required", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub required: Option>, + #[serde(rename = "required", skip_serializing_if = "Option::is_none")] + pub required: Option, } impl ApplicationCommandUserOptionResponse { diff --git a/src/models/application_form_partial.rs b/src/models/application_form_partial.rs index ac2e815..a779fe2 100644 --- a/src/models/application_form_partial.rs +++ b/src/models/application_form_partial.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_form_partial_description.rs b/src/models/application_form_partial_description.rs index 59bbb52..0edb779 100644 --- a/src/models/application_form_partial_description.rs +++ b/src/models/application_form_partial_description.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_form_partial_integration_types_config_value.rs b/src/models/application_form_partial_integration_types_config_value.rs index 48f44eb..6c7bb52 100644 --- a/src/models/application_form_partial_integration_types_config_value.rs +++ b/src/models/application_form_partial_integration_types_config_value.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_incoming_webhook_response.rs b/src/models/application_incoming_webhook_response.rs index a27345c..05f7d2c 100644 --- a/src/models/application_incoming_webhook_response.rs +++ b/src/models/application_incoming_webhook_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -60,8 +60,8 @@ pub struct ApplicationIncomingWebhookResponse { pub name: String, #[serde(rename = "type")] pub r#type: i32, - #[serde(rename = "user", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub user: Option>>, + #[serde(rename = "user", skip_serializing_if = "Option::is_none")] + pub user: Option>, } impl ApplicationIncomingWebhookResponse { diff --git a/src/models/application_integration_type_configuration.rs b/src/models/application_integration_type_configuration.rs index 513e262..33a7c4d 100644 --- a/src/models/application_integration_type_configuration.rs +++ b/src/models/application_integration_type_configuration.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_integration_type_configuration_response.rs b/src/models/application_integration_type_configuration_response.rs index a5fac24..395fad8 100644 --- a/src/models/application_integration_type_configuration_response.rs +++ b/src/models/application_integration_type_configuration_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -46,8 +46,8 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ApplicationIntegrationTypeConfigurationResponse { - #[serde(rename = "oauth2_install_params", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub oauth2_install_params: Option>>, + #[serde(rename = "oauth2_install_params", skip_serializing_if = "Option::is_none")] + pub oauth2_install_params: Option>, } impl ApplicationIntegrationTypeConfigurationResponse { diff --git a/src/models/application_o_auth2_install_params.rs b/src/models/application_o_auth2_install_params.rs index 4e14c0a..e548eb8 100644 --- a/src/models/application_o_auth2_install_params.rs +++ b/src/models/application_o_auth2_install_params.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_o_auth2_install_params_response.rs b/src/models/application_o_auth2_install_params_response.rs index 7247867..a0680cf 100644 --- a/src/models/application_o_auth2_install_params_response.rs +++ b/src/models/application_o_auth2_install_params_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_response.rs b/src/models/application_response.rs index 06994c3..38355bf 100644 --- a/src/models/application_response.rs +++ b/src/models/application_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -56,30 +56,30 @@ pub struct ApplicationResponse { pub description: String, #[serde(rename = "type", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub r#type: Option>, - #[serde(rename = "cover_image", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub cover_image: Option>, + #[serde(rename = "cover_image", skip_serializing_if = "Option::is_none")] + pub cover_image: Option, #[serde(rename = "primary_sku_id", skip_serializing_if = "Option::is_none")] pub primary_sku_id: Option, - #[serde(rename = "bot", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub bot: Option>>, - #[serde(rename = "slug", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub slug: Option>, + #[serde(rename = "bot", skip_serializing_if = "Option::is_none")] + pub bot: Option>, + #[serde(rename = "slug", skip_serializing_if = "Option::is_none")] + pub slug: Option, #[serde(rename = "guild_id", skip_serializing_if = "Option::is_none")] pub guild_id: Option, - #[serde(rename = "rpc_origins", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub rpc_origins: Option>>, - #[serde(rename = "bot_public", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub bot_public: Option>, - #[serde(rename = "bot_require_code_grant", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub bot_require_code_grant: Option>, - #[serde(rename = "terms_of_service_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub terms_of_service_url: Option>, - #[serde(rename = "privacy_policy_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub privacy_policy_url: Option>, - #[serde(rename = "custom_install_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub custom_install_url: Option>, - #[serde(rename = "install_params", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub install_params: Option>>, + #[serde(rename = "rpc_origins", skip_serializing_if = "Option::is_none")] + pub rpc_origins: Option>, + #[serde(rename = "bot_public", skip_serializing_if = "Option::is_none")] + pub bot_public: Option, + #[serde(rename = "bot_require_code_grant", skip_serializing_if = "Option::is_none")] + pub bot_require_code_grant: Option, + #[serde(rename = "terms_of_service_url", skip_serializing_if = "Option::is_none")] + pub terms_of_service_url: Option, + #[serde(rename = "privacy_policy_url", skip_serializing_if = "Option::is_none")] + pub privacy_policy_url: Option, + #[serde(rename = "custom_install_url", skip_serializing_if = "Option::is_none")] + pub custom_install_url: Option, + #[serde(rename = "install_params", skip_serializing_if = "Option::is_none")] + pub install_params: Option>, #[serde(rename = "integration_types_config", skip_serializing_if = "Option::is_none")] pub integration_types_config: Option>, #[serde(rename = "verify_key")] @@ -88,8 +88,8 @@ pub struct ApplicationResponse { pub flags: i32, #[serde(rename = "max_participants", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub max_participants: Option>, - #[serde(rename = "tags", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub tags: Option>>, + #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] + pub tags: Option>, } impl ApplicationResponse { diff --git a/src/models/application_role_connections_metadata_item_request.rs b/src/models/application_role_connections_metadata_item_request.rs index 2741c25..f9911d1 100644 --- a/src/models/application_role_connections_metadata_item_request.rs +++ b/src/models/application_role_connections_metadata_item_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_role_connections_metadata_item_response.rs b/src/models/application_role_connections_metadata_item_response.rs index 5d87c75..aed6d78 100644 --- a/src/models/application_role_connections_metadata_item_response.rs +++ b/src/models/application_role_connections_metadata_item_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/application_user_role_connection_response.rs b/src/models/application_user_role_connection_response.rs index 6ed1fde..99a29a8 100644 --- a/src/models/application_user_role_connection_response.rs +++ b/src/models/application_user_role_connection_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/attachment_response.rs b/src/models/attachment_response.rs index 4b86a54..26444eb 100644 --- a/src/models/attachment_response.rs +++ b/src/models/attachment_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -56,28 +56,28 @@ pub struct AttachmentResponse { pub url: String, #[serde(rename = "proxy_url")] pub proxy_url: String, - #[serde(rename = "width", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub width: Option>, - #[serde(rename = "height", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub height: Option>, - #[serde(rename = "duration_secs", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub duration_secs: Option>, - #[serde(rename = "waveform", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub waveform: Option>, - #[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub description: Option>, - #[serde(rename = "content_type", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub content_type: Option>, - #[serde(rename = "ephemeral", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub ephemeral: Option>, + #[serde(rename = "width", skip_serializing_if = "Option::is_none")] + pub width: Option, + #[serde(rename = "height", skip_serializing_if = "Option::is_none")] + pub height: Option, + #[serde(rename = "duration_secs", skip_serializing_if = "Option::is_none")] + pub duration_secs: Option, + #[serde(rename = "waveform", skip_serializing_if = "Option::is_none")] + pub waveform: Option, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "content_type", skip_serializing_if = "Option::is_none")] + pub content_type: Option, + #[serde(rename = "ephemeral", skip_serializing_if = "Option::is_none")] + pub ephemeral: Option, #[serde(rename = "title", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub title: Option>, - #[serde(rename = "application", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub application: Option>>, - #[serde(rename = "clip_created_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub clip_created_at: Option>, - #[serde(rename = "clip_participants", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub clip_participants: Option>>, + #[serde(rename = "application", skip_serializing_if = "Option::is_none")] + pub application: Option>, + #[serde(rename = "clip_created_at", skip_serializing_if = "Option::is_none")] + pub clip_created_at: Option, + #[serde(rename = "clip_participants", skip_serializing_if = "Option::is_none")] + pub clip_participants: Option>, } impl AttachmentResponse { diff --git a/src/models/audit_log_entry_response.rs b/src/models/audit_log_entry_response.rs index 8d11273..1ab63d5 100644 --- a/src/models/audit_log_entry_response.rs +++ b/src/models/audit_log_entry_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -54,12 +54,12 @@ pub struct AuditLogEntryResponse { pub user_id: Option, #[serde(rename = "target_id", skip_serializing_if = "Option::is_none")] pub target_id: Option, - #[serde(rename = "changes", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub changes: Option>>, + #[serde(rename = "changes", skip_serializing_if = "Option::is_none")] + pub changes: Option>, #[serde(rename = "options", skip_serializing_if = "Option::is_none")] pub options: Option>, - #[serde(rename = "reason", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub reason: Option>, + #[serde(rename = "reason", skip_serializing_if = "Option::is_none")] + pub reason: Option, } impl AuditLogEntryResponse { diff --git a/src/models/audit_log_object_change_response.rs b/src/models/audit_log_object_change_response.rs index a8f26b1..a27c455 100644 --- a/src/models/audit_log_object_change_response.rs +++ b/src/models/audit_log_object_change_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/ban_user_from_guild_request.rs b/src/models/ban_user_from_guild_request.rs index bb3815f..b1cb0be 100644 --- a/src/models/ban_user_from_guild_request.rs +++ b/src/models/ban_user_from_guild_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/base_create_message_create_request.rs b/src/models/base_create_message_create_request.rs index 04552b2..e815df1 100644 --- a/src/models/base_create_message_create_request.rs +++ b/src/models/base_create_message_create_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -62,6 +62,8 @@ pub struct BaseCreateMessageCreateRequest { pub attachments: Option>>, #[serde(rename = "poll", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub poll: Option>>, + #[serde(rename = "shared_client_theme", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub shared_client_theme: Option>>, #[serde(rename = "confetti_potion", skip_serializing_if = "Option::is_none")] pub confetti_potion: Option, } @@ -77,6 +79,7 @@ impl BaseCreateMessageCreateRequest { flags: None, attachments: None, poll: None, + shared_client_theme: None, confetti_potion: None, } } diff --git a/src/models/base_create_message_create_request_components_inner.rs b/src/models/base_create_message_create_request_components_inner.rs index 351ddbc..1acde52 100644 --- a/src/models/base_create_message_create_request_components_inner.rs +++ b/src/models/base_create_message_create_request_components_inner.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/basic_application_response.rs b/src/models/basic_application_response.rs index 3cc4941..e6bc49a 100644 --- a/src/models/basic_application_response.rs +++ b/src/models/basic_application_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -56,12 +56,12 @@ pub struct BasicApplicationResponse { pub description: String, #[serde(rename = "type", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub r#type: Option>, - #[serde(rename = "cover_image", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub cover_image: Option>, + #[serde(rename = "cover_image", skip_serializing_if = "Option::is_none")] + pub cover_image: Option, #[serde(rename = "primary_sku_id", skip_serializing_if = "Option::is_none")] pub primary_sku_id: Option, - #[serde(rename = "bot", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub bot: Option>>, + #[serde(rename = "bot", skip_serializing_if = "Option::is_none")] + pub bot: Option>, } impl BasicApplicationResponse { diff --git a/src/models/basic_guild_member_response.rs b/src/models/basic_guild_member_response.rs new file mode 100644 index 0000000..d673633 --- /dev/null +++ b/src/models/basic_guild_member_response.rs @@ -0,0 +1,90 @@ +//! # Discord HTTP API (Preview) - REST API Client +//! +//! Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. +//! +//! ## Metadata +//! +//! - **Copyright**: Copyright (c) 2025 Qntx +//! - **Author**: ΣX +//! - **Version**: 10 +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] +//! - **Generator Version**: 7.14.0 +//! +//!
+//! ⚠️ Important Disclaimer & Limitation of Liability +//!
+//! > **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +//! > to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +//! > and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +//! > of this software or its outputs. +//! > +//! > This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +//! > Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +//! > financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +//! > legal professionals before making decisions based on this software's outputs. +//! > +//! > Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +//! > other financial activities may result in substantial losses, including total loss of capital. The Developers are not +//! > liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +//! > outputs and ensuring their suitability for intended purposes. +//! > +//! > This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +//! > the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +//! > comply with third-party terms and conditions. +//! > +//! > Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +//! > their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +//! > Developers disclaim liability for any legal consequences arising from non-compliance. +//! > +//! > To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +//! > consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +//! > loss of profits, data, or business opportunities. +//! +//!
+use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct BasicGuildMemberResponse { + #[serde(rename = "avatar", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub avatar: Option>, + #[serde(rename = "avatar_decoration_data", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub avatar_decoration_data: Option>>, + #[serde(rename = "banner", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub banner: Option>, + #[serde(rename = "communication_disabled_until", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub communication_disabled_until: Option>, + #[serde(rename = "flags")] + pub flags: i32, + #[serde(rename = "joined_at")] + pub joined_at: String, + #[serde(rename = "nick", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub nick: Option>, + #[serde(rename = "pending")] + pub pending: bool, + #[serde(rename = "premium_since", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub premium_since: Option>, + #[serde(rename = "roles")] + pub roles: Vec, + #[serde(rename = "collectibles", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub collectibles: Option>>, +} + +impl BasicGuildMemberResponse { + pub fn new(flags: i32, joined_at: String, pending: bool, roles: Vec) -> BasicGuildMemberResponse { + BasicGuildMemberResponse { + avatar: None, + avatar_decoration_data: None, + banner: None, + communication_disabled_until: None, + flags, + joined_at, + nick: None, + pending, + premium_since: None, + roles, + collectibles: None, + } + } +} + diff --git a/src/models/basic_message_response.rs b/src/models/basic_message_response.rs index 3610ddb..19d6726 100644 --- a/src/models/basic_message_response.rs +++ b/src/models/basic_message_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -66,12 +66,10 @@ pub struct BasicMessageResponse { pub flags: i32, #[serde(rename = "components")] pub components: Vec, - #[serde(rename = "resolved", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub resolved: Option>>, - #[serde(rename = "stickers", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub stickers: Option>>, - #[serde(rename = "sticker_items", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub sticker_items: Option>>, + #[serde(rename = "stickers", skip_serializing_if = "Option::is_none")] + pub stickers: Option>, + #[serde(rename = "sticker_items", skip_serializing_if = "Option::is_none")] + pub sticker_items: Option>, #[serde(rename = "id")] pub id: String, #[serde(rename = "channel_id")] @@ -84,38 +82,42 @@ pub struct BasicMessageResponse { pub mention_everyone: bool, #[serde(rename = "tts")] pub tts: bool, - #[serde(rename = "call", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub call: Option>>, + #[serde(rename = "call", skip_serializing_if = "Option::is_none")] + pub call: Option>, #[serde(rename = "activity", skip_serializing_if = "Option::is_none")] pub activity: Option, - #[serde(rename = "application", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub application: Option>>, + #[serde(rename = "application", skip_serializing_if = "Option::is_none")] + pub application: Option>, #[serde(rename = "application_id", skip_serializing_if = "Option::is_none")] pub application_id: Option, - #[serde(rename = "interaction", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub interaction: Option>>, + #[serde(rename = "interaction", skip_serializing_if = "Option::is_none")] + pub interaction: Option>, #[serde(rename = "nonce", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub nonce: Option>>, #[serde(rename = "webhook_id", skip_serializing_if = "Option::is_none")] pub webhook_id: Option, - #[serde(rename = "message_reference", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub message_reference: Option>>, - #[serde(rename = "thread", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub thread: Option>>, - #[serde(rename = "mention_channels", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub mention_channels: Option>>, - #[serde(rename = "role_subscription_data", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub role_subscription_data: Option>>, - #[serde(rename = "purchase_notification", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub purchase_notification: Option>>, - #[serde(rename = "position", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub position: Option>, - #[serde(rename = "poll", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub poll: Option>>, - #[serde(rename = "interaction_metadata", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub interaction_metadata: Option>>, - #[serde(rename = "message_snapshots", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub message_snapshots: Option>>, + #[serde(rename = "message_reference", skip_serializing_if = "Option::is_none")] + pub message_reference: Option>, + #[serde(rename = "thread", skip_serializing_if = "Option::is_none")] + pub thread: Option>, + #[serde(rename = "mention_channels", skip_serializing_if = "Option::is_none")] + pub mention_channels: Option>, + #[serde(rename = "role_subscription_data", skip_serializing_if = "Option::is_none")] + pub role_subscription_data: Option>, + #[serde(rename = "purchase_notification", skip_serializing_if = "Option::is_none")] + pub purchase_notification: Option>, + #[serde(rename = "position", skip_serializing_if = "Option::is_none")] + pub position: Option, + #[serde(rename = "resolved", skip_serializing_if = "Option::is_none")] + pub resolved: Option>, + #[serde(rename = "poll", skip_serializing_if = "Option::is_none")] + pub poll: Option>, + #[serde(rename = "shared_client_theme", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub shared_client_theme: Option>>, + #[serde(rename = "interaction_metadata", skip_serializing_if = "Option::is_none")] + pub interaction_metadata: Option>, + #[serde(rename = "message_snapshots", skip_serializing_if = "Option::is_none")] + pub message_snapshots: Option>, } impl BasicMessageResponse { @@ -131,7 +133,6 @@ impl BasicMessageResponse { edited_timestamp: None, flags, components, - resolved: None, stickers: None, sticker_items: None, id, @@ -153,7 +154,9 @@ impl BasicMessageResponse { role_subscription_data: None, purchase_notification: None, position: None, + resolved: None, poll: None, + shared_client_theme: None, interaction_metadata: None, message_snapshots: None, } diff --git a/src/models/basic_message_response_components_inner.rs b/src/models/basic_message_response_components_inner.rs index 00676df..b28709c 100644 --- a/src/models/basic_message_response_components_inner.rs +++ b/src/models/basic_message_response_components_inner.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/basic_message_response_interaction_metadata.rs b/src/models/basic_message_response_interaction_metadata.rs index 0929ce0..b9ca3e4 100644 --- a/src/models/basic_message_response_interaction_metadata.rs +++ b/src/models/basic_message_response_interaction_metadata.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/basic_message_response_nonce.rs b/src/models/basic_message_response_nonce.rs index 70d8d3a..c68639e 100644 --- a/src/models/basic_message_response_nonce.rs +++ b/src/models/basic_message_response_nonce.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/block_message_action.rs b/src/models/block_message_action.rs index 16fe3f4..12a4d0f 100644 --- a/src/models/block_message_action.rs +++ b/src/models/block_message_action.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/block_message_action_metadata.rs b/src/models/block_message_action_metadata.rs index 0c7a6f5..2d150df 100644 --- a/src/models/block_message_action_metadata.rs +++ b/src/models/block_message_action_metadata.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/block_message_action_metadata_response.rs b/src/models/block_message_action_metadata_response.rs index ccb0c4d..f7c90df 100644 --- a/src/models/block_message_action_metadata_response.rs +++ b/src/models/block_message_action_metadata_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -46,8 +46,8 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct BlockMessageActionMetadataResponse { - #[serde(rename = "custom_message", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub custom_message: Option>, + #[serde(rename = "custom_message", skip_serializing_if = "Option::is_none")] + pub custom_message: Option, } impl BlockMessageActionMetadataResponse { diff --git a/src/models/block_message_action_response.rs b/src/models/block_message_action_response.rs index 20bc663..7e9ba68 100644 --- a/src/models/block_message_action_response.rs +++ b/src/models/block_message_action_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/bot_account_patch_request.rs b/src/models/bot_account_patch_request.rs index b7b23bc..7f19599 100644 --- a/src/models/bot_account_patch_request.rs +++ b/src/models/bot_account_patch_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/add_guild_member_request.rs b/src/models/bot_add_guild_member_request.rs similarity index 94% rename from src/models/add_guild_member_request.rs rename to src/models/bot_add_guild_member_request.rs index 9301921..057b0d5 100644 --- a/src/models/add_guild_member_request.rs +++ b/src/models/bot_add_guild_member_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -45,7 +45,7 @@ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct AddGuildMemberRequest { +pub struct BotAddGuildMemberRequest { #[serde(rename = "nick", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub nick: Option>, #[serde(rename = "roles", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] @@ -60,9 +60,9 @@ pub struct AddGuildMemberRequest { pub flags: Option>, } -impl AddGuildMemberRequest { - pub fn new(access_token: String) -> AddGuildMemberRequest { - AddGuildMemberRequest { +impl BotAddGuildMemberRequest { + pub fn new(access_token: String) -> BotAddGuildMemberRequest { + BotAddGuildMemberRequest { nick: None, roles: None, mute: None, diff --git a/src/models/bot_partner_sdk_token_request.rs b/src/models/bot_partner_sdk_token_request.rs new file mode 100644 index 0000000..84d05ac --- /dev/null +++ b/src/models/bot_partner_sdk_token_request.rs @@ -0,0 +1,63 @@ +//! # Discord HTTP API (Preview) - REST API Client +//! +//! Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. +//! +//! ## Metadata +//! +//! - **Copyright**: Copyright (c) 2025 Qntx +//! - **Author**: ΣX +//! - **Version**: 10 +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] +//! - **Generator Version**: 7.14.0 +//! +//!
+//! ⚠️ Important Disclaimer & Limitation of Liability +//!
+//! > **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +//! > to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +//! > and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +//! > of this software or its outputs. +//! > +//! > This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +//! > Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +//! > financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +//! > legal professionals before making decisions based on this software's outputs. +//! > +//! > Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +//! > other financial activities may result in substantial losses, including total loss of capital. The Developers are not +//! > liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +//! > outputs and ensuring their suitability for intended purposes. +//! > +//! > This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +//! > the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +//! > comply with third-party terms and conditions. +//! > +//! > Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +//! > their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +//! > Developers disclaim liability for any legal consequences arising from non-compliance. +//! > +//! > To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +//! > consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +//! > loss of profits, data, or business opportunities. +//! +//!
+use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct BotPartnerSdkTokenRequest { + #[serde(rename = "external_user_id")] + pub external_user_id: String, + #[serde(rename = "preferred_global_name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub preferred_global_name: Option>, +} + +impl BotPartnerSdkTokenRequest { + pub fn new(external_user_id: String) -> BotPartnerSdkTokenRequest { + BotPartnerSdkTokenRequest { + external_user_id, + preferred_global_name: None, + } + } +} + diff --git a/src/models/bulk_ban_users_from_guild_request.rs b/src/models/bulk_ban_users_request.rs similarity index 92% rename from src/models/bulk_ban_users_from_guild_request.rs rename to src/models/bulk_ban_users_request.rs index f7c9ece..74d8162 100644 --- a/src/models/bulk_ban_users_from_guild_request.rs +++ b/src/models/bulk_ban_users_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -45,16 +45,16 @@ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct BulkBanUsersFromGuildRequest { +pub struct BulkBanUsersRequest { #[serde(rename = "user_ids")] pub user_ids: Vec, #[serde(rename = "delete_message_seconds", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub delete_message_seconds: Option>, } -impl BulkBanUsersFromGuildRequest { - pub fn new(user_ids: Vec) -> BulkBanUsersFromGuildRequest { - BulkBanUsersFromGuildRequest { +impl BulkBanUsersRequest { + pub fn new(user_ids: Vec) -> BulkBanUsersRequest { + BulkBanUsersRequest { user_ids, delete_message_seconds: None, } diff --git a/src/models/bulk_ban_users_response.rs b/src/models/bulk_ban_users_response.rs index 5511a7b..a529624 100644 --- a/src/models/bulk_ban_users_response.rs +++ b/src/models/bulk_ban_users_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/bulk_delete_messages_request.rs b/src/models/bulk_delete_messages_request.rs index f2e220c..f398773 100644 --- a/src/models/bulk_delete_messages_request.rs +++ b/src/models/bulk_delete_messages_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/bulk_lobby_member_request.rs b/src/models/bulk_lobby_member_request.rs index 6963502..4c67463 100644 --- a/src/models/bulk_lobby_member_request.rs +++ b/src/models/bulk_lobby_member_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/bulk_update_guild_channels_request_inner.rs b/src/models/bulk_update_guild_channels_request_inner.rs index 07d4d48..ce4d826 100644 --- a/src/models/bulk_update_guild_channels_request_inner.rs +++ b/src/models/bulk_update_guild_channels_request_inner.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/button_component_for_message_request.rs b/src/models/button_component_for_message_request.rs index 57ef565..4ef636d 100644 --- a/src/models/button_component_for_message_request.rs +++ b/src/models/button_component_for_message_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -48,6 +48,8 @@ use serde::{Deserialize, Serialize}; pub struct ButtonComponentForMessageRequest { #[serde(rename = "type")] pub r#type: i32, + #[serde(rename = "id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub id: Option>, #[serde(rename = "custom_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub custom_id: Option>, #[serde(rename = "style", deserialize_with = "Option::deserialize")] @@ -61,13 +63,14 @@ pub struct ButtonComponentForMessageRequest { #[serde(rename = "sku_id", skip_serializing_if = "Option::is_none")] pub sku_id: Option, #[serde(rename = "emoji", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub emoji: Option>>, + pub emoji: Option>>, } impl ButtonComponentForMessageRequest { pub fn new(r#type: i32, style: Option) -> ButtonComponentForMessageRequest { ButtonComponentForMessageRequest { r#type, + id: None, custom_id: None, style, label: None, diff --git a/src/models/button_component_response.rs b/src/models/button_component_response.rs index b389835..a8724fe 100644 --- a/src/models/button_component_response.rs +++ b/src/models/button_component_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,16 +50,16 @@ pub struct ButtonComponentResponse { pub r#type: i32, #[serde(rename = "id")] pub id: i32, - #[serde(rename = "custom_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub custom_id: Option>, + #[serde(rename = "custom_id", skip_serializing_if = "Option::is_none")] + pub custom_id: Option, #[serde(rename = "style", deserialize_with = "Option::deserialize")] pub style: Option, - #[serde(rename = "label", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub label: Option>, - #[serde(rename = "disabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub disabled: Option>, - #[serde(rename = "emoji", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub emoji: Option>>, + #[serde(rename = "label", skip_serializing_if = "Option::is_none")] + pub label: Option, + #[serde(rename = "disabled", skip_serializing_if = "Option::is_none")] + pub disabled: Option, + #[serde(rename = "emoji", skip_serializing_if = "Option::is_none")] + pub emoji: Option>, #[serde(rename = "url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub url: Option>, #[serde(rename = "sku_id", skip_serializing_if = "Option::is_none")] diff --git a/src/models/channel_follower_response.rs b/src/models/channel_follower_response.rs index 13a9dce..7d752ae 100644 --- a/src/models/channel_follower_response.rs +++ b/src/models/channel_follower_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/channel_follower_webhook_response.rs b/src/models/channel_follower_webhook_response.rs index 36cb635..3b37d8c 100644 --- a/src/models/channel_follower_webhook_response.rs +++ b/src/models/channel_follower_webhook_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -60,12 +60,12 @@ pub struct ChannelFollowerWebhookResponse { pub name: String, #[serde(rename = "type")] pub r#type: i32, - #[serde(rename = "user", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub user: Option>>, - #[serde(rename = "source_guild", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub source_guild: Option>>, - #[serde(rename = "source_channel", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub source_channel: Option>>, + #[serde(rename = "user", skip_serializing_if = "Option::is_none")] + pub user: Option>, + #[serde(rename = "source_guild", skip_serializing_if = "Option::is_none")] + pub source_guild: Option>, + #[serde(rename = "source_channel", skip_serializing_if = "Option::is_none")] + pub source_channel: Option>, } impl ChannelFollowerWebhookResponse { diff --git a/src/models/channel_permission_overwrite_request.rs b/src/models/channel_permission_overwrite_request.rs index fd9716e..027ed2d 100644 --- a/src/models/channel_permission_overwrite_request.rs +++ b/src/models/channel_permission_overwrite_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/channel_permission_overwrite_response.rs b/src/models/channel_permission_overwrite_response.rs index 9ce6e8d..b0f87c1 100644 --- a/src/models/channel_permission_overwrite_response.rs +++ b/src/models/channel_permission_overwrite_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/channel_select_component_for_message_request.rs b/src/models/channel_select_component_for_message_request.rs index 807327f..68a29f8 100644 --- a/src/models/channel_select_component_for_message_request.rs +++ b/src/models/channel_select_component_for_message_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -48,6 +48,8 @@ use serde::{Deserialize, Serialize}; pub struct ChannelSelectComponentForMessageRequest { #[serde(rename = "type")] pub r#type: i32, + #[serde(rename = "id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub id: Option>, #[serde(rename = "custom_id")] pub custom_id: String, #[serde(rename = "placeholder", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] @@ -58,6 +60,8 @@ pub struct ChannelSelectComponentForMessageRequest { pub max_values: Option>, #[serde(rename = "disabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub disabled: Option>, + #[serde(rename = "required", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub required: Option>, #[serde(rename = "default_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub default_values: Option>>, #[serde(rename = "channel_types", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] @@ -68,11 +72,13 @@ impl ChannelSelectComponentForMessageRequest { pub fn new(r#type: i32, custom_id: String) -> ChannelSelectComponentForMessageRequest { ChannelSelectComponentForMessageRequest { r#type, + id: None, custom_id, placeholder: None, min_values: None, max_values: None, disabled: None, + required: None, default_values: None, channel_types: None, } diff --git a/src/models/channel_select_component_for_modal_request.rs b/src/models/channel_select_component_for_modal_request.rs new file mode 100644 index 0000000..4b10a12 --- /dev/null +++ b/src/models/channel_select_component_for_modal_request.rs @@ -0,0 +1,87 @@ +//! # Discord HTTP API (Preview) - REST API Client +//! +//! Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. +//! +//! ## Metadata +//! +//! - **Copyright**: Copyright (c) 2025 Qntx +//! - **Author**: ΣX +//! - **Version**: 10 +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] +//! - **Generator Version**: 7.14.0 +//! +//!
+//! ⚠️ Important Disclaimer & Limitation of Liability +//!
+//! > **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +//! > to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +//! > and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +//! > of this software or its outputs. +//! > +//! > This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +//! > Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +//! > financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +//! > legal professionals before making decisions based on this software's outputs. +//! > +//! > Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +//! > other financial activities may result in substantial losses, including total loss of capital. The Developers are not +//! > liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +//! > outputs and ensuring their suitability for intended purposes. +//! > +//! > This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +//! > the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +//! > comply with third-party terms and conditions. +//! > +//! > Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +//! > their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +//! > Developers disclaim liability for any legal consequences arising from non-compliance. +//! > +//! > To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +//! > consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +//! > loss of profits, data, or business opportunities. +//! +//!
+use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ChannelSelectComponentForModalRequest { + #[serde(rename = "type")] + pub r#type: i32, + #[serde(rename = "id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub id: Option>, + #[serde(rename = "custom_id")] + pub custom_id: String, + #[serde(rename = "placeholder", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub placeholder: Option>, + #[serde(rename = "min_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub min_values: Option>, + #[serde(rename = "max_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub max_values: Option>, + #[serde(rename = "disabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub disabled: Option>, + #[serde(rename = "required", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub required: Option>, + #[serde(rename = "default_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub default_values: Option>>, + #[serde(rename = "channel_types", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub channel_types: Option>>, +} + +impl ChannelSelectComponentForModalRequest { + pub fn new(r#type: i32, custom_id: String) -> ChannelSelectComponentForModalRequest { + ChannelSelectComponentForModalRequest { + r#type, + id: None, + custom_id, + placeholder: None, + min_values: None, + max_values: None, + disabled: None, + required: None, + default_values: None, + channel_types: None, + } + } +} + diff --git a/src/models/channel_select_component_response.rs b/src/models/channel_select_component_response.rs index 1de349f..cfa49c1 100644 --- a/src/models/channel_select_component_response.rs +++ b/src/models/channel_select_component_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -52,18 +52,18 @@ pub struct ChannelSelectComponentResponse { pub id: i32, #[serde(rename = "custom_id")] pub custom_id: String, - #[serde(rename = "placeholder", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub placeholder: Option>, + #[serde(rename = "placeholder", skip_serializing_if = "Option::is_none")] + pub placeholder: Option, #[serde(rename = "min_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub min_values: Option>, #[serde(rename = "max_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub max_values: Option>, - #[serde(rename = "disabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub disabled: Option>, - #[serde(rename = "channel_types", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub channel_types: Option>>, - #[serde(rename = "default_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub default_values: Option>>, + #[serde(rename = "disabled", skip_serializing_if = "Option::is_none")] + pub disabled: Option, + #[serde(rename = "channel_types", skip_serializing_if = "Option::is_none")] + pub channel_types: Option>, + #[serde(rename = "default_values", skip_serializing_if = "Option::is_none")] + pub default_values: Option>, } impl ChannelSelectComponentResponse { diff --git a/src/models/channel_select_default_value.rs b/src/models/channel_select_default_value.rs index 42890be..44b637e 100644 --- a/src/models/channel_select_default_value.rs +++ b/src/models/channel_select_default_value.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/channel_select_default_value_response.rs b/src/models/channel_select_default_value_response.rs index c47d22e..7f9bd30 100644 --- a/src/models/channel_select_default_value_response.rs +++ b/src/models/channel_select_default_value_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/command_permission_response.rs b/src/models/command_permission_response.rs index df0815c..ea5e7ea 100644 --- a/src/models/command_permission_response.rs +++ b/src/models/command_permission_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/command_permissions_response.rs b/src/models/command_permissions_response.rs index 3d9be10..25d32cc 100644 --- a/src/models/command_permissions_response.rs +++ b/src/models/command_permissions_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/component_emoji_for_message_request.rs b/src/models/component_emoji_for_request.rs similarity index 92% rename from src/models/component_emoji_for_message_request.rs rename to src/models/component_emoji_for_request.rs index 11c19c3..b70f0a4 100644 --- a/src/models/component_emoji_for_message_request.rs +++ b/src/models/component_emoji_for_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -45,16 +45,16 @@ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ComponentEmojiForMessageRequest { +pub struct ComponentEmojiForRequest { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "name")] pub name: String, } -impl ComponentEmojiForMessageRequest { - pub fn new(name: String) -> ComponentEmojiForMessageRequest { - ComponentEmojiForMessageRequest { +impl ComponentEmojiForRequest { + pub fn new(name: String) -> ComponentEmojiForRequest { + ComponentEmojiForRequest { id: None, name, } diff --git a/src/models/component_emoji_response.rs b/src/models/component_emoji_response.rs index 1aa7e0f..6cf2ead 100644 --- a/src/models/component_emoji_response.rs +++ b/src/models/component_emoji_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,8 +50,8 @@ pub struct ComponentEmojiResponse { pub id: Option, #[serde(rename = "name")] pub name: String, - #[serde(rename = "animated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub animated: Option>, + #[serde(rename = "animated", skip_serializing_if = "Option::is_none")] + pub animated: Option, } impl ComponentEmojiResponse { diff --git a/src/models/connected_account_guild_response.rs b/src/models/connected_account_guild_response.rs index 94d50d4..8b678a9 100644 --- a/src/models/connected_account_guild_response.rs +++ b/src/models/connected_account_guild_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/connected_account_integration_response.rs b/src/models/connected_account_integration_response.rs index f059d39..8517b8c 100644 --- a/src/models/connected_account_integration_response.rs +++ b/src/models/connected_account_integration_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/connected_account_response.rs b/src/models/connected_account_response.rs index 8af074c..50604fc 100644 --- a/src/models/connected_account_response.rs +++ b/src/models/connected_account_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -54,8 +54,8 @@ pub struct ConnectedAccountResponse { pub r#type: Option, #[serde(rename = "friend_sync")] pub friend_sync: bool, - #[serde(rename = "integrations", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub integrations: Option>>, + #[serde(rename = "integrations", skip_serializing_if = "Option::is_none")] + pub integrations: Option>, #[serde(rename = "show_activity")] pub show_activity: bool, #[serde(rename = "two_way_link")] @@ -64,8 +64,8 @@ pub struct ConnectedAccountResponse { pub verified: bool, #[serde(rename = "visibility", deserialize_with = "Option::deserialize")] pub visibility: Option, - #[serde(rename = "revoked", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub revoked: Option>, + #[serde(rename = "revoked", skip_serializing_if = "Option::is_none")] + pub revoked: Option, } impl ConnectedAccountResponse { diff --git a/src/models/container_component_for_message_request.rs b/src/models/container_component_for_message_request.rs index 55370cb..5904453 100644 --- a/src/models/container_component_for_message_request.rs +++ b/src/models/container_component_for_message_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -48,6 +48,8 @@ use serde::{Deserialize, Serialize}; pub struct ContainerComponentForMessageRequest { #[serde(rename = "type")] pub r#type: i32, + #[serde(rename = "id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub id: Option>, #[serde(rename = "accent_color", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub accent_color: Option>, #[serde(rename = "components")] @@ -60,6 +62,7 @@ impl ContainerComponentForMessageRequest { pub fn new(r#type: i32, components: Vec) -> ContainerComponentForMessageRequest { ContainerComponentForMessageRequest { r#type, + id: None, accent_color: None, components, spoiler: None, diff --git a/src/models/container_component_for_message_request_components_inner.rs b/src/models/container_component_for_message_request_components_inner.rs index 2ad1d07..61e339b 100644 --- a/src/models/container_component_for_message_request_components_inner.rs +++ b/src/models/container_component_for_message_request_components_inner.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/container_component_response.rs b/src/models/container_component_response.rs index e8fed31..783d03f 100644 --- a/src/models/container_component_response.rs +++ b/src/models/container_component_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/container_component_response_components_inner.rs b/src/models/container_component_response_components_inner.rs index c2fc0aa..565cf28 100644 --- a/src/models/container_component_response_components_inner.rs +++ b/src/models/container_component_response_components_inner.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/create_application_emoji_request.rs b/src/models/create_application_emoji_request.rs index 07550bf..739a210 100644 --- a/src/models/create_application_emoji_request.rs +++ b/src/models/create_application_emoji_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/create_auto_moderation_rule_200_response.rs b/src/models/create_auto_moderation_rule_200_response.rs index da92997..a01bd5f 100644 --- a/src/models/create_auto_moderation_rule_200_response.rs +++ b/src/models/create_auto_moderation_rule_200_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/create_auto_moderation_rule_request.rs b/src/models/create_auto_moderation_rule_request.rs index 2726a83..8ee3b52 100644 --- a/src/models/create_auto_moderation_rule_request.rs +++ b/src/models/create_auto_moderation_rule_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/create_channel_invite_200_response.rs b/src/models/create_channel_invite_200_response.rs new file mode 100644 index 0000000..e9904fc --- /dev/null +++ b/src/models/create_channel_invite_200_response.rs @@ -0,0 +1,60 @@ +//! # Discord HTTP API (Preview) - REST API Client +//! +//! Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. +//! +//! ## Metadata +//! +//! - **Copyright**: Copyright (c) 2025 Qntx +//! - **Author**: ΣX +//! - **Version**: 10 +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] +//! - **Generator Version**: 7.14.0 +//! +//!
+//! ⚠️ Important Disclaimer & Limitation of Liability +//!
+//! > **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +//! > to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +//! > and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +//! > of this software or its outputs. +//! > +//! > This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +//! > Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +//! > financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +//! > legal professionals before making decisions based on this software's outputs. +//! > +//! > Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +//! > other financial activities may result in substantial losses, including total loss of capital. The Developers are not +//! > liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +//! > outputs and ensuring their suitability for intended purposes. +//! > +//! > This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +//! > the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +//! > comply with third-party terms and conditions. +//! > +//! > Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +//! > their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +//! > Developers disclaim liability for any legal consequences arising from non-compliance. +//! > +//! > To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +//! > consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +//! > loss of profits, data, or business opportunities. +//! +//!
+use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateChannelInvite200Response { + FriendInviteResponse(Box), + GroupDmInviteResponse(Box), + GuildInviteResponse(Box), +} + +impl Default for CreateChannelInvite200Response { + fn default() -> Self { + Self::FriendInviteResponse(Default::default()) + } +} + diff --git a/src/models/create_channel_invite_request.rs b/src/models/create_channel_invite_request.rs index d627af5..96bc93b 100644 --- a/src/models/create_channel_invite_request.rs +++ b/src/models/create_channel_invite_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/create_entitlement_request_data.rs b/src/models/create_entitlement_request_data.rs index 1131a4d..7e16870 100644 --- a/src/models/create_entitlement_request_data.rs +++ b/src/models/create_entitlement_request_data.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/create_forum_thread_request.rs b/src/models/create_forum_thread_request.rs index 810681f..2867c22 100644 --- a/src/models/create_forum_thread_request.rs +++ b/src/models/create_forum_thread_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/create_group_dm_invite_request.rs b/src/models/create_group_dm_invite_request.rs index a174eba..172d68f 100644 --- a/src/models/create_group_dm_invite_request.rs +++ b/src/models/create_group_dm_invite_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/create_guild_channel_request.rs b/src/models/create_guild_channel_request.rs index aaa90e1..cdd4f60 100644 --- a/src/models/create_guild_channel_request.rs +++ b/src/models/create_guild_channel_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/create_guild_emoji_request.rs b/src/models/create_guild_emoji_request.rs index 1143b8c..31d5cc7 100644 --- a/src/models/create_guild_emoji_request.rs +++ b/src/models/create_guild_emoji_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/create_guild_invite_request.rs b/src/models/create_guild_invite_request.rs index d9ef72f..f730e73 100644 --- a/src/models/create_guild_invite_request.rs +++ b/src/models/create_guild_invite_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/create_guild_request_channel_item.rs b/src/models/create_guild_request_channel_item.rs deleted file mode 100644 index 7c7c439..0000000 --- a/src/models/create_guild_request_channel_item.rs +++ /dev/null @@ -1,117 +0,0 @@ -//! # Discord HTTP API (Preview) - REST API Client -//! -//! Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. -//! -//! ## Metadata -//! -//! - **Copyright**: Copyright (c) 2025 Qntx -//! - **Author**: ΣX -//! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] -//! - **Generator Version**: 7.14.0 -//! -//!
-//! ⚠️ Important Disclaimer & Limitation of Liability -//!
-//! > **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited -//! > to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, -//! > and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability -//! > of this software or its outputs. -//! > -//! > This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the -//! > Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of -//! > financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or -//! > legal professionals before making decisions based on this software's outputs. -//! > -//! > Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or -//! > other financial activities may result in substantial losses, including total loss of capital. The Developers are not -//! > liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's -//! > outputs and ensuring their suitability for intended purposes. -//! > -//! > This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify -//! > the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must -//! > comply with third-party terms and conditions. -//! > -//! > Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in -//! > their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The -//! > Developers disclaim liability for any legal consequences arising from non-compliance. -//! > -//! > To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, -//! > consequential, or punitive damages arising from the use or inability to use this software, including but not limited to -//! > loss of profits, data, or business opportunities. -//! -//!
-use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateGuildRequestChannelItem { - #[serde(rename = "type", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub r#type: Option>, - #[serde(rename = "name")] - pub name: String, - #[serde(rename = "position", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub position: Option>, - #[serde(rename = "topic", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub topic: Option>, - #[serde(rename = "bitrate", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub bitrate: Option>, - #[serde(rename = "user_limit", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub user_limit: Option>, - #[serde(rename = "nsfw", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub nsfw: Option>, - #[serde(rename = "rate_limit_per_user", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub rate_limit_per_user: Option>, - #[serde(rename = "parent_id", skip_serializing_if = "Option::is_none")] - pub parent_id: Option, - #[serde(rename = "permission_overwrites", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub permission_overwrites: Option>>, - #[serde(rename = "rtc_region", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub rtc_region: Option>, - #[serde(rename = "video_quality_mode", skip_serializing_if = "Option::is_none")] - pub video_quality_mode: Option, - #[serde(rename = "default_auto_archive_duration", skip_serializing_if = "Option::is_none")] - pub default_auto_archive_duration: Option, - #[serde(rename = "default_reaction_emoji", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub default_reaction_emoji: Option>>, - #[serde(rename = "default_thread_rate_limit_per_user", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub default_thread_rate_limit_per_user: Option>, - #[serde(rename = "default_sort_order", skip_serializing_if = "Option::is_none")] - pub default_sort_order: Option, - #[serde(rename = "default_forum_layout", skip_serializing_if = "Option::is_none")] - pub default_forum_layout: Option, - #[serde(rename = "default_tag_setting", skip_serializing_if = "Option::is_none")] - pub default_tag_setting: Option, - #[serde(rename = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - #[serde(rename = "available_tags", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub available_tags: Option>>, -} - -impl CreateGuildRequestChannelItem { - pub fn new(name: String) -> CreateGuildRequestChannelItem { - CreateGuildRequestChannelItem { - r#type: None, - name, - position: None, - topic: None, - bitrate: None, - user_limit: None, - nsfw: None, - rate_limit_per_user: None, - parent_id: None, - permission_overwrites: None, - rtc_region: None, - video_quality_mode: None, - default_auto_archive_duration: None, - default_reaction_emoji: None, - default_thread_rate_limit_per_user: None, - default_sort_order: None, - default_forum_layout: None, - default_tag_setting: None, - id: None, - available_tags: None, - } - } -} - diff --git a/src/models/create_guild_scheduled_event_request.rs b/src/models/create_guild_scheduled_event_request.rs index 8deceb4..e0f6559 100644 --- a/src/models/create_guild_scheduled_event_request.rs +++ b/src/models/create_guild_scheduled_event_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/create_guild_template_request.rs b/src/models/create_guild_template_request.rs index 45296d6..99955fe 100644 --- a/src/models/create_guild_template_request.rs +++ b/src/models/create_guild_template_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/create_interaction_response_request.rs b/src/models/create_interaction_response_request.rs index cee638c..4f2257d 100644 --- a/src/models/create_interaction_response_request.rs +++ b/src/models/create_interaction_response_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/create_lobby_request.rs b/src/models/create_lobby_request.rs index 8c69acd..087e716 100644 --- a/src/models/create_lobby_request.rs +++ b/src/models/create_lobby_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -52,6 +52,8 @@ pub struct CreateLobbyRequest { pub members: Option>>, #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] pub metadata: Option>, + #[serde(rename = "flags", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub flags: Option>, } impl CreateLobbyRequest { @@ -60,7 +62,20 @@ impl CreateLobbyRequest { idle_timeout_seconds: None, members: None, metadata: None, + flags: None, } } } +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum FlagsEnum { + #[serde(rename = "1")] + Variant1, +} + +impl Default for FlagsEnum { + fn default() -> FlagsEnum { + Self::Variant1 + } +} diff --git a/src/models/create_message_interaction_callback_request.rs b/src/models/create_message_interaction_callback_request.rs index e2a128b..d7862e1 100644 --- a/src/models/create_message_interaction_callback_request.rs +++ b/src/models/create_message_interaction_callback_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/create_message_interaction_callback_response.rs b/src/models/create_message_interaction_callback_response.rs index 99bdcc7..55f48c5 100644 --- a/src/models/create_message_interaction_callback_response.rs +++ b/src/models/create_message_interaction_callback_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/create_or_join_lobby_request.rs b/src/models/create_or_join_lobby_request.rs index b74ceaa..21e1e90 100644 --- a/src/models/create_or_join_lobby_request.rs +++ b/src/models/create_or_join_lobby_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -54,6 +54,8 @@ pub struct CreateOrJoinLobbyRequest { pub member_metadata: Option>, #[serde(rename = "secret")] pub secret: String, + #[serde(rename = "flags", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub flags: Option>, } impl CreateOrJoinLobbyRequest { @@ -63,7 +65,20 @@ impl CreateOrJoinLobbyRequest { lobby_metadata: None, member_metadata: None, secret, + flags: None, } } } +/// +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum FlagsEnum { + #[serde(rename = "1")] + Variant1, +} + +impl Default for FlagsEnum { + fn default() -> FlagsEnum { + Self::Variant1 + } +} diff --git a/src/models/create_or_update_thread_tag_request.rs b/src/models/create_or_update_thread_tag_request.rs index 2a37aef..45d2e79 100644 --- a/src/models/create_or_update_thread_tag_request.rs +++ b/src/models/create_or_update_thread_tag_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/create_private_channel_request.rs b/src/models/create_private_channel_request.rs index 0944dab..8950604 100644 --- a/src/models/create_private_channel_request.rs +++ b/src/models/create_private_channel_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/create_guild_role_request.rs b/src/models/create_role_request.rs similarity index 95% rename from src/models/create_guild_role_request.rs rename to src/models/create_role_request.rs index e3f55e4..873b052 100644 --- a/src/models/create_guild_role_request.rs +++ b/src/models/create_role_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -45,7 +45,7 @@ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateGuildRoleRequest { +pub struct CreateRoleRequest { #[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub name: Option>, #[serde(rename = "permissions", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] @@ -62,9 +62,9 @@ pub struct CreateGuildRoleRequest { pub unicode_emoji: Option>, } -impl CreateGuildRoleRequest { - pub fn new() -> CreateGuildRoleRequest { - CreateGuildRoleRequest { +impl CreateRoleRequest { + pub fn new() -> CreateRoleRequest { + CreateRoleRequest { name: None, permissions: None, color: None, diff --git a/src/models/create_stage_instance_request.rs b/src/models/create_stage_instance_request.rs index acc0231..ee5fa55 100644 --- a/src/models/create_stage_instance_request.rs +++ b/src/models/create_stage_instance_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/create_text_thread_with_message_request.rs b/src/models/create_text_thread_with_message_request.rs index d88fe65..c009b6c 100644 --- a/src/models/create_text_thread_with_message_request.rs +++ b/src/models/create_text_thread_with_message_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/create_text_thread_without_message_request.rs b/src/models/create_text_thread_without_message_request.rs index a509cb1..1a6e1bf 100644 --- a/src/models/create_text_thread_without_message_request.rs +++ b/src/models/create_text_thread_without_message_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/create_thread_request.rs b/src/models/create_thread_request.rs index 4c0e1fb..5cf3290 100644 --- a/src/models/create_thread_request.rs +++ b/src/models/create_thread_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/create_webhook_request.rs b/src/models/create_webhook_request.rs index 3fdc1d8..c575db6 100644 --- a/src/models/create_webhook_request.rs +++ b/src/models/create_webhook_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/created_thread_response.rs b/src/models/created_thread_response.rs index a393c54..e5ba47d 100644 --- a/src/models/created_thread_response.rs +++ b/src/models/created_thread_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -62,12 +62,12 @@ pub struct CreatedThreadResponse { pub name: String, #[serde(rename = "parent_id", skip_serializing_if = "Option::is_none")] pub parent_id: Option, - #[serde(rename = "rate_limit_per_user", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub rate_limit_per_user: Option>, - #[serde(rename = "bitrate", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub bitrate: Option>, - #[serde(rename = "user_limit", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub user_limit: Option>, + #[serde(rename = "rate_limit_per_user", skip_serializing_if = "Option::is_none")] + pub rate_limit_per_user: Option, + #[serde(rename = "bitrate", skip_serializing_if = "Option::is_none")] + pub bitrate: Option, + #[serde(rename = "user_limit", skip_serializing_if = "Option::is_none")] + pub user_limit: Option, #[serde(rename = "rtc_region", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub rtc_region: Option>, #[serde(rename = "video_quality_mode", skip_serializing_if = "Option::is_none")] @@ -76,22 +76,22 @@ pub struct CreatedThreadResponse { pub permissions: Option>, #[serde(rename = "owner_id")] pub owner_id: String, - #[serde(rename = "thread_metadata", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub thread_metadata: Option>>, + #[serde(rename = "thread_metadata")] + pub thread_metadata: Box, #[serde(rename = "message_count")] pub message_count: i32, #[serde(rename = "member_count")] pub member_count: i32, #[serde(rename = "total_message_sent")] pub total_message_sent: i32, - #[serde(rename = "applied_tags", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub applied_tags: Option>>, - #[serde(rename = "member", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub member: Option>>, + #[serde(rename = "applied_tags", skip_serializing_if = "Option::is_none")] + pub applied_tags: Option>, + #[serde(rename = "member", skip_serializing_if = "Option::is_none")] + pub member: Option>, } impl CreatedThreadResponse { - pub fn new(id: String, r#type: i32, flags: i32, guild_id: String, name: String, owner_id: String, message_count: i32, member_count: i32, total_message_sent: i32) -> CreatedThreadResponse { + pub fn new(id: String, r#type: i32, flags: i32, guild_id: String, name: String, owner_id: String, thread_metadata: models::ThreadMetadataResponse, message_count: i32, member_count: i32, total_message_sent: i32) -> CreatedThreadResponse { CreatedThreadResponse { id, r#type, @@ -108,7 +108,7 @@ impl CreatedThreadResponse { video_quality_mode: None, permissions: None, owner_id, - thread_metadata: None, + thread_metadata: Box::new(thread_metadata), message_count, member_count, total_message_sent, diff --git a/src/models/custom_client_theme_response.rs b/src/models/custom_client_theme_response.rs new file mode 100644 index 0000000..f243003 --- /dev/null +++ b/src/models/custom_client_theme_response.rs @@ -0,0 +1,69 @@ +//! # Discord HTTP API (Preview) - REST API Client +//! +//! Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. +//! +//! ## Metadata +//! +//! - **Copyright**: Copyright (c) 2025 Qntx +//! - **Author**: ΣX +//! - **Version**: 10 +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] +//! - **Generator Version**: 7.14.0 +//! +//!
+//! ⚠️ Important Disclaimer & Limitation of Liability +//!
+//! > **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +//! > to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +//! > and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +//! > of this software or its outputs. +//! > +//! > This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +//! > Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +//! > financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +//! > legal professionals before making decisions based on this software's outputs. +//! > +//! > Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +//! > other financial activities may result in substantial losses, including total loss of capital. The Developers are not +//! > liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +//! > outputs and ensuring their suitability for intended purposes. +//! > +//! > This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +//! > the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +//! > comply with third-party terms and conditions. +//! > +//! > Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +//! > their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +//! > Developers disclaim liability for any legal consequences arising from non-compliance. +//! > +//! > To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +//! > consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +//! > loss of profits, data, or business opportunities. +//! +//!
+use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CustomClientThemeResponse { + #[serde(rename = "colors")] + pub colors: Vec, + #[serde(rename = "gradient_angle")] + pub gradient_angle: i32, + #[serde(rename = "base_mix")] + pub base_mix: i32, + #[serde(rename = "base_theme")] + pub base_theme: i32, +} + +impl CustomClientThemeResponse { + pub fn new(colors: Vec, gradient_angle: i32, base_mix: i32, base_theme: i32) -> CustomClientThemeResponse { + CustomClientThemeResponse { + colors, + gradient_angle, + base_mix, + base_theme, + } + } +} + diff --git a/src/models/custom_client_theme_share_request.rs b/src/models/custom_client_theme_share_request.rs new file mode 100644 index 0000000..5589826 --- /dev/null +++ b/src/models/custom_client_theme_share_request.rs @@ -0,0 +1,69 @@ +//! # Discord HTTP API (Preview) - REST API Client +//! +//! Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. +//! +//! ## Metadata +//! +//! - **Copyright**: Copyright (c) 2025 Qntx +//! - **Author**: ΣX +//! - **Version**: 10 +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] +//! - **Generator Version**: 7.14.0 +//! +//!
+//! ⚠️ Important Disclaimer & Limitation of Liability +//!
+//! > **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +//! > to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +//! > and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +//! > of this software or its outputs. +//! > +//! > This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +//! > Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +//! > financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +//! > legal professionals before making decisions based on this software's outputs. +//! > +//! > Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +//! > other financial activities may result in substantial losses, including total loss of capital. The Developers are not +//! > liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +//! > outputs and ensuring their suitability for intended purposes. +//! > +//! > This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +//! > the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +//! > comply with third-party terms and conditions. +//! > +//! > Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +//! > their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +//! > Developers disclaim liability for any legal consequences arising from non-compliance. +//! > +//! > To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +//! > consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +//! > loss of profits, data, or business opportunities. +//! +//!
+use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CustomClientThemeShareRequest { + #[serde(rename = "colors")] + pub colors: Vec, + #[serde(rename = "gradient_angle")] + pub gradient_angle: i32, + #[serde(rename = "base_mix")] + pub base_mix: i32, + #[serde(rename = "base_theme", skip_serializing_if = "Option::is_none")] + pub base_theme: Option, +} + +impl CustomClientThemeShareRequest { + pub fn new(colors: Vec, gradient_angle: i32, base_mix: i32) -> CustomClientThemeShareRequest { + CustomClientThemeShareRequest { + colors, + gradient_angle, + base_mix, + base_theme: None, + } + } +} + diff --git a/src/models/default_keyword_list_trigger_metadata.rs b/src/models/default_keyword_list_trigger_metadata.rs index 532646e..f0de8dd 100644 --- a/src/models/default_keyword_list_trigger_metadata.rs +++ b/src/models/default_keyword_list_trigger_metadata.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/default_keyword_list_trigger_metadata_response.rs b/src/models/default_keyword_list_trigger_metadata_response.rs index fe690ce..69c2e0e 100644 --- a/src/models/default_keyword_list_trigger_metadata_response.rs +++ b/src/models/default_keyword_list_trigger_metadata_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/default_keyword_list_upsert_request.rs b/src/models/default_keyword_list_upsert_request.rs index 45606a7..8ba98f7 100644 --- a/src/models/default_keyword_list_upsert_request.rs +++ b/src/models/default_keyword_list_upsert_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/default_keyword_list_upsert_request_actions_inner.rs b/src/models/default_keyword_list_upsert_request_actions_inner.rs index d849613..0ef2232 100644 --- a/src/models/default_keyword_list_upsert_request_actions_inner.rs +++ b/src/models/default_keyword_list_upsert_request_actions_inner.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/default_keyword_list_upsert_request_partial.rs b/src/models/default_keyword_list_upsert_request_partial.rs index 0a05c03..cfe55b8 100644 --- a/src/models/default_keyword_list_upsert_request_partial.rs +++ b/src/models/default_keyword_list_upsert_request_partial.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/default_keyword_rule_response.rs b/src/models/default_keyword_rule_response.rs index e6904f0..b62bba5 100644 --- a/src/models/default_keyword_rule_response.rs +++ b/src/models/default_keyword_rule_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -60,18 +60,18 @@ pub struct DefaultKeywordRuleResponse { pub actions: Vec, #[serde(rename = "trigger_type")] pub trigger_type: i32, - #[serde(rename = "enabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub enabled: Option>, - #[serde(rename = "exempt_roles", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub exempt_roles: Option>>, - #[serde(rename = "exempt_channels", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub exempt_channels: Option>>, + #[serde(rename = "enabled")] + pub enabled: bool, + #[serde(rename = "exempt_roles")] + pub exempt_roles: Vec, + #[serde(rename = "exempt_channels")] + pub exempt_channels: Vec, #[serde(rename = "trigger_metadata")] pub trigger_metadata: Box, } impl DefaultKeywordRuleResponse { - pub fn new(id: String, guild_id: String, creator_id: String, name: String, event_type: i32, actions: Vec, trigger_type: i32, trigger_metadata: models::DefaultKeywordListTriggerMetadataResponse) -> DefaultKeywordRuleResponse { + pub fn new(id: String, guild_id: String, creator_id: String, name: String, event_type: i32, actions: Vec, trigger_type: i32, enabled: bool, exempt_roles: Vec, exempt_channels: Vec, trigger_metadata: models::DefaultKeywordListTriggerMetadataResponse) -> DefaultKeywordRuleResponse { DefaultKeywordRuleResponse { id, guild_id, @@ -80,9 +80,9 @@ impl DefaultKeywordRuleResponse { event_type, actions, trigger_type, - enabled: None, - exempt_roles: None, - exempt_channels: None, + enabled, + exempt_roles, + exempt_channels, trigger_metadata: Box::new(trigger_metadata), } } diff --git a/src/models/default_keyword_rule_response_actions_inner.rs b/src/models/default_keyword_rule_response_actions_inner.rs index 1207641..939fa0b 100644 --- a/src/models/default_keyword_rule_response_actions_inner.rs +++ b/src/models/default_keyword_rule_response_actions_inner.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/default_reaction_emoji_response.rs b/src/models/default_reaction_emoji_response.rs index 5eae21e..f19d26a 100644 --- a/src/models/default_reaction_emoji_response.rs +++ b/src/models/default_reaction_emoji_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/discord_integration_response.rs b/src/models/discord_integration_response.rs index f44385d..2ecbb95 100644 --- a/src/models/discord_integration_response.rs +++ b/src/models/discord_integration_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,27 +50,27 @@ pub struct DiscordIntegrationResponse { pub r#type: Option, #[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub name: Option>, - #[serde(rename = "account", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub account: Option>>, - #[serde(rename = "enabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub enabled: Option>, + #[serde(rename = "account")] + pub account: Box, + #[serde(rename = "enabled")] + pub enabled: bool, #[serde(rename = "id")] pub id: String, #[serde(rename = "application")] pub application: Box, #[serde(rename = "scopes")] pub scopes: Vec, - #[serde(rename = "user", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub user: Option>>, + #[serde(rename = "user", skip_serializing_if = "Option::is_none")] + pub user: Option>, } impl DiscordIntegrationResponse { - pub fn new(r#type: Option, id: String, application: models::IntegrationApplicationResponse, scopes: Vec) -> DiscordIntegrationResponse { + pub fn new(r#type: Option, account: models::AccountResponse, enabled: bool, id: String, application: models::IntegrationApplicationResponse, scopes: Vec) -> DiscordIntegrationResponse { DiscordIntegrationResponse { r#type, name: None, - account: None, - enabled: None, + account: Box::new(account), + enabled, id, application: Box::new(application), scopes, diff --git a/src/models/edit_lobby_channel_link_request.rs b/src/models/edit_lobby_channel_link_request.rs index 925b9c9..2ab6fd3 100644 --- a/src/models/edit_lobby_channel_link_request.rs +++ b/src/models/edit_lobby_channel_link_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/embedded_activity_instance.rs b/src/models/embedded_activity_instance.rs index d47425f..aad68d7 100644 --- a/src/models/embedded_activity_instance.rs +++ b/src/models/embedded_activity_instance.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -52,19 +52,19 @@ pub struct EmbeddedActivityInstance { pub instance_id: String, #[serde(rename = "launch_id")] pub launch_id: String, - #[serde(rename = "location", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub location: Option>>, + #[serde(rename = "location")] + pub location: Box, #[serde(rename = "users")] pub users: Vec, } impl EmbeddedActivityInstance { - pub fn new(application_id: String, instance_id: String, launch_id: String, users: Vec) -> EmbeddedActivityInstance { + pub fn new(application_id: String, instance_id: String, launch_id: String, location: models::EmbeddedActivityInstanceLocation, users: Vec) -> EmbeddedActivityInstance { EmbeddedActivityInstance { application_id, instance_id, launch_id, - location: None, + location: Box::new(location), users, } } diff --git a/src/models/embedded_activity_instance_location.rs b/src/models/embedded_activity_instance_location.rs index 77ceaec..e3657c1 100644 --- a/src/models/embedded_activity_instance_location.rs +++ b/src/models/embedded_activity_instance_location.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/emoji_response.rs b/src/models/emoji_response.rs index bd67a6f..f28bba1 100644 --- a/src/models/emoji_response.rs +++ b/src/models/emoji_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,8 +50,8 @@ pub struct EmojiResponse { pub id: String, #[serde(rename = "name")] pub name: String, - #[serde(rename = "user", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub user: Option>>, + #[serde(rename = "user", skip_serializing_if = "Option::is_none")] + pub user: Option>, #[serde(rename = "roles")] pub roles: Vec, #[serde(rename = "require_colons")] diff --git a/src/models/entitlement_response.rs b/src/models/entitlement_response.rs index 23a345c..5897480 100644 --- a/src/models/entitlement_response.rs +++ b/src/models/entitlement_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/entity_metadata_external.rs b/src/models/entity_metadata_external.rs index 1558a3e..222aee2 100644 --- a/src/models/entity_metadata_external.rs +++ b/src/models/entity_metadata_external.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/entity_metadata_external_response.rs b/src/models/entity_metadata_external_response.rs index 168a103..8d64d29 100644 --- a/src/models/entity_metadata_external_response.rs +++ b/src/models/entity_metadata_external_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/error.rs b/src/models/error.rs index bcdf868..c27a36f 100644 --- a/src/models/error.rs +++ b/src/models/error.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/error_details.rs b/src/models/error_details.rs index 07a7963..710b974 100644 --- a/src/models/error_details.rs +++ b/src/models/error_details.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/error_response.rs b/src/models/error_response.rs index 835d7fc..a48827b 100644 --- a/src/models/error_response.rs +++ b/src/models/error_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/execute_webhook_request.rs b/src/models/execute_webhook_request.rs index 93ef6a5..8015cc3 100644 --- a/src/models/execute_webhook_request.rs +++ b/src/models/execute_webhook_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/external_connection_integration_response.rs b/src/models/external_connection_integration_response.rs index 8e1635d..4b3b969 100644 --- a/src/models/external_connection_integration_response.rs +++ b/src/models/external_connection_integration_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,39 +50,39 @@ pub struct ExternalConnectionIntegrationResponse { pub r#type: Option, #[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub name: Option>, - #[serde(rename = "account", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub account: Option>>, - #[serde(rename = "enabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub enabled: Option>, + #[serde(rename = "account")] + pub account: Box, + #[serde(rename = "enabled")] + pub enabled: bool, #[serde(rename = "id")] pub id: String, #[serde(rename = "user")] pub user: Box, - #[serde(rename = "revoked", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub revoked: Option>, + #[serde(rename = "revoked", skip_serializing_if = "Option::is_none")] + pub revoked: Option, #[serde(rename = "expire_behavior", skip_serializing_if = "Option::is_none")] pub expire_behavior: Option, #[serde(rename = "expire_grace_period", skip_serializing_if = "Option::is_none")] pub expire_grace_period: Option, - #[serde(rename = "subscriber_count", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub subscriber_count: Option>, - #[serde(rename = "synced_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub synced_at: Option>, + #[serde(rename = "subscriber_count", skip_serializing_if = "Option::is_none")] + pub subscriber_count: Option, + #[serde(rename = "synced_at", skip_serializing_if = "Option::is_none")] + pub synced_at: Option, #[serde(rename = "role_id", skip_serializing_if = "Option::is_none")] pub role_id: Option, - #[serde(rename = "syncing", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub syncing: Option>, - #[serde(rename = "enable_emoticons", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub enable_emoticons: Option>, + #[serde(rename = "syncing", skip_serializing_if = "Option::is_none")] + pub syncing: Option, + #[serde(rename = "enable_emoticons", skip_serializing_if = "Option::is_none")] + pub enable_emoticons: Option, } impl ExternalConnectionIntegrationResponse { - pub fn new(r#type: Option, id: String, user: models::UserResponse) -> ExternalConnectionIntegrationResponse { + pub fn new(r#type: Option, account: models::AccountResponse, enabled: bool, id: String, user: models::UserResponse) -> ExternalConnectionIntegrationResponse { ExternalConnectionIntegrationResponse { r#type, name: None, - account: None, - enabled: None, + account: Box::new(account), + enabled, id, user: Box::new(user), revoked: None, diff --git a/src/models/external_scheduled_event_create_request.rs b/src/models/external_scheduled_event_create_request.rs index 247568b..8a0c518 100644 --- a/src/models/external_scheduled_event_create_request.rs +++ b/src/models/external_scheduled_event_create_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/external_scheduled_event_patch_request_partial.rs b/src/models/external_scheduled_event_patch_request_partial.rs index 8af1923..adef5dc 100644 --- a/src/models/external_scheduled_event_patch_request_partial.rs +++ b/src/models/external_scheduled_event_patch_request_partial.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/external_scheduled_event_response.rs b/src/models/external_scheduled_event_response.rs index 8a81cb1..132f409 100644 --- a/src/models/external_scheduled_event_response.rs +++ b/src/models/external_scheduled_event_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -58,8 +58,8 @@ pub struct ExternalScheduledEventResponse { pub channel_id: Option, #[serde(rename = "creator_id", skip_serializing_if = "Option::is_none")] pub creator_id: Option, - #[serde(rename = "creator", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub creator: Option>>, + #[serde(rename = "creator", skip_serializing_if = "Option::is_none")] + pub creator: Option>, #[serde(rename = "image", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub image: Option>, #[serde(rename = "scheduled_start_time")] @@ -72,8 +72,8 @@ pub struct ExternalScheduledEventResponse { pub entity_type: Option, #[serde(rename = "entity_id", skip_serializing_if = "Option::is_none")] pub entity_id: Option, - #[serde(rename = "user_count", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub user_count: Option>, + #[serde(rename = "user_count", skip_serializing_if = "Option::is_none")] + pub user_count: Option, #[serde(rename = "privacy_level", deserialize_with = "Option::deserialize")] pub privacy_level: Option, #[serde(rename = "user_rsvp", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] diff --git a/src/models/file_component_for_message_request.rs b/src/models/file_component_for_message_request.rs index ee3a41d..7bd1574 100644 --- a/src/models/file_component_for_message_request.rs +++ b/src/models/file_component_for_message_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -48,6 +48,8 @@ use serde::{Deserialize, Serialize}; pub struct FileComponentForMessageRequest { #[serde(rename = "type")] pub r#type: i32, + #[serde(rename = "id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub id: Option>, #[serde(rename = "spoiler", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub spoiler: Option>, #[serde(rename = "file")] @@ -58,6 +60,7 @@ impl FileComponentForMessageRequest { pub fn new(r#type: i32, file: models::UnfurledMediaRequestWithAttachmentReferenceRequired) -> FileComponentForMessageRequest { FileComponentForMessageRequest { r#type, + id: None, spoiler: None, file: Box::new(file), } diff --git a/src/models/file_component_response.rs b/src/models/file_component_response.rs index 61f62d4..f7fe664 100644 --- a/src/models/file_component_response.rs +++ b/src/models/file_component_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/flag_to_channel_action.rs b/src/models/flag_to_channel_action.rs index 6457c21..5bf2bc9 100644 --- a/src/models/flag_to_channel_action.rs +++ b/src/models/flag_to_channel_action.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/flag_to_channel_action_metadata.rs b/src/models/flag_to_channel_action_metadata.rs index 150f980..8eaee93 100644 --- a/src/models/flag_to_channel_action_metadata.rs +++ b/src/models/flag_to_channel_action_metadata.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/flag_to_channel_action_metadata_response.rs b/src/models/flag_to_channel_action_metadata_response.rs index 073f315..ecba963 100644 --- a/src/models/flag_to_channel_action_metadata_response.rs +++ b/src/models/flag_to_channel_action_metadata_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/flag_to_channel_action_response.rs b/src/models/flag_to_channel_action_response.rs index 27744a7..ee4235e 100644 --- a/src/models/flag_to_channel_action_response.rs +++ b/src/models/flag_to_channel_action_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/follow_channel_request.rs b/src/models/follow_channel_request.rs index 8d506a4..f97c3c9 100644 --- a/src/models/follow_channel_request.rs +++ b/src/models/follow_channel_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/forum_tag_response.rs b/src/models/forum_tag_response.rs index c2e35c1..a49b38b 100644 --- a/src/models/forum_tag_response.rs +++ b/src/models/forum_tag_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/friend_invite_response.rs b/src/models/friend_invite_response.rs index 3cd88e0..c68c748 100644 --- a/src/models/friend_invite_response.rs +++ b/src/models/friend_invite_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -46,36 +46,36 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct FriendInviteResponse { - #[serde(rename = "type", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub r#type: Option>, + #[serde(rename = "type", deserialize_with = "Option::deserialize")] + pub r#type: Option, #[serde(rename = "code")] pub code: String, - #[serde(rename = "inviter", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub inviter: Option>>, - #[serde(rename = "max_age", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub max_age: Option>, - #[serde(rename = "created_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub created_at: Option>, + #[serde(rename = "inviter", skip_serializing_if = "Option::is_none")] + pub inviter: Option>, + #[serde(rename = "max_age", skip_serializing_if = "Option::is_none")] + pub max_age: Option, + #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] + pub created_at: Option, #[serde(rename = "expires_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub expires_at: Option>, - #[serde(rename = "friends_count", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub friends_count: Option>, + #[serde(rename = "friends_count", skip_serializing_if = "Option::is_none")] + pub friends_count: Option, #[serde(rename = "channel", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub channel: Option>>, - #[serde(rename = "is_contact", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub is_contact: Option>, - #[serde(rename = "uses", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub uses: Option>, - #[serde(rename = "max_uses", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub max_uses: Option>, - #[serde(rename = "flags", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub flags: Option>, + #[serde(rename = "is_contact", skip_serializing_if = "Option::is_none")] + pub is_contact: Option, + #[serde(rename = "uses", skip_serializing_if = "Option::is_none")] + pub uses: Option, + #[serde(rename = "max_uses", skip_serializing_if = "Option::is_none")] + pub max_uses: Option, + #[serde(rename = "flags", skip_serializing_if = "Option::is_none")] + pub flags: Option, } impl FriendInviteResponse { - pub fn new(code: String) -> FriendInviteResponse { + pub fn new(r#type: Option, code: String) -> FriendInviteResponse { FriendInviteResponse { - r#type: None, + r#type, code, inviter: None, max_age: None, diff --git a/src/models/gateway_bot_response.rs b/src/models/gateway_bot_response.rs index 957945e..6e1fc18 100644 --- a/src/models/gateway_bot_response.rs +++ b/src/models/gateway_bot_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/gateway_bot_session_start_limit_response.rs b/src/models/gateway_bot_session_start_limit_response.rs index 7e03ebf..676b32b 100644 --- a/src/models/gateway_bot_session_start_limit_response.rs +++ b/src/models/gateway_bot_session_start_limit_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/gateway_response.rs b/src/models/gateway_response.rs index 4615dd6..4def436 100644 --- a/src/models/gateway_response.rs +++ b/src/models/gateway_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/get_channel_200_response.rs b/src/models/get_channel_200_response.rs index f0da878..e6e7c32 100644 --- a/src/models/get_channel_200_response.rs +++ b/src/models/get_channel_200_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/get_entitlements_sku_ids_parameter.rs b/src/models/get_entitlements_sku_ids_parameter.rs index 1187fc3..1bed5c6 100644 --- a/src/models/get_entitlements_sku_ids_parameter.rs +++ b/src/models/get_entitlements_sku_ids_parameter.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/get_sticker_200_response.rs b/src/models/get_sticker_200_response.rs index d00d721..1b4ba08 100644 --- a/src/models/get_sticker_200_response.rs +++ b/src/models/get_sticker_200_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/github_author.rs b/src/models/github_author.rs index f299e30..d88e653 100644 --- a/src/models/github_author.rs +++ b/src/models/github_author.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/github_check_app.rs b/src/models/github_check_app.rs index 3c204f9..ff64016 100644 --- a/src/models/github_check_app.rs +++ b/src/models/github_check_app.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/github_check_pull_request.rs b/src/models/github_check_pull_request.rs index 1cb8dad..40596f8 100644 --- a/src/models/github_check_pull_request.rs +++ b/src/models/github_check_pull_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/github_check_run.rs b/src/models/github_check_run.rs index 6e9edd1..274e59e 100644 --- a/src/models/github_check_run.rs +++ b/src/models/github_check_run.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/github_check_run_output.rs b/src/models/github_check_run_output.rs index 2db3ce6..3685a1a 100644 --- a/src/models/github_check_run_output.rs +++ b/src/models/github_check_run_output.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/github_check_suite.rs b/src/models/github_check_suite.rs index 16827a1..c40b415 100644 --- a/src/models/github_check_suite.rs +++ b/src/models/github_check_suite.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/github_comment.rs b/src/models/github_comment.rs index 8149b42..1ddbd29 100644 --- a/src/models/github_comment.rs +++ b/src/models/github_comment.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/github_commit.rs b/src/models/github_commit.rs index d4cf002..f116af6 100644 --- a/src/models/github_commit.rs +++ b/src/models/github_commit.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/github_discussion.rs b/src/models/github_discussion.rs index da8e989..98367ab 100644 --- a/src/models/github_discussion.rs +++ b/src/models/github_discussion.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/github_issue.rs b/src/models/github_issue.rs index 3628cfd..80e9f6d 100644 --- a/src/models/github_issue.rs +++ b/src/models/github_issue.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/github_release.rs b/src/models/github_release.rs index 4b4d2c6..2319ed5 100644 --- a/src/models/github_release.rs +++ b/src/models/github_release.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/github_repository.rs b/src/models/github_repository.rs index a0907ab..4af821b 100644 --- a/src/models/github_repository.rs +++ b/src/models/github_repository.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/github_review.rs b/src/models/github_review.rs index 13ac21a..bf2bb3c 100644 --- a/src/models/github_review.rs +++ b/src/models/github_review.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/github_user.rs b/src/models/github_user.rs index 601e95c..3d1eb11 100644 --- a/src/models/github_user.rs +++ b/src/models/github_user.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/github_webhook.rs b/src/models/github_webhook.rs index 1bdb7d4..9d7ce26 100644 --- a/src/models/github_webhook.rs +++ b/src/models/github_webhook.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/group_dm_invite_response.rs b/src/models/group_dm_invite_response.rs index f47f939..96f45cc 100644 --- a/src/models/group_dm_invite_response.rs +++ b/src/models/group_dm_invite_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -46,34 +46,34 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GroupDmInviteResponse { - #[serde(rename = "type", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub r#type: Option>, + #[serde(rename = "type", deserialize_with = "Option::deserialize")] + pub r#type: Option, #[serde(rename = "code")] pub code: String, - #[serde(rename = "inviter", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub inviter: Option>>, - #[serde(rename = "max_age", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub max_age: Option>, - #[serde(rename = "created_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub created_at: Option>, + #[serde(rename = "inviter", skip_serializing_if = "Option::is_none")] + pub inviter: Option>, + #[serde(rename = "max_age", skip_serializing_if = "Option::is_none")] + pub max_age: Option, + #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] + pub created_at: Option, #[serde(rename = "expires_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub expires_at: Option>, - #[serde(rename = "channel", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub channel: Option>>, + #[serde(rename = "channel")] + pub channel: Box, #[serde(rename = "approximate_member_count", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub approximate_member_count: Option>, } impl GroupDmInviteResponse { - pub fn new(code: String) -> GroupDmInviteResponse { + pub fn new(r#type: Option, code: String, channel: models::InviteChannelResponse) -> GroupDmInviteResponse { GroupDmInviteResponse { - r#type: None, + r#type, code, inviter: None, max_age: None, created_at: None, expires_at: None, - channel: None, + channel: Box::new(channel), approximate_member_count: None, } } diff --git a/src/models/guild_audit_log_response.rs b/src/models/guild_audit_log_response.rs index 3d5884a..fc16c7c 100644 --- a/src/models/guild_audit_log_response.rs +++ b/src/models/guild_audit_log_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/guild_audit_log_response_integrations_inner.rs b/src/models/guild_audit_log_response_integrations_inner.rs index 7392e72..cffb366 100644 --- a/src/models/guild_audit_log_response_integrations_inner.rs +++ b/src/models/guild_audit_log_response_integrations_inner.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/guild_ban_response.rs b/src/models/guild_ban_response.rs index 40f02e5..f30226e 100644 --- a/src/models/guild_ban_response.rs +++ b/src/models/guild_ban_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/guild_channel_location.rs b/src/models/guild_channel_location.rs index 16fafaa..9e4fee6 100644 --- a/src/models/guild_channel_location.rs +++ b/src/models/guild_channel_location.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/guild_channel_response.rs b/src/models/guild_channel_response.rs index 7ceea45..e946104 100644 --- a/src/models/guild_channel_response.rs +++ b/src/models/guild_channel_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -62,12 +62,12 @@ pub struct GuildChannelResponse { pub name: String, #[serde(rename = "parent_id", skip_serializing_if = "Option::is_none")] pub parent_id: Option, - #[serde(rename = "rate_limit_per_user", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub rate_limit_per_user: Option>, - #[serde(rename = "bitrate", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub bitrate: Option>, - #[serde(rename = "user_limit", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub user_limit: Option>, + #[serde(rename = "rate_limit_per_user", skip_serializing_if = "Option::is_none")] + pub rate_limit_per_user: Option, + #[serde(rename = "bitrate", skip_serializing_if = "Option::is_none")] + pub bitrate: Option, + #[serde(rename = "user_limit", skip_serializing_if = "Option::is_none")] + pub user_limit: Option, #[serde(rename = "rtc_region", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub rtc_region: Option>, #[serde(rename = "video_quality_mode", skip_serializing_if = "Option::is_none")] @@ -78,16 +78,16 @@ pub struct GuildChannelResponse { pub topic: Option>, #[serde(rename = "default_auto_archive_duration", skip_serializing_if = "Option::is_none")] pub default_auto_archive_duration: Option, - #[serde(rename = "default_thread_rate_limit_per_user", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub default_thread_rate_limit_per_user: Option>, + #[serde(rename = "default_thread_rate_limit_per_user", skip_serializing_if = "Option::is_none")] + pub default_thread_rate_limit_per_user: Option, #[serde(rename = "position")] pub position: i32, - #[serde(rename = "permission_overwrites", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub permission_overwrites: Option>>, - #[serde(rename = "nsfw", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub nsfw: Option>, - #[serde(rename = "available_tags", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub available_tags: Option>>, + #[serde(rename = "permission_overwrites", skip_serializing_if = "Option::is_none")] + pub permission_overwrites: Option>, + #[serde(rename = "nsfw", skip_serializing_if = "Option::is_none")] + pub nsfw: Option, + #[serde(rename = "available_tags", skip_serializing_if = "Option::is_none")] + pub available_tags: Option>, #[serde(rename = "default_reaction_emoji", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub default_reaction_emoji: Option>>, #[serde(rename = "default_sort_order", skip_serializing_if = "Option::is_none")] @@ -96,8 +96,8 @@ pub struct GuildChannelResponse { pub default_forum_layout: Option, #[serde(rename = "default_tag_setting", skip_serializing_if = "Option::is_none")] pub default_tag_setting: Option, - #[serde(rename = "hd_streaming_until", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub hd_streaming_until: Option>, + #[serde(rename = "hd_streaming_until", skip_serializing_if = "Option::is_none")] + pub hd_streaming_until: Option, #[serde(rename = "hd_streaming_buyer_id", skip_serializing_if = "Option::is_none")] pub hd_streaming_buyer_id: Option, } diff --git a/src/models/guild_create_request.rs b/src/models/guild_create_request.rs deleted file mode 100644 index 6b87515..0000000 --- a/src/models/guild_create_request.rs +++ /dev/null @@ -1,99 +0,0 @@ -//! # Discord HTTP API (Preview) - REST API Client -//! -//! Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. -//! -//! ## Metadata -//! -//! - **Copyright**: Copyright (c) 2025 Qntx -//! - **Author**: ΣX -//! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] -//! - **Generator Version**: 7.14.0 -//! -//!
-//! ⚠️ Important Disclaimer & Limitation of Liability -//!
-//! > **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited -//! > to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, -//! > and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability -//! > of this software or its outputs. -//! > -//! > This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the -//! > Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of -//! > financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or -//! > legal professionals before making decisions based on this software's outputs. -//! > -//! > Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or -//! > other financial activities may result in substantial losses, including total loss of capital. The Developers are not -//! > liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's -//! > outputs and ensuring their suitability for intended purposes. -//! > -//! > This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify -//! > the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must -//! > comply with third-party terms and conditions. -//! > -//! > Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in -//! > their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The -//! > Developers disclaim liability for any legal consequences arising from non-compliance. -//! > -//! > To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, -//! > consequential, or punitive damages arising from the use or inability to use this software, including but not limited to -//! > loss of profits, data, or business opportunities. -//! -//!
-use crate::models; -use serde::{Deserialize, Serialize}; - -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct GuildCreateRequest { - #[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub description: Option>, - #[serde(rename = "name")] - pub name: String, - #[serde(rename = "region", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub region: Option>, - #[serde(rename = "icon", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub icon: Option>, - #[serde(rename = "verification_level", skip_serializing_if = "Option::is_none")] - pub verification_level: Option, - #[serde(rename = "default_message_notifications", skip_serializing_if = "Option::is_none")] - pub default_message_notifications: Option, - #[serde(rename = "explicit_content_filter", skip_serializing_if = "Option::is_none")] - pub explicit_content_filter: Option, - #[serde(rename = "preferred_locale", skip_serializing_if = "Option::is_none")] - pub preferred_locale: Option, - #[serde(rename = "afk_timeout", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub afk_timeout: Option>, - #[serde(rename = "roles", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub roles: Option>>, - #[serde(rename = "channels", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub channels: Option>>, - #[serde(rename = "afk_channel_id", skip_serializing_if = "Option::is_none")] - pub afk_channel_id: Option, - #[serde(rename = "system_channel_id", skip_serializing_if = "Option::is_none")] - pub system_channel_id: Option, - #[serde(rename = "system_channel_flags", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub system_channel_flags: Option>, -} - -impl GuildCreateRequest { - pub fn new(name: String) -> GuildCreateRequest { - GuildCreateRequest { - description: None, - name, - region: None, - icon: None, - verification_level: None, - default_message_notifications: None, - explicit_content_filter: None, - preferred_locale: None, - afk_timeout: None, - roles: None, - channels: None, - afk_channel_id: None, - system_channel_id: None, - system_channel_flags: None, - } - } -} - diff --git a/src/models/guild_home_settings_response.rs b/src/models/guild_home_settings_response.rs index fbef721..84f2853 100644 --- a/src/models/guild_home_settings_response.rs +++ b/src/models/guild_home_settings_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,22 +50,22 @@ pub struct GuildHomeSettingsResponse { pub guild_id: String, #[serde(rename = "enabled")] pub enabled: bool, - #[serde(rename = "welcome_message", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub welcome_message: Option>>, - #[serde(rename = "new_member_actions", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub new_member_actions: Option>>, - #[serde(rename = "resource_channels", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub resource_channels: Option>>, + #[serde(rename = "welcome_message", skip_serializing_if = "Option::is_none")] + pub welcome_message: Option>, + #[serde(rename = "new_member_actions")] + pub new_member_actions: Vec, + #[serde(rename = "resource_channels")] + pub resource_channels: Vec, } impl GuildHomeSettingsResponse { - pub fn new(guild_id: String, enabled: bool) -> GuildHomeSettingsResponse { + pub fn new(guild_id: String, enabled: bool, new_member_actions: Vec, resource_channels: Vec) -> GuildHomeSettingsResponse { GuildHomeSettingsResponse { guild_id, enabled, welcome_message: None, - new_member_actions: None, - resource_channels: None, + new_member_actions, + resource_channels, } } } diff --git a/src/models/guild_incoming_webhook_response.rs b/src/models/guild_incoming_webhook_response.rs index 7408bcf..1fe3eca 100644 --- a/src/models/guild_incoming_webhook_response.rs +++ b/src/models/guild_incoming_webhook_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -60,12 +60,12 @@ pub struct GuildIncomingWebhookResponse { pub name: String, #[serde(rename = "type")] pub r#type: i32, - #[serde(rename = "user", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub user: Option>>, - #[serde(rename = "token", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub token: Option>, - #[serde(rename = "url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub url: Option>, + #[serde(rename = "user", skip_serializing_if = "Option::is_none")] + pub user: Option>, + #[serde(rename = "token", skip_serializing_if = "Option::is_none")] + pub token: Option, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, } impl GuildIncomingWebhookResponse { diff --git a/src/models/guild_invite_response.rs b/src/models/guild_invite_response.rs index acda43d..173e418 100644 --- a/src/models/guild_invite_response.rs +++ b/src/models/guild_invite_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -46,54 +46,54 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GuildInviteResponse { - #[serde(rename = "type", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub r#type: Option>, + #[serde(rename = "type", deserialize_with = "Option::deserialize")] + pub r#type: Option, #[serde(rename = "code")] pub code: String, - #[serde(rename = "inviter", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub inviter: Option>>, - #[serde(rename = "max_age", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub max_age: Option>, - #[serde(rename = "created_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub created_at: Option>, + #[serde(rename = "inviter", skip_serializing_if = "Option::is_none")] + pub inviter: Option>, + #[serde(rename = "max_age", skip_serializing_if = "Option::is_none")] + pub max_age: Option, + #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] + pub created_at: Option, #[serde(rename = "expires_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub expires_at: Option>, - #[serde(rename = "is_contact", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub is_contact: Option>, - #[serde(rename = "flags", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub flags: Option>, - #[serde(rename = "guild", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub guild: Option>>, - #[serde(rename = "guild_id", skip_serializing_if = "Option::is_none")] - pub guild_id: Option, - #[serde(rename = "channel", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub channel: Option>>, + #[serde(rename = "is_contact", skip_serializing_if = "Option::is_none")] + pub is_contact: Option, + #[serde(rename = "flags", skip_serializing_if = "Option::is_none")] + pub flags: Option, + #[serde(rename = "guild")] + pub guild: Box, + #[serde(rename = "guild_id")] + pub guild_id: String, + #[serde(rename = "channel")] + pub channel: Box, #[serde(rename = "target_type", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub target_type: Option>, - #[serde(rename = "target_user", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub target_user: Option>>, - #[serde(rename = "target_application", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub target_application: Option>>, - #[serde(rename = "guild_scheduled_event", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub guild_scheduled_event: Option>>, - #[serde(rename = "uses", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub uses: Option>, - #[serde(rename = "max_uses", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub max_uses: Option>, - #[serde(rename = "temporary", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub temporary: Option>, + #[serde(rename = "target_user", skip_serializing_if = "Option::is_none")] + pub target_user: Option>, + #[serde(rename = "target_application", skip_serializing_if = "Option::is_none")] + pub target_application: Option>, + #[serde(rename = "guild_scheduled_event", skip_serializing_if = "Option::is_none")] + pub guild_scheduled_event: Option>, + #[serde(rename = "uses", skip_serializing_if = "Option::is_none")] + pub uses: Option, + #[serde(rename = "max_uses", skip_serializing_if = "Option::is_none")] + pub max_uses: Option, + #[serde(rename = "temporary", skip_serializing_if = "Option::is_none")] + pub temporary: Option, #[serde(rename = "approximate_member_count", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub approximate_member_count: Option>, #[serde(rename = "approximate_presence_count", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub approximate_presence_count: Option>, - #[serde(rename = "is_nickname_changeable", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub is_nickname_changeable: Option>, + #[serde(rename = "is_nickname_changeable", skip_serializing_if = "Option::is_none")] + pub is_nickname_changeable: Option, } impl GuildInviteResponse { - pub fn new(code: String) -> GuildInviteResponse { + pub fn new(r#type: Option, code: String, guild: models::InviteGuildResponse, guild_id: String, channel: models::InviteChannelResponse) -> GuildInviteResponse { GuildInviteResponse { - r#type: None, + r#type, code, inviter: None, max_age: None, @@ -101,9 +101,9 @@ impl GuildInviteResponse { expires_at: None, is_contact: None, flags: None, - guild: None, - guild_id: None, - channel: None, + guild: Box::new(guild), + guild_id, + channel: Box::new(channel), target_type: None, target_user: None, target_application: None, diff --git a/src/models/guild_member_response.rs b/src/models/guild_member_response.rs index 8a3302e..3435670 100644 --- a/src/models/guild_member_response.rs +++ b/src/models/guild_member_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -66,6 +66,8 @@ pub struct GuildMemberResponse { pub premium_since: Option>, #[serde(rename = "roles")] pub roles: Vec, + #[serde(rename = "collectibles", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub collectibles: Option>>, #[serde(rename = "user")] pub user: Box, #[serde(rename = "mute")] @@ -87,6 +89,7 @@ impl GuildMemberResponse { pending, premium_since: None, roles, + collectibles: None, user: Box::new(user), mute, deaf, diff --git a/src/models/guild_mfa_level_response.rs b/src/models/guild_mfa_level_response.rs index 97c2edf..275b61e 100644 --- a/src/models/guild_mfa_level_response.rs +++ b/src/models/guild_mfa_level_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/set_guild_mfa_level_request.rs b/src/models/guild_mfa_request.rs similarity index 93% rename from src/models/set_guild_mfa_level_request.rs rename to src/models/guild_mfa_request.rs index 8d9e6ba..c592c7c 100644 --- a/src/models/set_guild_mfa_level_request.rs +++ b/src/models/guild_mfa_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -45,14 +45,14 @@ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct SetGuildMfaLevelRequest { +pub struct GuildMfaRequest { #[serde(rename = "level")] pub level: i32, } -impl SetGuildMfaLevelRequest { - pub fn new(level: i32) -> SetGuildMfaLevelRequest { - SetGuildMfaLevelRequest { +impl GuildMfaRequest { + pub fn new(level: i32) -> GuildMfaRequest { + GuildMfaRequest { level, } } diff --git a/src/models/guild_onboarding_response.rs b/src/models/guild_onboarding_response.rs index e7f1ac1..390d9ef 100644 --- a/src/models/guild_onboarding_response.rs +++ b/src/models/guild_onboarding_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/guild_patch_request_partial.rs b/src/models/guild_patch_request_partial.rs index f8fa629..e46fc9e 100644 --- a/src/models/guild_patch_request_partial.rs +++ b/src/models/guild_patch_request_partial.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/guild_preview_response.rs b/src/models/guild_preview_response.rs index a48122f..a9aee28 100644 --- a/src/models/guild_preview_response.rs +++ b/src/models/guild_preview_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/guild_product_purchase_response.rs b/src/models/guild_product_purchase_response.rs index 1a3dba6..c6fbc4c 100644 --- a/src/models/guild_product_purchase_response.rs +++ b/src/models/guild_product_purchase_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/guild_prune_response.rs b/src/models/guild_prune_response.rs index 2c83513..fc779e2 100644 --- a/src/models/guild_prune_response.rs +++ b/src/models/guild_prune_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/guild_response.rs b/src/models/guild_response.rs index 3e8e02d..3627f24 100644 --- a/src/models/guild_response.rs +++ b/src/models/guild_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -94,12 +94,12 @@ pub struct GuildResponse { pub explicit_content_filter: i32, #[serde(rename = "max_presences", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub max_presences: Option>, - #[serde(rename = "max_members", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub max_members: Option>, - #[serde(rename = "max_stage_video_channel_users", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub max_stage_video_channel_users: Option>, - #[serde(rename = "max_video_channel_users", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub max_video_channel_users: Option>, + #[serde(rename = "max_members")] + pub max_members: i32, + #[serde(rename = "max_stage_video_channel_users")] + pub max_stage_video_channel_users: i32, + #[serde(rename = "max_video_channel_users")] + pub max_video_channel_users: i32, #[serde(rename = "vanity_url_code", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub vanity_url_code: Option>, #[serde(rename = "premium_tier")] @@ -127,7 +127,7 @@ pub struct GuildResponse { } impl GuildResponse { - pub fn new(id: String, name: String, features: Vec, owner_id: String, region: String, afk_timeout: Option, system_channel_flags: i32, widget_enabled: bool, verification_level: i32, roles: Vec, default_message_notifications: i32, mfa_level: i32, explicit_content_filter: i32, premium_tier: i32, premium_subscription_count: i32, preferred_locale: String, premium_progress_bar_enabled: bool, nsfw: bool, nsfw_level: Option, emojis: Vec, stickers: Vec) -> GuildResponse { + pub fn new(id: String, name: String, features: Vec, owner_id: String, region: String, afk_timeout: Option, system_channel_flags: i32, widget_enabled: bool, verification_level: i32, roles: Vec, default_message_notifications: i32, mfa_level: i32, explicit_content_filter: i32, max_members: i32, max_stage_video_channel_users: i32, max_video_channel_users: i32, premium_tier: i32, premium_subscription_count: i32, preferred_locale: String, premium_progress_bar_enabled: bool, nsfw: bool, nsfw_level: Option, emojis: Vec, stickers: Vec) -> GuildResponse { GuildResponse { id, name, @@ -153,9 +153,9 @@ impl GuildResponse { mfa_level, explicit_content_filter, max_presences: None, - max_members: None, - max_stage_video_channel_users: None, - max_video_channel_users: None, + max_members, + max_stage_video_channel_users, + max_video_channel_users, vanity_url_code: None, premium_tier, premium_subscription_count, diff --git a/src/models/guild_role_colors_response.rs b/src/models/guild_role_colors_response.rs index 001b6e8..42e9d71 100644 --- a/src/models/guild_role_colors_response.rs +++ b/src/models/guild_role_colors_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -46,8 +46,8 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GuildRoleColorsResponse { - #[serde(rename = "primary_color", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub primary_color: Option>, + #[serde(rename = "primary_color")] + pub primary_color: i32, #[serde(rename = "secondary_color", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub secondary_color: Option>, #[serde(rename = "tertiary_color", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] @@ -55,9 +55,9 @@ pub struct GuildRoleColorsResponse { } impl GuildRoleColorsResponse { - pub fn new() -> GuildRoleColorsResponse { + pub fn new(primary_color: i32) -> GuildRoleColorsResponse { GuildRoleColorsResponse { - primary_color: None, + primary_color, secondary_color: None, tertiary_color: None, } diff --git a/src/models/guild_role_response.rs b/src/models/guild_role_response.rs index c8b4baf..c733a94 100644 --- a/src/models/guild_role_response.rs +++ b/src/models/guild_role_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -58,8 +58,8 @@ pub struct GuildRoleResponse { pub position: i32, #[serde(rename = "color")] pub color: i32, - #[serde(rename = "colors", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub colors: Option>>, + #[serde(rename = "colors")] + pub colors: Box, #[serde(rename = "hoist")] pub hoist: bool, #[serde(rename = "managed")] @@ -70,14 +70,14 @@ pub struct GuildRoleResponse { pub icon: Option>, #[serde(rename = "unicode_emoji", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub unicode_emoji: Option>, - #[serde(rename = "tags", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub tags: Option>>, + #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] + pub tags: Option>, #[serde(rename = "flags")] pub flags: i32, } impl GuildRoleResponse { - pub fn new(id: String, name: String, permissions: String, position: i32, color: i32, hoist: bool, managed: bool, mentionable: bool, flags: i32) -> GuildRoleResponse { + pub fn new(id: String, name: String, permissions: String, position: i32, color: i32, colors: models::GuildRoleColorsResponse, hoist: bool, managed: bool, mentionable: bool, flags: i32) -> GuildRoleResponse { GuildRoleResponse { id, name, @@ -85,7 +85,7 @@ impl GuildRoleResponse { permissions, position, color, - colors: None, + colors: Box::new(colors), hoist, managed, mentionable, diff --git a/src/models/guild_role_tags_response.rs b/src/models/guild_role_tags_response.rs index 23af72c..795d296 100644 --- a/src/models/guild_role_tags_response.rs +++ b/src/models/guild_role_tags_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/guild_sticker_response.rs b/src/models/guild_sticker_response.rs index aa54212..be0caff 100644 --- a/src/models/guild_sticker_response.rs +++ b/src/models/guild_sticker_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -62,8 +62,8 @@ pub struct GuildStickerResponse { pub available: bool, #[serde(rename = "guild_id")] pub guild_id: String, - #[serde(rename = "user", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub user: Option>>, + #[serde(rename = "user", skip_serializing_if = "Option::is_none")] + pub user: Option>, } impl GuildStickerResponse { diff --git a/src/models/guild_subscription_integration_response.rs b/src/models/guild_subscription_integration_response.rs index 9e6796b..0b420ce 100644 --- a/src/models/guild_subscription_integration_response.rs +++ b/src/models/guild_subscription_integration_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,21 +50,21 @@ pub struct GuildSubscriptionIntegrationResponse { pub r#type: Option, #[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub name: Option>, - #[serde(rename = "account", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub account: Option>>, - #[serde(rename = "enabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub enabled: Option>, + #[serde(rename = "account")] + pub account: Box, + #[serde(rename = "enabled")] + pub enabled: bool, #[serde(rename = "id")] pub id: String, } impl GuildSubscriptionIntegrationResponse { - pub fn new(r#type: Option, id: String) -> GuildSubscriptionIntegrationResponse { + pub fn new(r#type: Option, account: models::AccountResponse, enabled: bool, id: String) -> GuildSubscriptionIntegrationResponse { GuildSubscriptionIntegrationResponse { r#type, name: None, - account: None, - enabled: None, + account: Box::new(account), + enabled, id, } } diff --git a/src/models/guild_template_channel_response.rs b/src/models/guild_template_channel_response.rs index 873db0e..6d0c760 100644 --- a/src/models/guild_template_channel_response.rs +++ b/src/models/guild_template_channel_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/guild_template_channel_tags.rs b/src/models/guild_template_channel_tags.rs index dc75196..8a358c2 100644 --- a/src/models/guild_template_channel_tags.rs +++ b/src/models/guild_template_channel_tags.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -46,6 +46,8 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct GuildTemplateChannelTags { + #[serde(rename = "id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub id: Option>, #[serde(rename = "name")] pub name: String, #[serde(rename = "emoji_id", skip_serializing_if = "Option::is_none")] @@ -59,6 +61,7 @@ pub struct GuildTemplateChannelTags { impl GuildTemplateChannelTags { pub fn new(name: String) -> GuildTemplateChannelTags { GuildTemplateChannelTags { + id: None, name, emoji_id: None, emoji_name: None, diff --git a/src/models/guild_template_response.rs b/src/models/guild_template_response.rs index c7b6614..67b2b68 100644 --- a/src/models/guild_template_response.rs +++ b/src/models/guild_template_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/guild_template_role_response.rs b/src/models/guild_template_role_response.rs index fe1b0ff..2bf7342 100644 --- a/src/models/guild_template_role_response.rs +++ b/src/models/guild_template_role_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/guild_template_snapshot_response.rs b/src/models/guild_template_snapshot_response.rs index 3010360..2913ae4 100644 --- a/src/models/guild_template_snapshot_response.rs +++ b/src/models/guild_template_snapshot_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/guild_welcome_channel.rs b/src/models/guild_welcome_channel.rs index 0d3c273..248510f 100644 --- a/src/models/guild_welcome_channel.rs +++ b/src/models/guild_welcome_channel.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/guild_welcome_screen_channel_response.rs b/src/models/guild_welcome_screen_channel_response.rs index c03801f..476507d 100644 --- a/src/models/guild_welcome_screen_channel_response.rs +++ b/src/models/guild_welcome_screen_channel_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/guild_welcome_screen_response.rs b/src/models/guild_welcome_screen_response.rs index c46ff74..9645aa4 100644 --- a/src/models/guild_welcome_screen_response.rs +++ b/src/models/guild_welcome_screen_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/guild_with_counts_response.rs b/src/models/guild_with_counts_response.rs index df58fba..8b830c4 100644 --- a/src/models/guild_with_counts_response.rs +++ b/src/models/guild_with_counts_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -94,12 +94,12 @@ pub struct GuildWithCountsResponse { pub explicit_content_filter: i32, #[serde(rename = "max_presences", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub max_presences: Option>, - #[serde(rename = "max_members", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub max_members: Option>, - #[serde(rename = "max_stage_video_channel_users", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub max_stage_video_channel_users: Option>, - #[serde(rename = "max_video_channel_users", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub max_video_channel_users: Option>, + #[serde(rename = "max_members")] + pub max_members: i32, + #[serde(rename = "max_stage_video_channel_users")] + pub max_stage_video_channel_users: i32, + #[serde(rename = "max_video_channel_users")] + pub max_video_channel_users: i32, #[serde(rename = "vanity_url_code", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub vanity_url_code: Option>, #[serde(rename = "premium_tier")] @@ -131,7 +131,7 @@ pub struct GuildWithCountsResponse { } impl GuildWithCountsResponse { - pub fn new(id: String, name: String, features: Vec, owner_id: String, region: String, afk_timeout: Option, system_channel_flags: i32, widget_enabled: bool, verification_level: i32, roles: Vec, default_message_notifications: i32, mfa_level: i32, explicit_content_filter: i32, premium_tier: i32, premium_subscription_count: i32, preferred_locale: String, premium_progress_bar_enabled: bool, nsfw: bool, nsfw_level: Option, emojis: Vec, stickers: Vec) -> GuildWithCountsResponse { + pub fn new(id: String, name: String, features: Vec, owner_id: String, region: String, afk_timeout: Option, system_channel_flags: i32, widget_enabled: bool, verification_level: i32, roles: Vec, default_message_notifications: i32, mfa_level: i32, explicit_content_filter: i32, max_members: i32, max_stage_video_channel_users: i32, max_video_channel_users: i32, premium_tier: i32, premium_subscription_count: i32, preferred_locale: String, premium_progress_bar_enabled: bool, nsfw: bool, nsfw_level: Option, emojis: Vec, stickers: Vec) -> GuildWithCountsResponse { GuildWithCountsResponse { id, name, @@ -157,9 +157,9 @@ impl GuildWithCountsResponse { mfa_level, explicit_content_filter, max_presences: None, - max_members: None, - max_stage_video_channel_users: None, - max_video_channel_users: None, + max_members, + max_stage_video_channel_users, + max_video_channel_users, vanity_url_code: None, premium_tier, premium_subscription_count, diff --git a/src/models/incoming_webhook_interaction_request.rs b/src/models/incoming_webhook_interaction_request.rs index 10cf158..1835477 100644 --- a/src/models/incoming_webhook_interaction_request.rs +++ b/src/models/incoming_webhook_interaction_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/incoming_webhook_request_partial.rs b/src/models/incoming_webhook_request_partial.rs index ffc30d9..aa1e641 100644 --- a/src/models/incoming_webhook_request_partial.rs +++ b/src/models/incoming_webhook_request_partial.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/incoming_webhook_update_for_interaction_callback_request_partial.rs b/src/models/incoming_webhook_update_for_interaction_callback_request_partial.rs index 9ef9066..54c21fa 100644 --- a/src/models/incoming_webhook_update_for_interaction_callback_request_partial.rs +++ b/src/models/incoming_webhook_update_for_interaction_callback_request_partial.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/incoming_webhook_update_request_partial.rs b/src/models/incoming_webhook_update_request_partial.rs index c25ee63..98be483 100644 --- a/src/models/incoming_webhook_update_request_partial.rs +++ b/src/models/incoming_webhook_update_request_partial.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/inner_errors.rs b/src/models/inner_errors.rs index ca5883c..baa816c 100644 --- a/src/models/inner_errors.rs +++ b/src/models/inner_errors.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/integration_application_response.rs b/src/models/integration_application_response.rs index 1ff8873..46d2695 100644 --- a/src/models/integration_application_response.rs +++ b/src/models/integration_application_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -56,12 +56,12 @@ pub struct IntegrationApplicationResponse { pub description: String, #[serde(rename = "type", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub r#type: Option>, - #[serde(rename = "cover_image", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub cover_image: Option>, + #[serde(rename = "cover_image", skip_serializing_if = "Option::is_none")] + pub cover_image: Option, #[serde(rename = "primary_sku_id", skip_serializing_if = "Option::is_none")] pub primary_sku_id: Option, - #[serde(rename = "bot", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub bot: Option>>, + #[serde(rename = "bot", skip_serializing_if = "Option::is_none")] + pub bot: Option>, } impl IntegrationApplicationResponse { diff --git a/src/models/interaction_application_command_autocomplete_callback_integer_data.rs b/src/models/interaction_application_command_autocomplete_callback_integer_data.rs index 6c1d0d4..d076f3e 100644 --- a/src/models/interaction_application_command_autocomplete_callback_integer_data.rs +++ b/src/models/interaction_application_command_autocomplete_callback_integer_data.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/interaction_application_command_autocomplete_callback_number_data.rs b/src/models/interaction_application_command_autocomplete_callback_number_data.rs index c5064c2..6e5cd15 100644 --- a/src/models/interaction_application_command_autocomplete_callback_number_data.rs +++ b/src/models/interaction_application_command_autocomplete_callback_number_data.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/interaction_application_command_autocomplete_callback_string_data.rs b/src/models/interaction_application_command_autocomplete_callback_string_data.rs index 7a1d857..9193377 100644 --- a/src/models/interaction_application_command_autocomplete_callback_string_data.rs +++ b/src/models/interaction_application_command_autocomplete_callback_string_data.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/interaction_callback_response.rs b/src/models/interaction_callback_response.rs index f93dfd8..d776edc 100644 --- a/src/models/interaction_callback_response.rs +++ b/src/models/interaction_callback_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -48,8 +48,8 @@ use serde::{Deserialize, Serialize}; pub struct InteractionCallbackResponse { #[serde(rename = "interaction")] pub interaction: Box, - #[serde(rename = "resource", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub resource: Option>>, + #[serde(rename = "resource", skip_serializing_if = "Option::is_none")] + pub resource: Option>, } impl InteractionCallbackResponse { diff --git a/src/models/interaction_callback_response_resource.rs b/src/models/interaction_callback_response_resource.rs index 9d197a9..1d85590 100644 --- a/src/models/interaction_callback_response_resource.rs +++ b/src/models/interaction_callback_response_resource.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/interaction_response.rs b/src/models/interaction_response.rs index 1c0902c..f80a92c 100644 --- a/src/models/interaction_response.rs +++ b/src/models/interaction_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -52,10 +52,10 @@ pub struct InteractionResponse { pub r#type: i32, #[serde(rename = "response_message_id", skip_serializing_if = "Option::is_none")] pub response_message_id: Option, - #[serde(rename = "response_message_loading", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub response_message_loading: Option>, - #[serde(rename = "response_message_ephemeral", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub response_message_ephemeral: Option>, + #[serde(rename = "response_message_loading", skip_serializing_if = "Option::is_none")] + pub response_message_loading: Option, + #[serde(rename = "response_message_ephemeral", skip_serializing_if = "Option::is_none")] + pub response_message_ephemeral: Option, #[serde(rename = "channel_id", skip_serializing_if = "Option::is_none")] pub channel_id: Option, #[serde(rename = "guild_id", skip_serializing_if = "Option::is_none")] diff --git a/src/models/invite_application_response.rs b/src/models/invite_application_response.rs index d74253c..0e52eca 100644 --- a/src/models/invite_application_response.rs +++ b/src/models/invite_application_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -56,30 +56,30 @@ pub struct InviteApplicationResponse { pub description: String, #[serde(rename = "type", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub r#type: Option>, - #[serde(rename = "cover_image", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub cover_image: Option>, + #[serde(rename = "cover_image", skip_serializing_if = "Option::is_none")] + pub cover_image: Option, #[serde(rename = "primary_sku_id", skip_serializing_if = "Option::is_none")] pub primary_sku_id: Option, - #[serde(rename = "bot", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub bot: Option>>, - #[serde(rename = "slug", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub slug: Option>, + #[serde(rename = "bot", skip_serializing_if = "Option::is_none")] + pub bot: Option>, + #[serde(rename = "slug", skip_serializing_if = "Option::is_none")] + pub slug: Option, #[serde(rename = "guild_id", skip_serializing_if = "Option::is_none")] pub guild_id: Option, - #[serde(rename = "rpc_origins", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub rpc_origins: Option>>, - #[serde(rename = "bot_public", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub bot_public: Option>, - #[serde(rename = "bot_require_code_grant", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub bot_require_code_grant: Option>, - #[serde(rename = "terms_of_service_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub terms_of_service_url: Option>, - #[serde(rename = "privacy_policy_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub privacy_policy_url: Option>, - #[serde(rename = "custom_install_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub custom_install_url: Option>, - #[serde(rename = "install_params", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub install_params: Option>>, + #[serde(rename = "rpc_origins", skip_serializing_if = "Option::is_none")] + pub rpc_origins: Option>, + #[serde(rename = "bot_public", skip_serializing_if = "Option::is_none")] + pub bot_public: Option, + #[serde(rename = "bot_require_code_grant", skip_serializing_if = "Option::is_none")] + pub bot_require_code_grant: Option, + #[serde(rename = "terms_of_service_url", skip_serializing_if = "Option::is_none")] + pub terms_of_service_url: Option, + #[serde(rename = "privacy_policy_url", skip_serializing_if = "Option::is_none")] + pub privacy_policy_url: Option, + #[serde(rename = "custom_install_url", skip_serializing_if = "Option::is_none")] + pub custom_install_url: Option, + #[serde(rename = "install_params", skip_serializing_if = "Option::is_none")] + pub install_params: Option>, #[serde(rename = "integration_types_config", skip_serializing_if = "Option::is_none")] pub integration_types_config: Option>, #[serde(rename = "verify_key")] @@ -88,8 +88,8 @@ pub struct InviteApplicationResponse { pub flags: i32, #[serde(rename = "max_participants", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub max_participants: Option>, - #[serde(rename = "tags", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub tags: Option>>, + #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] + pub tags: Option>, } impl InviteApplicationResponse { diff --git a/src/models/invite_channel_recipient_response.rs b/src/models/invite_channel_recipient_response.rs index a0f5256..0af705d 100644 --- a/src/models/invite_channel_recipient_response.rs +++ b/src/models/invite_channel_recipient_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/invite_channel_response.rs b/src/models/invite_channel_response.rs index 6da991c..1b36592 100644 --- a/src/models/invite_channel_response.rs +++ b/src/models/invite_channel_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -52,10 +52,10 @@ pub struct InviteChannelResponse { pub r#type: i32, #[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub name: Option>, - #[serde(rename = "icon", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub icon: Option>, - #[serde(rename = "recipients", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub recipients: Option>>, + #[serde(rename = "icon", skip_serializing_if = "Option::is_none")] + pub icon: Option, + #[serde(rename = "recipients", skip_serializing_if = "Option::is_none")] + pub recipients: Option>, } impl InviteChannelResponse { diff --git a/src/models/invite_guild_response.rs b/src/models/invite_guild_response.rs index c923118..fbca93f 100644 --- a/src/models/invite_guild_response.rs +++ b/src/models/invite_guild_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -68,12 +68,12 @@ pub struct InviteGuildResponse { pub nsfw_level: Option>, #[serde(rename = "nsfw", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub nsfw: Option>, - #[serde(rename = "premium_subscription_count", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub premium_subscription_count: Option>, + #[serde(rename = "premium_subscription_count")] + pub premium_subscription_count: i32, } impl InviteGuildResponse { - pub fn new(id: String, name: String, features: Vec) -> InviteGuildResponse { + pub fn new(id: String, name: String, features: Vec, premium_subscription_count: i32) -> InviteGuildResponse { InviteGuildResponse { id, name, @@ -86,7 +86,7 @@ impl InviteGuildResponse { vanity_url_code: None, nsfw_level: None, nsfw: None, - premium_subscription_count: None, + premium_subscription_count, } } } diff --git a/src/models/keyword_rule_response.rs b/src/models/keyword_rule_response.rs index ba9b06f..d557f4a 100644 --- a/src/models/keyword_rule_response.rs +++ b/src/models/keyword_rule_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -60,18 +60,18 @@ pub struct KeywordRuleResponse { pub actions: Vec, #[serde(rename = "trigger_type")] pub trigger_type: i32, - #[serde(rename = "enabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub enabled: Option>, - #[serde(rename = "exempt_roles", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub exempt_roles: Option>>, - #[serde(rename = "exempt_channels", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub exempt_channels: Option>>, + #[serde(rename = "enabled")] + pub enabled: bool, + #[serde(rename = "exempt_roles")] + pub exempt_roles: Vec, + #[serde(rename = "exempt_channels")] + pub exempt_channels: Vec, #[serde(rename = "trigger_metadata")] pub trigger_metadata: Box, } impl KeywordRuleResponse { - pub fn new(id: String, guild_id: String, creator_id: String, name: String, event_type: i32, actions: Vec, trigger_type: i32, trigger_metadata: models::KeywordTriggerMetadataResponse) -> KeywordRuleResponse { + pub fn new(id: String, guild_id: String, creator_id: String, name: String, event_type: i32, actions: Vec, trigger_type: i32, enabled: bool, exempt_roles: Vec, exempt_channels: Vec, trigger_metadata: models::KeywordTriggerMetadataResponse) -> KeywordRuleResponse { KeywordRuleResponse { id, guild_id, @@ -80,9 +80,9 @@ impl KeywordRuleResponse { event_type, actions, trigger_type, - enabled: None, - exempt_roles: None, - exempt_channels: None, + enabled, + exempt_roles, + exempt_channels, trigger_metadata: Box::new(trigger_metadata), } } diff --git a/src/models/keyword_trigger_metadata.rs b/src/models/keyword_trigger_metadata.rs index 224beea..aea66b0 100644 --- a/src/models/keyword_trigger_metadata.rs +++ b/src/models/keyword_trigger_metadata.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/keyword_trigger_metadata_response.rs b/src/models/keyword_trigger_metadata_response.rs index 5b7f0d8..7356458 100644 --- a/src/models/keyword_trigger_metadata_response.rs +++ b/src/models/keyword_trigger_metadata_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/keyword_upsert_request.rs b/src/models/keyword_upsert_request.rs index 4ff571e..f9dc2d2 100644 --- a/src/models/keyword_upsert_request.rs +++ b/src/models/keyword_upsert_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/keyword_upsert_request_partial.rs b/src/models/keyword_upsert_request_partial.rs index aa5b7db..1c95938 100644 --- a/src/models/keyword_upsert_request_partial.rs +++ b/src/models/keyword_upsert_request_partial.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/label_component_for_modal_request.rs b/src/models/label_component_for_modal_request.rs new file mode 100644 index 0000000..5456d81 --- /dev/null +++ b/src/models/label_component_for_modal_request.rs @@ -0,0 +1,72 @@ +//! # Discord HTTP API (Preview) - REST API Client +//! +//! Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. +//! +//! ## Metadata +//! +//! - **Copyright**: Copyright (c) 2025 Qntx +//! - **Author**: ΣX +//! - **Version**: 10 +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] +//! - **Generator Version**: 7.14.0 +//! +//!
+//! ⚠️ Important Disclaimer & Limitation of Liability +//!
+//! > **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +//! > to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +//! > and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +//! > of this software or its outputs. +//! > +//! > This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +//! > Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +//! > financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +//! > legal professionals before making decisions based on this software's outputs. +//! > +//! > Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +//! > other financial activities may result in substantial losses, including total loss of capital. The Developers are not +//! > liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +//! > outputs and ensuring their suitability for intended purposes. +//! > +//! > This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +//! > the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +//! > comply with third-party terms and conditions. +//! > +//! > Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +//! > their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +//! > Developers disclaim liability for any legal consequences arising from non-compliance. +//! > +//! > To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +//! > consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +//! > loss of profits, data, or business opportunities. +//! +//!
+use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct LabelComponentForModalRequest { + #[serde(rename = "type")] + pub r#type: i32, + #[serde(rename = "id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub id: Option>, + #[serde(rename = "label")] + pub label: String, + #[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub description: Option>, + #[serde(rename = "component")] + pub component: Box, +} + +impl LabelComponentForModalRequest { + pub fn new(r#type: i32, label: String, component: models::LabelComponentForModalRequestComponent) -> LabelComponentForModalRequest { + LabelComponentForModalRequest { + r#type, + id: None, + label, + description: None, + component: Box::new(component), + } + } +} + diff --git a/src/models/label_component_for_modal_request_component.rs b/src/models/label_component_for_modal_request_component.rs new file mode 100644 index 0000000..1b66033 --- /dev/null +++ b/src/models/label_component_for_modal_request_component.rs @@ -0,0 +1,63 @@ +//! # Discord HTTP API (Preview) - REST API Client +//! +//! Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. +//! +//! ## Metadata +//! +//! - **Copyright**: Copyright (c) 2025 Qntx +//! - **Author**: ΣX +//! - **Version**: 10 +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] +//! - **Generator Version**: 7.14.0 +//! +//!
+//! ⚠️ Important Disclaimer & Limitation of Liability +//!
+//! > **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +//! > to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +//! > and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +//! > of this software or its outputs. +//! > +//! > This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +//! > Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +//! > financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +//! > legal professionals before making decisions based on this software's outputs. +//! > +//! > Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +//! > other financial activities may result in substantial losses, including total loss of capital. The Developers are not +//! > liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +//! > outputs and ensuring their suitability for intended purposes. +//! > +//! > This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +//! > the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +//! > comply with third-party terms and conditions. +//! > +//! > Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +//! > their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +//! > Developers disclaim liability for any legal consequences arising from non-compliance. +//! > +//! > To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +//! > consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +//! > loss of profits, data, or business opportunities. +//! +//!
+use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum LabelComponentForModalRequestComponent { + ChannelSelectComponentForModalRequest(Box), + MentionableSelectComponentForModalRequest(Box), + RoleSelectComponentForModalRequest(Box), + StringSelectComponentForModalRequest(Box), + TextInputComponentForModalRequest(Box), + UserSelectComponentForModalRequest(Box), +} + +impl Default for LabelComponentForModalRequestComponent { + fn default() -> Self { + Self::ChannelSelectComponentForModalRequest(Default::default()) + } +} + diff --git a/src/models/launch_activity_interaction_callback_request.rs b/src/models/launch_activity_interaction_callback_request.rs index 20e5804..faf6c19 100644 --- a/src/models/launch_activity_interaction_callback_request.rs +++ b/src/models/launch_activity_interaction_callback_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/launch_activity_interaction_callback_response.rs b/src/models/launch_activity_interaction_callback_response.rs index 169426b..f6723f6 100644 --- a/src/models/launch_activity_interaction_callback_response.rs +++ b/src/models/launch_activity_interaction_callback_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/list_application_emojis_response.rs b/src/models/list_application_emojis_response.rs index d204841..0f6b386 100644 --- a/src/models/list_application_emojis_response.rs +++ b/src/models/list_application_emojis_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/list_auto_moderation_rules_200_response_inner.rs b/src/models/list_auto_moderation_rules_200_response_inner.rs index 5769546..29f63b2 100644 --- a/src/models/list_auto_moderation_rules_200_response_inner.rs +++ b/src/models/list_auto_moderation_rules_200_response_inner.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/list_channel_invites_200_response_inner.rs b/src/models/list_channel_invites_200_response_inner.rs index bde9bc4..31eed51 100644 --- a/src/models/list_channel_invites_200_response_inner.rs +++ b/src/models/list_channel_invites_200_response_inner.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -44,80 +44,17 @@ use crate::models; use serde::{Deserialize, Serialize}; -#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct ListChannelInvites200ResponseInner { - #[serde(rename = "type", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub r#type: Option>, - #[serde(rename = "code")] - pub code: String, - #[serde(rename = "inviter", skip_serializing_if = "Option::is_none")] - pub inviter: Option>, - #[serde(rename = "max_age", skip_serializing_if = "Option::is_none")] - pub max_age: Option, - #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")] - pub created_at: Option, - #[serde(rename = "expires_at", skip_serializing_if = "Option::is_none")] - pub expires_at: Option, - #[serde(rename = "friends_count", skip_serializing_if = "Option::is_none")] - pub friends_count: Option, - #[serde(rename = "channel", skip_serializing_if = "Option::is_none")] - pub channel: Option>, - #[serde(rename = "is_contact", skip_serializing_if = "Option::is_none")] - pub is_contact: Option, - #[serde(rename = "uses", skip_serializing_if = "Option::is_none")] - pub uses: Option, - #[serde(rename = "max_uses", skip_serializing_if = "Option::is_none")] - pub max_uses: Option, - #[serde(rename = "flags", skip_serializing_if = "Option::is_none")] - pub flags: Option, - #[serde(rename = "approximate_member_count", skip_serializing_if = "Option::is_none")] - pub approximate_member_count: Option, - #[serde(rename = "guild", skip_serializing_if = "Option::is_none")] - pub guild: Option>, - #[serde(rename = "guild_id", skip_serializing_if = "Option::is_none")] - pub guild_id: Option, - #[serde(rename = "target_type", skip_serializing_if = "Option::is_none")] - pub target_type: Option, - #[serde(rename = "target_user", skip_serializing_if = "Option::is_none")] - pub target_user: Option>, - #[serde(rename = "target_application", skip_serializing_if = "Option::is_none")] - pub target_application: Option>, - #[serde(rename = "guild_scheduled_event", skip_serializing_if = "Option::is_none")] - pub guild_scheduled_event: Option>, - #[serde(rename = "temporary", skip_serializing_if = "Option::is_none")] - pub temporary: Option, - #[serde(rename = "approximate_presence_count", skip_serializing_if = "Option::is_none")] - pub approximate_presence_count: Option, - #[serde(rename = "is_nickname_changeable", skip_serializing_if = "Option::is_none")] - pub is_nickname_changeable: Option, +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListChannelInvites200ResponseInner { + FriendInviteResponse(Box), + GroupDmInviteResponse(Box), + GuildInviteResponse(Box), } -impl ListChannelInvites200ResponseInner { - pub fn new(code: String) -> ListChannelInvites200ResponseInner { - ListChannelInvites200ResponseInner { - r#type: None, - code, - inviter: None, - max_age: None, - created_at: None, - expires_at: None, - friends_count: None, - channel: None, - is_contact: None, - uses: None, - max_uses: None, - flags: None, - approximate_member_count: None, - guild: None, - guild_id: None, - target_type: None, - target_user: None, - target_application: None, - guild_scheduled_event: None, - temporary: None, - approximate_presence_count: None, - is_nickname_changeable: None, - } +impl Default for ListChannelInvites200ResponseInner { + fn default() -> Self { + Self::FriendInviteResponse(Default::default()) } } diff --git a/src/models/list_channel_webhooks_200_response_inner.rs b/src/models/list_channel_webhooks_200_response_inner.rs index b7bac66..1cf6efb 100644 --- a/src/models/list_channel_webhooks_200_response_inner.rs +++ b/src/models/list_channel_webhooks_200_response_inner.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/list_guild_integrations_200_response_inner.rs b/src/models/list_guild_integrations_200_response_inner.rs index fa161e6..8a39797 100644 --- a/src/models/list_guild_integrations_200_response_inner.rs +++ b/src/models/list_guild_integrations_200_response_inner.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/list_guild_scheduled_events_200_response_inner.rs b/src/models/list_guild_scheduled_events_200_response_inner.rs index 3faca50..cea00b1 100644 --- a/src/models/list_guild_scheduled_events_200_response_inner.rs +++ b/src/models/list_guild_scheduled_events_200_response_inner.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/list_guild_soundboard_sounds_response.rs b/src/models/list_guild_soundboard_sounds_response.rs index 31a398b..ac0cf84 100644 --- a/src/models/list_guild_soundboard_sounds_response.rs +++ b/src/models/list_guild_soundboard_sounds_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/create_guild_from_template_request.rs b/src/models/lobby_guild_invite_response.rs similarity index 85% rename from src/models/create_guild_from_template_request.rs rename to src/models/lobby_guild_invite_response.rs index b8b8b9e..5c25cd9 100644 --- a/src/models/create_guild_from_template_request.rs +++ b/src/models/lobby_guild_invite_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -45,18 +45,15 @@ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateGuildFromTemplateRequest { - #[serde(rename = "name")] - pub name: String, - #[serde(rename = "icon", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub icon: Option>, +pub struct LobbyGuildInviteResponse { + #[serde(rename = "code")] + pub code: String, } -impl CreateGuildFromTemplateRequest { - pub fn new(name: String) -> CreateGuildFromTemplateRequest { - CreateGuildFromTemplateRequest { - name, - icon: None, +impl LobbyGuildInviteResponse { + pub fn new(code: String) -> LobbyGuildInviteResponse { + LobbyGuildInviteResponse { + code, } } } diff --git a/src/models/lobby_member_request.rs b/src/models/lobby_member_request.rs index d20c3e4..cf472f9 100644 --- a/src/models/lobby_member_request.rs +++ b/src/models/lobby_member_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/lobby_member_response.rs b/src/models/lobby_member_response.rs index 25195f2..49ac82e 100644 --- a/src/models/lobby_member_response.rs +++ b/src/models/lobby_member_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/lobby_message_response.rs b/src/models/lobby_message_response.rs index 8ee1737..50cb8d6 100644 --- a/src/models/lobby_message_response.rs +++ b/src/models/lobby_message_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/lobby_response.rs b/src/models/lobby_response.rs index aa635eb..120ef58 100644 --- a/src/models/lobby_response.rs +++ b/src/models/lobby_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -52,20 +52,23 @@ pub struct LobbyResponse { pub application_id: String, #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")] pub metadata: Option>, - #[serde(rename = "members", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub members: Option>>, - #[serde(rename = "linked_channel", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub linked_channel: Option>>, + #[serde(rename = "members")] + pub members: Vec, + #[serde(rename = "linked_channel", skip_serializing_if = "Option::is_none")] + pub linked_channel: Option>, + #[serde(rename = "flags")] + pub flags: i64, } impl LobbyResponse { - pub fn new(id: String, application_id: String) -> LobbyResponse { + pub fn new(id: String, application_id: String, members: Vec, flags: i64) -> LobbyResponse { LobbyResponse { id, application_id, metadata: None, - members: None, + members, linked_channel: None, + flags, } } } diff --git a/src/models/media_gallery_component_for_message_request.rs b/src/models/media_gallery_component_for_message_request.rs index a5f1e4c..a72281a 100644 --- a/src/models/media_gallery_component_for_message_request.rs +++ b/src/models/media_gallery_component_for_message_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -48,6 +48,8 @@ use serde::{Deserialize, Serialize}; pub struct MediaGalleryComponentForMessageRequest { #[serde(rename = "type")] pub r#type: i32, + #[serde(rename = "id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub id: Option>, #[serde(rename = "items")] pub items: Vec, } @@ -56,6 +58,7 @@ impl MediaGalleryComponentForMessageRequest { pub fn new(r#type: i32, items: Vec) -> MediaGalleryComponentForMessageRequest { MediaGalleryComponentForMessageRequest { r#type, + id: None, items, } } diff --git a/src/models/media_gallery_component_response.rs b/src/models/media_gallery_component_response.rs index 1414322..f81c11d 100644 --- a/src/models/media_gallery_component_response.rs +++ b/src/models/media_gallery_component_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/media_gallery_item_request.rs b/src/models/media_gallery_item_request.rs index 55296a4..2b9fe1f 100644 --- a/src/models/media_gallery_item_request.rs +++ b/src/models/media_gallery_item_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/media_gallery_item_response.rs b/src/models/media_gallery_item_response.rs index 04b8e18..271d22c 100644 --- a/src/models/media_gallery_item_response.rs +++ b/src/models/media_gallery_item_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/mention_spam_rule_response.rs b/src/models/mention_spam_rule_response.rs index a64e08d..b099337 100644 --- a/src/models/mention_spam_rule_response.rs +++ b/src/models/mention_spam_rule_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -60,18 +60,18 @@ pub struct MentionSpamRuleResponse { pub actions: Vec, #[serde(rename = "trigger_type")] pub trigger_type: i32, - #[serde(rename = "enabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub enabled: Option>, - #[serde(rename = "exempt_roles", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub exempt_roles: Option>>, - #[serde(rename = "exempt_channels", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub exempt_channels: Option>>, + #[serde(rename = "enabled")] + pub enabled: bool, + #[serde(rename = "exempt_roles")] + pub exempt_roles: Vec, + #[serde(rename = "exempt_channels")] + pub exempt_channels: Vec, #[serde(rename = "trigger_metadata")] pub trigger_metadata: Box, } impl MentionSpamRuleResponse { - pub fn new(id: String, guild_id: String, creator_id: String, name: String, event_type: i32, actions: Vec, trigger_type: i32, trigger_metadata: models::MentionSpamTriggerMetadataResponse) -> MentionSpamRuleResponse { + pub fn new(id: String, guild_id: String, creator_id: String, name: String, event_type: i32, actions: Vec, trigger_type: i32, enabled: bool, exempt_roles: Vec, exempt_channels: Vec, trigger_metadata: models::MentionSpamTriggerMetadataResponse) -> MentionSpamRuleResponse { MentionSpamRuleResponse { id, guild_id, @@ -80,9 +80,9 @@ impl MentionSpamRuleResponse { event_type, actions, trigger_type, - enabled: None, - exempt_roles: None, - exempt_channels: None, + enabled, + exempt_roles, + exempt_channels, trigger_metadata: Box::new(trigger_metadata), } } diff --git a/src/models/mention_spam_trigger_metadata.rs b/src/models/mention_spam_trigger_metadata.rs index 518b350..028c708 100644 --- a/src/models/mention_spam_trigger_metadata.rs +++ b/src/models/mention_spam_trigger_metadata.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -46,16 +46,16 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MentionSpamTriggerMetadata { - #[serde(rename = "mention_total_limit")] - pub mention_total_limit: i32, + #[serde(rename = "mention_total_limit", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub mention_total_limit: Option>, #[serde(rename = "mention_raid_protection_enabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub mention_raid_protection_enabled: Option>, } impl MentionSpamTriggerMetadata { - pub fn new(mention_total_limit: i32) -> MentionSpamTriggerMetadata { + pub fn new() -> MentionSpamTriggerMetadata { MentionSpamTriggerMetadata { - mention_total_limit, + mention_total_limit: None, mention_raid_protection_enabled: None, } } diff --git a/src/models/mention_spam_trigger_metadata_response.rs b/src/models/mention_spam_trigger_metadata_response.rs index a4d6110..e954d85 100644 --- a/src/models/mention_spam_trigger_metadata_response.rs +++ b/src/models/mention_spam_trigger_metadata_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -48,15 +48,15 @@ use serde::{Deserialize, Serialize}; pub struct MentionSpamTriggerMetadataResponse { #[serde(rename = "mention_total_limit")] pub mention_total_limit: i32, - #[serde(rename = "mention_raid_protection_enabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub mention_raid_protection_enabled: Option>, + #[serde(rename = "mention_raid_protection_enabled")] + pub mention_raid_protection_enabled: bool, } impl MentionSpamTriggerMetadataResponse { - pub fn new(mention_total_limit: i32) -> MentionSpamTriggerMetadataResponse { + pub fn new(mention_total_limit: i32, mention_raid_protection_enabled: bool) -> MentionSpamTriggerMetadataResponse { MentionSpamTriggerMetadataResponse { mention_total_limit, - mention_raid_protection_enabled: None, + mention_raid_protection_enabled, } } } diff --git a/src/models/mention_spam_upsert_request.rs b/src/models/mention_spam_upsert_request.rs index 873fb9c..8c6d519 100644 --- a/src/models/mention_spam_upsert_request.rs +++ b/src/models/mention_spam_upsert_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/mention_spam_upsert_request_partial.rs b/src/models/mention_spam_upsert_request_partial.rs index 0face1b..a73a4fb 100644 --- a/src/models/mention_spam_upsert_request_partial.rs +++ b/src/models/mention_spam_upsert_request_partial.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/mentionable_select_component_for_message_request.rs b/src/models/mentionable_select_component_for_message_request.rs index 231f35b..7631b2c 100644 --- a/src/models/mentionable_select_component_for_message_request.rs +++ b/src/models/mentionable_select_component_for_message_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -48,6 +48,8 @@ use serde::{Deserialize, Serialize}; pub struct MentionableSelectComponentForMessageRequest { #[serde(rename = "type")] pub r#type: i32, + #[serde(rename = "id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub id: Option>, #[serde(rename = "custom_id")] pub custom_id: String, #[serde(rename = "placeholder", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] @@ -58,6 +60,8 @@ pub struct MentionableSelectComponentForMessageRequest { pub max_values: Option>, #[serde(rename = "disabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub disabled: Option>, + #[serde(rename = "required", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub required: Option>, #[serde(rename = "default_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub default_values: Option>>, } @@ -66,11 +70,13 @@ impl MentionableSelectComponentForMessageRequest { pub fn new(r#type: i32, custom_id: String) -> MentionableSelectComponentForMessageRequest { MentionableSelectComponentForMessageRequest { r#type, + id: None, custom_id, placeholder: None, min_values: None, max_values: None, disabled: None, + required: None, default_values: None, } } diff --git a/src/models/mentionable_select_component_for_message_request_default_values_inner.rs b/src/models/mentionable_select_component_for_message_request_default_values_inner.rs index b2bd596..577b1bd 100644 --- a/src/models/mentionable_select_component_for_message_request_default_values_inner.rs +++ b/src/models/mentionable_select_component_for_message_request_default_values_inner.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/mentionable_select_component_for_modal_request.rs b/src/models/mentionable_select_component_for_modal_request.rs new file mode 100644 index 0000000..3e65854 --- /dev/null +++ b/src/models/mentionable_select_component_for_modal_request.rs @@ -0,0 +1,84 @@ +//! # Discord HTTP API (Preview) - REST API Client +//! +//! Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. +//! +//! ## Metadata +//! +//! - **Copyright**: Copyright (c) 2025 Qntx +//! - **Author**: ΣX +//! - **Version**: 10 +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] +//! - **Generator Version**: 7.14.0 +//! +//!
+//! ⚠️ Important Disclaimer & Limitation of Liability +//!
+//! > **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +//! > to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +//! > and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +//! > of this software or its outputs. +//! > +//! > This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +//! > Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +//! > financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +//! > legal professionals before making decisions based on this software's outputs. +//! > +//! > Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +//! > other financial activities may result in substantial losses, including total loss of capital. The Developers are not +//! > liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +//! > outputs and ensuring their suitability for intended purposes. +//! > +//! > This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +//! > the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +//! > comply with third-party terms and conditions. +//! > +//! > Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +//! > their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +//! > Developers disclaim liability for any legal consequences arising from non-compliance. +//! > +//! > To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +//! > consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +//! > loss of profits, data, or business opportunities. +//! +//!
+use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct MentionableSelectComponentForModalRequest { + #[serde(rename = "type")] + pub r#type: i32, + #[serde(rename = "id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub id: Option>, + #[serde(rename = "custom_id")] + pub custom_id: String, + #[serde(rename = "placeholder", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub placeholder: Option>, + #[serde(rename = "min_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub min_values: Option>, + #[serde(rename = "max_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub max_values: Option>, + #[serde(rename = "disabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub disabled: Option>, + #[serde(rename = "required", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub required: Option>, + #[serde(rename = "default_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub default_values: Option>>, +} + +impl MentionableSelectComponentForModalRequest { + pub fn new(r#type: i32, custom_id: String) -> MentionableSelectComponentForModalRequest { + MentionableSelectComponentForModalRequest { + r#type, + id: None, + custom_id, + placeholder: None, + min_values: None, + max_values: None, + disabled: None, + required: None, + default_values: None, + } + } +} + diff --git a/src/models/mentionable_select_component_response.rs b/src/models/mentionable_select_component_response.rs index 4c97ff4..13d22b2 100644 --- a/src/models/mentionable_select_component_response.rs +++ b/src/models/mentionable_select_component_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -52,16 +52,16 @@ pub struct MentionableSelectComponentResponse { pub id: i32, #[serde(rename = "custom_id")] pub custom_id: String, - #[serde(rename = "placeholder", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub placeholder: Option>, + #[serde(rename = "placeholder", skip_serializing_if = "Option::is_none")] + pub placeholder: Option, #[serde(rename = "min_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub min_values: Option>, #[serde(rename = "max_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub max_values: Option>, - #[serde(rename = "disabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub disabled: Option>, - #[serde(rename = "default_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub default_values: Option>>, + #[serde(rename = "disabled", skip_serializing_if = "Option::is_none")] + pub disabled: Option, + #[serde(rename = "default_values", skip_serializing_if = "Option::is_none")] + pub default_values: Option>, } impl MentionableSelectComponentResponse { diff --git a/src/models/mentionable_select_component_response_default_values_inner.rs b/src/models/mentionable_select_component_response_default_values_inner.rs index 2d27507..e348137 100644 --- a/src/models/mentionable_select_component_response_default_values_inner.rs +++ b/src/models/mentionable_select_component_response_default_values_inner.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/message_allowed_mentions_request.rs b/src/models/message_allowed_mentions_request.rs index 306158e..7527fbb 100644 --- a/src/models/message_allowed_mentions_request.rs +++ b/src/models/message_allowed_mentions_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/message_attachment_request.rs b/src/models/message_attachment_request.rs index 5a1e1a6..4e9b3ea 100644 --- a/src/models/message_attachment_request.rs +++ b/src/models/message_attachment_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/message_attachment_response.rs b/src/models/message_attachment_response.rs index c56245c..5bfa082 100644 --- a/src/models/message_attachment_response.rs +++ b/src/models/message_attachment_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -56,28 +56,28 @@ pub struct MessageAttachmentResponse { pub url: String, #[serde(rename = "proxy_url")] pub proxy_url: String, - #[serde(rename = "width", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub width: Option>, - #[serde(rename = "height", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub height: Option>, - #[serde(rename = "duration_secs", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub duration_secs: Option>, - #[serde(rename = "waveform", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub waveform: Option>, - #[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub description: Option>, - #[serde(rename = "content_type", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub content_type: Option>, - #[serde(rename = "ephemeral", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub ephemeral: Option>, + #[serde(rename = "width", skip_serializing_if = "Option::is_none")] + pub width: Option, + #[serde(rename = "height", skip_serializing_if = "Option::is_none")] + pub height: Option, + #[serde(rename = "duration_secs", skip_serializing_if = "Option::is_none")] + pub duration_secs: Option, + #[serde(rename = "waveform", skip_serializing_if = "Option::is_none")] + pub waveform: Option, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "content_type", skip_serializing_if = "Option::is_none")] + pub content_type: Option, + #[serde(rename = "ephemeral", skip_serializing_if = "Option::is_none")] + pub ephemeral: Option, #[serde(rename = "title", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub title: Option>, - #[serde(rename = "application", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub application: Option>>, - #[serde(rename = "clip_created_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub clip_created_at: Option>, - #[serde(rename = "clip_participants", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub clip_participants: Option>>, + #[serde(rename = "application", skip_serializing_if = "Option::is_none")] + pub application: Option>, + #[serde(rename = "clip_created_at", skip_serializing_if = "Option::is_none")] + pub clip_created_at: Option, + #[serde(rename = "clip_participants", skip_serializing_if = "Option::is_none")] + pub clip_participants: Option>, } impl MessageAttachmentResponse { diff --git a/src/models/message_call_response.rs b/src/models/message_call_response.rs index fa0248d..867855a 100644 --- a/src/models/message_call_response.rs +++ b/src/models/message_call_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/message_component_interaction_metadata_response.rs b/src/models/message_component_interaction_metadata_response.rs index e920ded..4ee2d4c 100644 --- a/src/models/message_component_interaction_metadata_response.rs +++ b/src/models/message_component_interaction_metadata_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,8 +50,8 @@ pub struct MessageComponentInteractionMetadataResponse { pub id: String, #[serde(rename = "type")] pub r#type: i32, - #[serde(rename = "user", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub user: Option>>, + #[serde(rename = "user", skip_serializing_if = "Option::is_none")] + pub user: Option>, #[serde(rename = "authorizing_integration_owners")] pub authorizing_integration_owners: std::collections::HashMap, #[serde(rename = "original_response_message_id", skip_serializing_if = "Option::is_none")] diff --git a/src/models/message_create_request.rs b/src/models/message_create_request.rs index 839d08e..44fa5af 100644 --- a/src/models/message_create_request.rs +++ b/src/models/message_create_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -62,6 +62,8 @@ pub struct MessageCreateRequest { pub attachments: Option>>, #[serde(rename = "poll", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub poll: Option>>, + #[serde(rename = "shared_client_theme", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub shared_client_theme: Option>>, #[serde(rename = "confetti_potion", skip_serializing_if = "Option::is_none")] pub confetti_potion: Option, #[serde(rename = "message_reference", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] @@ -85,6 +87,7 @@ impl MessageCreateRequest { flags: None, attachments: None, poll: None, + shared_client_theme: None, confetti_potion: None, message_reference: None, nonce: None, diff --git a/src/models/message_edit_request_partial.rs b/src/models/message_edit_request_partial.rs index bac89f1..5487a19 100644 --- a/src/models/message_edit_request_partial.rs +++ b/src/models/message_edit_request_partial.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/message_embed_author_response.rs b/src/models/message_embed_author_response.rs index c673d8d..65ec9c6 100644 --- a/src/models/message_embed_author_response.rs +++ b/src/models/message_embed_author_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -48,12 +48,12 @@ use serde::{Deserialize, Serialize}; pub struct MessageEmbedAuthorResponse { #[serde(rename = "name")] pub name: String, - #[serde(rename = "url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub url: Option>, - #[serde(rename = "icon_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub icon_url: Option>, - #[serde(rename = "proxy_icon_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub proxy_icon_url: Option>, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, + #[serde(rename = "icon_url", skip_serializing_if = "Option::is_none")] + pub icon_url: Option, + #[serde(rename = "proxy_icon_url", skip_serializing_if = "Option::is_none")] + pub proxy_icon_url: Option, } impl MessageEmbedAuthorResponse { diff --git a/src/models/message_embed_field_response.rs b/src/models/message_embed_field_response.rs index 0712245..03852f9 100644 --- a/src/models/message_embed_field_response.rs +++ b/src/models/message_embed_field_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/message_embed_footer_response.rs b/src/models/message_embed_footer_response.rs index 0e13fd3..8a8a252 100644 --- a/src/models/message_embed_footer_response.rs +++ b/src/models/message_embed_footer_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -48,10 +48,10 @@ use serde::{Deserialize, Serialize}; pub struct MessageEmbedFooterResponse { #[serde(rename = "text")] pub text: String, - #[serde(rename = "icon_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub icon_url: Option>, - #[serde(rename = "proxy_icon_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub proxy_icon_url: Option>, + #[serde(rename = "icon_url", skip_serializing_if = "Option::is_none")] + pub icon_url: Option, + #[serde(rename = "proxy_icon_url", skip_serializing_if = "Option::is_none")] + pub proxy_icon_url: Option, } impl MessageEmbedFooterResponse { diff --git a/src/models/message_embed_image_response.rs b/src/models/message_embed_image_response.rs index 68ee47f..d2d8641 100644 --- a/src/models/message_embed_image_response.rs +++ b/src/models/message_embed_image_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -46,22 +46,22 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MessageEmbedImageResponse { - #[serde(rename = "url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub url: Option>, - #[serde(rename = "proxy_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub proxy_url: Option>, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, + #[serde(rename = "proxy_url", skip_serializing_if = "Option::is_none")] + pub proxy_url: Option, #[serde(rename = "width", skip_serializing_if = "Option::is_none")] pub width: Option, #[serde(rename = "height", skip_serializing_if = "Option::is_none")] pub height: Option, - #[serde(rename = "content_type", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub content_type: Option>, - #[serde(rename = "placeholder", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub placeholder: Option>, + #[serde(rename = "content_type", skip_serializing_if = "Option::is_none")] + pub content_type: Option, + #[serde(rename = "placeholder", skip_serializing_if = "Option::is_none")] + pub placeholder: Option, #[serde(rename = "placeholder_version", skip_serializing_if = "Option::is_none")] pub placeholder_version: Option, - #[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub description: Option>, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, #[serde(rename = "flags", skip_serializing_if = "Option::is_none")] pub flags: Option, } diff --git a/src/models/message_embed_provider_response.rs b/src/models/message_embed_provider_response.rs index 0d5836b..1220ee1 100644 --- a/src/models/message_embed_provider_response.rs +++ b/src/models/message_embed_provider_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -48,8 +48,8 @@ use serde::{Deserialize, Serialize}; pub struct MessageEmbedProviderResponse { #[serde(rename = "name")] pub name: String, - #[serde(rename = "url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub url: Option>, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, } impl MessageEmbedProviderResponse { diff --git a/src/models/message_embed_response.rs b/src/models/message_embed_response.rs index f742830..fc5fbfc 100644 --- a/src/models/message_embed_response.rs +++ b/src/models/message_embed_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -48,30 +48,30 @@ use serde::{Deserialize, Serialize}; pub struct MessageEmbedResponse { #[serde(rename = "type")] pub r#type: String, - #[serde(rename = "url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub url: Option>, - #[serde(rename = "title", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub title: Option>, - #[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub description: Option>, - #[serde(rename = "color", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub color: Option>, - #[serde(rename = "timestamp", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub timestamp: Option>, - #[serde(rename = "fields", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub fields: Option>>, - #[serde(rename = "author", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub author: Option>>, - #[serde(rename = "provider", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub provider: Option>>, - #[serde(rename = "image", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub image: Option>>, - #[serde(rename = "thumbnail", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub thumbnail: Option>>, - #[serde(rename = "video", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub video: Option>>, - #[serde(rename = "footer", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub footer: Option>>, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, + #[serde(rename = "title", skip_serializing_if = "Option::is_none")] + pub title: Option, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "color", skip_serializing_if = "Option::is_none")] + pub color: Option, + #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] + pub timestamp: Option, + #[serde(rename = "fields", skip_serializing_if = "Option::is_none")] + pub fields: Option>, + #[serde(rename = "author", skip_serializing_if = "Option::is_none")] + pub author: Option>, + #[serde(rename = "provider", skip_serializing_if = "Option::is_none")] + pub provider: Option>, + #[serde(rename = "image", skip_serializing_if = "Option::is_none")] + pub image: Option>, + #[serde(rename = "thumbnail", skip_serializing_if = "Option::is_none")] + pub thumbnail: Option>, + #[serde(rename = "video", skip_serializing_if = "Option::is_none")] + pub video: Option>, + #[serde(rename = "footer", skip_serializing_if = "Option::is_none")] + pub footer: Option>, } impl MessageEmbedResponse { diff --git a/src/models/message_embed_video_response.rs b/src/models/message_embed_video_response.rs index 0d937ab..710195d 100644 --- a/src/models/message_embed_video_response.rs +++ b/src/models/message_embed_video_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -46,22 +46,22 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MessageEmbedVideoResponse { - #[serde(rename = "url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub url: Option>, - #[serde(rename = "proxy_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub proxy_url: Option>, + #[serde(rename = "url", skip_serializing_if = "Option::is_none")] + pub url: Option, + #[serde(rename = "proxy_url", skip_serializing_if = "Option::is_none")] + pub proxy_url: Option, #[serde(rename = "width", skip_serializing_if = "Option::is_none")] pub width: Option, #[serde(rename = "height", skip_serializing_if = "Option::is_none")] pub height: Option, - #[serde(rename = "content_type", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub content_type: Option>, - #[serde(rename = "placeholder", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub placeholder: Option>, + #[serde(rename = "content_type", skip_serializing_if = "Option::is_none")] + pub content_type: Option, + #[serde(rename = "placeholder", skip_serializing_if = "Option::is_none")] + pub placeholder: Option, #[serde(rename = "placeholder_version", skip_serializing_if = "Option::is_none")] pub placeholder_version: Option, - #[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub description: Option>, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, #[serde(rename = "flags", skip_serializing_if = "Option::is_none")] pub flags: Option, } diff --git a/src/models/message_interaction_response.rs b/src/models/message_interaction_response.rs index cac9008..a3e45b2 100644 --- a/src/models/message_interaction_response.rs +++ b/src/models/message_interaction_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -52,10 +52,10 @@ pub struct MessageInteractionResponse { pub r#type: i32, #[serde(rename = "name")] pub name: String, - #[serde(rename = "user", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub user: Option>>, - #[serde(rename = "name_localized", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub name_localized: Option>, + #[serde(rename = "user", skip_serializing_if = "Option::is_none")] + pub user: Option>, + #[serde(rename = "name_localized", skip_serializing_if = "Option::is_none")] + pub name_localized: Option, } impl MessageInteractionResponse { diff --git a/src/models/message_mention_channel_response.rs b/src/models/message_mention_channel_response.rs index 7953636..93a22e2 100644 --- a/src/models/message_mention_channel_response.rs +++ b/src/models/message_mention_channel_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/message_reaction_count_details_response.rs b/src/models/message_reaction_count_details_response.rs index dbd4ecf..33b495a 100644 --- a/src/models/message_reaction_count_details_response.rs +++ b/src/models/message_reaction_count_details_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/message_reaction_emoji_response.rs b/src/models/message_reaction_emoji_response.rs index d40f11d..9ba592d 100644 --- a/src/models/message_reaction_emoji_response.rs +++ b/src/models/message_reaction_emoji_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,8 +50,8 @@ pub struct MessageReactionEmojiResponse { pub id: Option, #[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub name: Option>, - #[serde(rename = "animated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub animated: Option>, + #[serde(rename = "animated", skip_serializing_if = "Option::is_none")] + pub animated: Option, } impl MessageReactionEmojiResponse { diff --git a/src/models/message_reaction_response.rs b/src/models/message_reaction_response.rs index 854c8df..897ae2f 100644 --- a/src/models/message_reaction_response.rs +++ b/src/models/message_reaction_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/message_reference_request.rs b/src/models/message_reference_request.rs index 8a9741c..066a876 100644 --- a/src/models/message_reference_request.rs +++ b/src/models/message_reference_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/message_reference_response.rs b/src/models/message_reference_response.rs index a7d3597..f5dd360 100644 --- a/src/models/message_reference_response.rs +++ b/src/models/message_reference_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -46,8 +46,8 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MessageReferenceResponse { - #[serde(rename = "type", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub r#type: Option>, + #[serde(rename = "type", deserialize_with = "Option::deserialize")] + pub r#type: Option, #[serde(rename = "channel_id")] pub channel_id: String, #[serde(rename = "message_id", skip_serializing_if = "Option::is_none")] @@ -57,9 +57,9 @@ pub struct MessageReferenceResponse { } impl MessageReferenceResponse { - pub fn new(channel_id: String) -> MessageReferenceResponse { + pub fn new(r#type: Option, channel_id: String) -> MessageReferenceResponse { MessageReferenceResponse { - r#type: None, + r#type, channel_id, message_id: None, guild_id: None, diff --git a/src/models/message_response.rs b/src/models/message_response.rs index fce7b50..84955d9 100644 --- a/src/models/message_response.rs +++ b/src/models/message_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -66,12 +66,10 @@ pub struct MessageResponse { pub flags: i32, #[serde(rename = "components")] pub components: Vec, - #[serde(rename = "resolved", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub resolved: Option>>, - #[serde(rename = "stickers", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub stickers: Option>>, - #[serde(rename = "sticker_items", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub sticker_items: Option>>, + #[serde(rename = "stickers", skip_serializing_if = "Option::is_none")] + pub stickers: Option>, + #[serde(rename = "sticker_items", skip_serializing_if = "Option::is_none")] + pub sticker_items: Option>, #[serde(rename = "id")] pub id: String, #[serde(rename = "channel_id")] @@ -84,40 +82,44 @@ pub struct MessageResponse { pub mention_everyone: bool, #[serde(rename = "tts")] pub tts: bool, - #[serde(rename = "call", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub call: Option>>, + #[serde(rename = "call", skip_serializing_if = "Option::is_none")] + pub call: Option>, #[serde(rename = "activity", skip_serializing_if = "Option::is_none")] pub activity: Option, - #[serde(rename = "application", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub application: Option>>, + #[serde(rename = "application", skip_serializing_if = "Option::is_none")] + pub application: Option>, #[serde(rename = "application_id", skip_serializing_if = "Option::is_none")] pub application_id: Option, - #[serde(rename = "interaction", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub interaction: Option>>, + #[serde(rename = "interaction", skip_serializing_if = "Option::is_none")] + pub interaction: Option>, #[serde(rename = "nonce", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub nonce: Option>>, #[serde(rename = "webhook_id", skip_serializing_if = "Option::is_none")] pub webhook_id: Option, - #[serde(rename = "message_reference", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub message_reference: Option>>, - #[serde(rename = "thread", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub thread: Option>>, - #[serde(rename = "mention_channels", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub mention_channels: Option>>, - #[serde(rename = "role_subscription_data", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub role_subscription_data: Option>>, - #[serde(rename = "purchase_notification", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub purchase_notification: Option>>, - #[serde(rename = "position", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub position: Option>, - #[serde(rename = "poll", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub poll: Option>>, - #[serde(rename = "interaction_metadata", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub interaction_metadata: Option>>, - #[serde(rename = "message_snapshots", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub message_snapshots: Option>>, - #[serde(rename = "reactions", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub reactions: Option>>, + #[serde(rename = "message_reference", skip_serializing_if = "Option::is_none")] + pub message_reference: Option>, + #[serde(rename = "thread", skip_serializing_if = "Option::is_none")] + pub thread: Option>, + #[serde(rename = "mention_channels", skip_serializing_if = "Option::is_none")] + pub mention_channels: Option>, + #[serde(rename = "role_subscription_data", skip_serializing_if = "Option::is_none")] + pub role_subscription_data: Option>, + #[serde(rename = "purchase_notification", skip_serializing_if = "Option::is_none")] + pub purchase_notification: Option>, + #[serde(rename = "position", skip_serializing_if = "Option::is_none")] + pub position: Option, + #[serde(rename = "resolved", skip_serializing_if = "Option::is_none")] + pub resolved: Option>, + #[serde(rename = "poll", skip_serializing_if = "Option::is_none")] + pub poll: Option>, + #[serde(rename = "shared_client_theme", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub shared_client_theme: Option>>, + #[serde(rename = "interaction_metadata", skip_serializing_if = "Option::is_none")] + pub interaction_metadata: Option>, + #[serde(rename = "message_snapshots", skip_serializing_if = "Option::is_none")] + pub message_snapshots: Option>, + #[serde(rename = "reactions", skip_serializing_if = "Option::is_none")] + pub reactions: Option>, #[serde(rename = "referenced_message", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub referenced_message: Option>>, } @@ -135,7 +137,6 @@ impl MessageResponse { edited_timestamp: None, flags, components, - resolved: None, stickers: None, sticker_items: None, id, @@ -157,7 +158,9 @@ impl MessageResponse { role_subscription_data: None, purchase_notification: None, position: None, + resolved: None, poll: None, + shared_client_theme: None, interaction_metadata: None, message_snapshots: None, reactions: None, diff --git a/src/models/message_role_subscription_data_response.rs b/src/models/message_role_subscription_data_response.rs index 2542e1a..3989307 100644 --- a/src/models/message_role_subscription_data_response.rs +++ b/src/models/message_role_subscription_data_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/message_snapshot_response.rs b/src/models/message_snapshot_response.rs index d2dce26..4a0a8d4 100644 --- a/src/models/message_snapshot_response.rs +++ b/src/models/message_snapshot_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -46,14 +46,14 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct MessageSnapshotResponse { - #[serde(rename = "message", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub message: Option>>, + #[serde(rename = "message")] + pub message: Box, } impl MessageSnapshotResponse { - pub fn new() -> MessageSnapshotResponse { + pub fn new(message: models::MinimalContentMessageResponse) -> MessageSnapshotResponse { MessageSnapshotResponse { - message: None, + message: Box::new(message), } } } diff --git a/src/models/message_sticker_item_response.rs b/src/models/message_sticker_item_response.rs index 6931c37..21bbab0 100644 --- a/src/models/message_sticker_item_response.rs +++ b/src/models/message_sticker_item_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/minimal_content_message_response.rs b/src/models/minimal_content_message_response.rs index 70e7941..a469cbd 100644 --- a/src/models/minimal_content_message_response.rs +++ b/src/models/minimal_content_message_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -66,12 +66,10 @@ pub struct MinimalContentMessageResponse { pub flags: i32, #[serde(rename = "components")] pub components: Vec, - #[serde(rename = "resolved", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub resolved: Option>>, - #[serde(rename = "stickers", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub stickers: Option>>, - #[serde(rename = "sticker_items", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub sticker_items: Option>>, + #[serde(rename = "stickers", skip_serializing_if = "Option::is_none")] + pub stickers: Option>, + #[serde(rename = "sticker_items", skip_serializing_if = "Option::is_none")] + pub sticker_items: Option>, } impl MinimalContentMessageResponse { @@ -87,7 +85,6 @@ impl MinimalContentMessageResponse { edited_timestamp: None, flags, components, - resolved: None, stickers: None, sticker_items: None, } diff --git a/src/models/ml_spam_rule_response.rs b/src/models/ml_spam_rule_response.rs index 0949f5d..ac87f95 100644 --- a/src/models/ml_spam_rule_response.rs +++ b/src/models/ml_spam_rule_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -60,18 +60,18 @@ pub struct MlSpamRuleResponse { pub actions: Vec, #[serde(rename = "trigger_type")] pub trigger_type: i32, - #[serde(rename = "enabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub enabled: Option>, - #[serde(rename = "exempt_roles", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub exempt_roles: Option>>, - #[serde(rename = "exempt_channels", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub exempt_channels: Option>>, + #[serde(rename = "enabled")] + pub enabled: bool, + #[serde(rename = "exempt_roles")] + pub exempt_roles: Vec, + #[serde(rename = "exempt_channels")] + pub exempt_channels: Vec, #[serde(rename = "trigger_metadata")] pub trigger_metadata: serde_json::Value, } impl MlSpamRuleResponse { - pub fn new(id: String, guild_id: String, creator_id: String, name: String, event_type: i32, actions: Vec, trigger_type: i32, trigger_metadata: serde_json::Value) -> MlSpamRuleResponse { + pub fn new(id: String, guild_id: String, creator_id: String, name: String, event_type: i32, actions: Vec, trigger_type: i32, enabled: bool, exempt_roles: Vec, exempt_channels: Vec, trigger_metadata: serde_json::Value) -> MlSpamRuleResponse { MlSpamRuleResponse { id, guild_id, @@ -80,9 +80,9 @@ impl MlSpamRuleResponse { event_type, actions, trigger_type, - enabled: None, - exempt_roles: None, - exempt_channels: None, + enabled, + exempt_roles, + exempt_channels, trigger_metadata, } } diff --git a/src/models/ml_spam_upsert_request.rs b/src/models/ml_spam_upsert_request.rs index 5621dd5..dfe1efb 100644 --- a/src/models/ml_spam_upsert_request.rs +++ b/src/models/ml_spam_upsert_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/ml_spam_upsert_request_partial.rs b/src/models/ml_spam_upsert_request_partial.rs index 9460897..c202347 100644 --- a/src/models/ml_spam_upsert_request_partial.rs +++ b/src/models/ml_spam_upsert_request_partial.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/mod.rs b/src/models/mod.rs index 45f3c90..078446c 100644 --- a/src/models/mod.rs +++ b/src/models/mod.rs @@ -16,8 +16,6 @@ pub mod add_group_dm_user_201_response; pub use self::add_group_dm_user_201_response::AddGroupDmUser201Response; pub mod add_group_dm_user_request; pub use self::add_group_dm_user_request::AddGroupDmUserRequest; -pub mod add_guild_member_request; -pub use self::add_guild_member_request::AddGuildMemberRequest; pub mod add_lobby_member_request; pub use self::add_lobby_member_request::AddLobbyMemberRequest; pub mod application_command_attachment_option; @@ -138,6 +136,8 @@ pub mod base_create_message_create_request_components_inner; pub use self::base_create_message_create_request_components_inner::BaseCreateMessageCreateRequestComponentsInner; pub mod basic_application_response; pub use self::basic_application_response::BasicApplicationResponse; +pub mod basic_guild_member_response; +pub use self::basic_guild_member_response::BasicGuildMemberResponse; pub mod basic_message_response; pub use self::basic_message_response::BasicMessageResponse; pub mod basic_message_response_components_inner; @@ -156,8 +156,12 @@ pub mod block_message_action_response; pub use self::block_message_action_response::BlockMessageActionResponse; pub mod bot_account_patch_request; pub use self::bot_account_patch_request::BotAccountPatchRequest; -pub mod bulk_ban_users_from_guild_request; -pub use self::bulk_ban_users_from_guild_request::BulkBanUsersFromGuildRequest; +pub mod bot_add_guild_member_request; +pub use self::bot_add_guild_member_request::BotAddGuildMemberRequest; +pub mod bot_partner_sdk_token_request; +pub use self::bot_partner_sdk_token_request::BotPartnerSdkTokenRequest; +pub mod bulk_ban_users_request; +pub use self::bulk_ban_users_request::BulkBanUsersRequest; pub mod bulk_ban_users_response; pub use self::bulk_ban_users_response::BulkBanUsersResponse; pub mod bulk_delete_messages_request; @@ -166,8 +170,6 @@ pub mod bulk_lobby_member_request; pub use self::bulk_lobby_member_request::BulkLobbyMemberRequest; pub mod bulk_update_guild_channels_request_inner; pub use self::bulk_update_guild_channels_request_inner::BulkUpdateGuildChannelsRequestInner; -pub mod bulk_update_guild_roles_request_inner; -pub use self::bulk_update_guild_roles_request_inner::BulkUpdateGuildRolesRequestInner; pub mod button_component_for_message_request; pub use self::button_component_for_message_request::ButtonComponentForMessageRequest; pub mod button_component_response; @@ -182,6 +184,8 @@ pub mod channel_permission_overwrite_response; pub use self::channel_permission_overwrite_response::ChannelPermissionOverwriteResponse; pub mod channel_select_component_for_message_request; pub use self::channel_select_component_for_message_request::ChannelSelectComponentForMessageRequest; +pub mod channel_select_component_for_modal_request; +pub use self::channel_select_component_for_modal_request::ChannelSelectComponentForModalRequest; pub mod channel_select_component_response; pub use self::channel_select_component_response::ChannelSelectComponentResponse; pub mod channel_select_default_value; @@ -192,8 +196,8 @@ pub mod command_permission_response; pub use self::command_permission_response::CommandPermissionResponse; pub mod command_permissions_response; pub use self::command_permissions_response::CommandPermissionsResponse; -pub mod component_emoji_for_message_request; -pub use self::component_emoji_for_message_request::ComponentEmojiForMessageRequest; +pub mod component_emoji_for_request; +pub use self::component_emoji_for_request::ComponentEmojiForRequest; pub mod component_emoji_response; pub use self::component_emoji_response::ComponentEmojiResponse; pub mod connected_account_guild_response; @@ -216,6 +220,8 @@ pub mod create_auto_moderation_rule_200_response; pub use self::create_auto_moderation_rule_200_response::CreateAutoModerationRule200Response; pub mod create_auto_moderation_rule_request; pub use self::create_auto_moderation_rule_request::CreateAutoModerationRuleRequest; +pub mod create_channel_invite_200_response; +pub use self::create_channel_invite_200_response::CreateChannelInvite200Response; pub mod create_channel_invite_request; pub use self::create_channel_invite_request::CreateChannelInviteRequest; pub mod create_entitlement_request_data; @@ -228,16 +234,8 @@ pub mod create_guild_channel_request; pub use self::create_guild_channel_request::CreateGuildChannelRequest; pub mod create_guild_emoji_request; pub use self::create_guild_emoji_request::CreateGuildEmojiRequest; -pub mod create_guild_from_template_request; -pub use self::create_guild_from_template_request::CreateGuildFromTemplateRequest; pub mod create_guild_invite_request; pub use self::create_guild_invite_request::CreateGuildInviteRequest; -pub mod create_guild_request_channel_item; -pub use self::create_guild_request_channel_item::CreateGuildRequestChannelItem; -pub mod create_guild_request_role_item; -pub use self::create_guild_request_role_item::CreateGuildRequestRoleItem; -pub mod create_guild_role_request; -pub use self::create_guild_role_request::CreateGuildRoleRequest; pub mod create_guild_scheduled_event_request; pub use self::create_guild_scheduled_event_request::CreateGuildScheduledEventRequest; pub mod create_guild_template_request; @@ -256,6 +254,8 @@ pub mod create_or_update_thread_tag_request; pub use self::create_or_update_thread_tag_request::CreateOrUpdateThreadTagRequest; pub mod create_private_channel_request; pub use self::create_private_channel_request::CreatePrivateChannelRequest; +pub mod create_role_request; +pub use self::create_role_request::CreateRoleRequest; pub mod create_stage_instance_request; pub use self::create_stage_instance_request::CreateStageInstanceRequest; pub mod create_text_thread_with_message_request; @@ -268,6 +268,10 @@ pub mod create_webhook_request; pub use self::create_webhook_request::CreateWebhookRequest; pub mod created_thread_response; pub use self::created_thread_response::CreatedThreadResponse; +pub mod custom_client_theme_response; +pub use self::custom_client_theme_response::CustomClientThemeResponse; +pub mod custom_client_theme_share_request; +pub use self::custom_client_theme_share_request::CustomClientThemeShareRequest; pub mod default_keyword_list_trigger_metadata; pub use self::default_keyword_list_trigger_metadata::DefaultKeywordListTriggerMetadata; pub mod default_keyword_list_trigger_metadata_response; @@ -388,8 +392,6 @@ pub mod guild_channel_location; pub use self::guild_channel_location::GuildChannelLocation; pub mod guild_channel_response; pub use self::guild_channel_response::GuildChannelResponse; -pub mod guild_create_request; -pub use self::guild_create_request::GuildCreateRequest; pub mod guild_home_settings_response; pub use self::guild_home_settings_response::GuildHomeSettingsResponse; pub mod guild_incoming_webhook_response; @@ -400,6 +402,8 @@ pub mod guild_member_response; pub use self::guild_member_response::GuildMemberResponse; pub mod guild_mfa_level_response; pub use self::guild_mfa_level_response::GuildMfaLevelResponse; +pub mod guild_mfa_request; +pub use self::guild_mfa_request::GuildMfaRequest; pub mod guild_onboarding_response; pub use self::guild_onboarding_response::GuildOnboardingResponse; pub mod guild_patch_request_partial; @@ -482,6 +486,10 @@ pub mod keyword_upsert_request; pub use self::keyword_upsert_request::KeywordUpsertRequest; pub mod keyword_upsert_request_partial; pub use self::keyword_upsert_request_partial::KeywordUpsertRequestPartial; +pub mod label_component_for_modal_request; +pub use self::label_component_for_modal_request::LabelComponentForModalRequest; +pub mod label_component_for_modal_request_component; +pub use self::label_component_for_modal_request_component::LabelComponentForModalRequestComponent; pub mod launch_activity_interaction_callback_request; pub use self::launch_activity_interaction_callback_request::LaunchActivityInteractionCallbackRequest; pub mod launch_activity_interaction_callback_response; @@ -500,6 +508,8 @@ pub mod list_guild_scheduled_events_200_response_inner; pub use self::list_guild_scheduled_events_200_response_inner::ListGuildScheduledEvents200ResponseInner; pub mod list_guild_soundboard_sounds_response; pub use self::list_guild_soundboard_sounds_response::ListGuildSoundboardSoundsResponse; +pub mod lobby_guild_invite_response; +pub use self::lobby_guild_invite_response::LobbyGuildInviteResponse; pub mod lobby_member_request; pub use self::lobby_member_request::LobbyMemberRequest; pub mod lobby_member_response; @@ -530,6 +540,8 @@ pub mod mentionable_select_component_for_message_request; pub use self::mentionable_select_component_for_message_request::MentionableSelectComponentForMessageRequest; pub mod mentionable_select_component_for_message_request_default_values_inner; pub use self::mentionable_select_component_for_message_request_default_values_inner::MentionableSelectComponentForMessageRequestDefaultValuesInner; +pub mod mentionable_select_component_for_modal_request; +pub use self::mentionable_select_component_for_modal_request::MentionableSelectComponentForModalRequest; pub mod mentionable_select_component_response; pub use self::mentionable_select_component_response::MentionableSelectComponentResponse; pub mod mentionable_select_component_response_default_values_inner; @@ -596,6 +608,8 @@ pub mod modal_interaction_callback_request; pub use self::modal_interaction_callback_request::ModalInteractionCallbackRequest; pub mod modal_interaction_callback_request_data; pub use self::modal_interaction_callback_request_data::ModalInteractionCallbackRequestData; +pub mod modal_interaction_callback_request_data_components_inner; +pub use self::modal_interaction_callback_request_data_components_inner::ModalInteractionCallbackRequestDataComponentsInner; pub mod modal_submit_interaction_metadata_response; pub use self::modal_submit_interaction_metadata_response::ModalSubmitInteractionMetadataResponse; pub mod modal_submit_interaction_metadata_response_triggering_interaction_metadata; @@ -678,6 +692,8 @@ pub mod quarantine_user_action; pub use self::quarantine_user_action::QuarantineUserAction; pub mod quarantine_user_action_response; pub use self::quarantine_user_action_response::QuarantineUserActionResponse; +pub mod ratelimited_response; +pub use self::ratelimited_response::RatelimitedResponse; pub mod resolved_objects_response; pub use self::resolved_objects_response::ResolvedObjectsResponse; pub mod resource_channel_response; @@ -700,6 +716,8 @@ pub mod rich_embed_video; pub use self::rich_embed_video::RichEmbedVideo; pub mod role_select_component_for_message_request; pub use self::role_select_component_for_message_request::RoleSelectComponentForMessageRequest; +pub mod role_select_component_for_modal_request; +pub use self::role_select_component_for_modal_request::RoleSelectComponentForModalRequest; pub mod role_select_component_response; pub use self::role_select_component_response::RoleSelectComponentResponse; pub mod role_select_default_value; @@ -728,8 +746,6 @@ pub mod set_channel_permission_overwrite_request; pub use self::set_channel_permission_overwrite_request::SetChannelPermissionOverwriteRequest; pub mod set_guild_application_command_permissions_request; pub use self::set_guild_application_command_permissions_request::SetGuildApplicationCommandPermissionsRequest; -pub mod set_guild_mfa_level_request; -pub use self::set_guild_mfa_level_request::SetGuildMfaLevelRequest; pub mod settings_emoji_response; pub use self::settings_emoji_response::SettingsEmojiResponse; pub mod slack_webhook; @@ -760,10 +776,12 @@ pub mod sticker_pack_response; pub use self::sticker_pack_response::StickerPackResponse; pub mod string_select_component_for_message_request; pub use self::string_select_component_for_message_request::StringSelectComponentForMessageRequest; +pub mod string_select_component_for_modal_request; +pub use self::string_select_component_for_modal_request::StringSelectComponentForModalRequest; pub mod string_select_component_response; pub use self::string_select_component_response::StringSelectComponentResponse; -pub mod string_select_option_for_message_request; -pub use self::string_select_option_for_message_request::StringSelectOptionForMessageRequest; +pub mod string_select_option_for_request; +pub use self::string_select_option_for_request::StringSelectOptionForRequest; pub mod string_select_option_response; pub use self::string_select_option_response::StringSelectOptionResponse; pub mod team_member_response; @@ -772,6 +790,8 @@ pub mod team_response; pub use self::team_response::TeamResponse; pub mod text_display_component_for_message_request; pub use self::text_display_component_for_message_request::TextDisplayComponentForMessageRequest; +pub mod text_display_component_for_modal_request; +pub use self::text_display_component_for_modal_request::TextDisplayComponentForModalRequest; pub mod text_display_component_response; pub use self::text_display_component_response::TextDisplayComponentResponse; pub mod text_input_component_for_modal_request; @@ -838,16 +858,20 @@ pub mod update_my_guild_member_request; pub use self::update_my_guild_member_request::UpdateMyGuildMemberRequest; pub mod update_onboarding_prompt_request; pub use self::update_onboarding_prompt_request::UpdateOnboardingPromptRequest; -pub mod update_self_voice_state_request; -pub use self::update_self_voice_state_request::UpdateSelfVoiceStateRequest; +pub mod update_role_positions_request; +pub use self::update_role_positions_request::UpdateRolePositionsRequest; +pub mod update_role_request_partial; +pub use self::update_role_request_partial::UpdateRoleRequestPartial; +pub mod update_self_voice_state_request_partial; +pub use self::update_self_voice_state_request_partial::UpdateSelfVoiceStateRequestPartial; pub mod update_stage_instance_request; pub use self::update_stage_instance_request::UpdateStageInstanceRequest; pub mod update_thread_request_partial; pub use self::update_thread_request_partial::UpdateThreadRequestPartial; pub mod update_thread_tag_request; pub use self::update_thread_tag_request::UpdateThreadTagRequest; -pub mod update_voice_state_request; -pub use self::update_voice_state_request::UpdateVoiceStateRequest; +pub mod update_voice_state_request_partial; +pub use self::update_voice_state_request_partial::UpdateVoiceStateRequestPartial; pub mod update_webhook_by_token_request; pub use self::update_webhook_by_token_request::UpdateWebhookByTokenRequest; pub mod update_webhook_request; @@ -876,6 +900,8 @@ pub mod user_response; pub use self::user_response::UserResponse; pub mod user_select_component_for_message_request; pub use self::user_select_component_for_message_request::UserSelectComponentForMessageRequest; +pub mod user_select_component_for_modal_request; +pub use self::user_select_component_for_modal_request::UserSelectComponentForModalRequest; pub mod user_select_component_response; pub use self::user_select_component_response::UserSelectComponentResponse; pub mod user_select_default_value; diff --git a/src/models/modal_interaction_callback_request.rs b/src/models/modal_interaction_callback_request.rs index 3dd4b4d..c2d4141 100644 --- a/src/models/modal_interaction_callback_request.rs +++ b/src/models/modal_interaction_callback_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/modal_interaction_callback_request_data.rs b/src/models/modal_interaction_callback_request_data.rs index 944af9a..17d5966 100644 --- a/src/models/modal_interaction_callback_request_data.rs +++ b/src/models/modal_interaction_callback_request_data.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -51,11 +51,11 @@ pub struct ModalInteractionCallbackRequestData { #[serde(rename = "title")] pub title: String, #[serde(rename = "components")] - pub components: Vec, + pub components: Vec, } impl ModalInteractionCallbackRequestData { - pub fn new(custom_id: String, title: String, components: Vec) -> ModalInteractionCallbackRequestData { + pub fn new(custom_id: String, title: String, components: Vec) -> ModalInteractionCallbackRequestData { ModalInteractionCallbackRequestData { custom_id, title, diff --git a/src/models/modal_interaction_callback_request_data_components_inner.rs b/src/models/modal_interaction_callback_request_data_components_inner.rs new file mode 100644 index 0000000..4eb14e8 --- /dev/null +++ b/src/models/modal_interaction_callback_request_data_components_inner.rs @@ -0,0 +1,60 @@ +//! # Discord HTTP API (Preview) - REST API Client +//! +//! Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. +//! +//! ## Metadata +//! +//! - **Copyright**: Copyright (c) 2025 Qntx +//! - **Author**: ΣX +//! - **Version**: 10 +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] +//! - **Generator Version**: 7.14.0 +//! +//!
+//! ⚠️ Important Disclaimer & Limitation of Liability +//!
+//! > **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +//! > to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +//! > and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +//! > of this software or its outputs. +//! > +//! > This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +//! > Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +//! > financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +//! > legal professionals before making decisions based on this software's outputs. +//! > +//! > Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +//! > other financial activities may result in substantial losses, including total loss of capital. The Developers are not +//! > liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +//! > outputs and ensuring their suitability for intended purposes. +//! > +//! > This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +//! > the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +//! > comply with third-party terms and conditions. +//! > +//! > Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +//! > their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +//! > Developers disclaim liability for any legal consequences arising from non-compliance. +//! > +//! > To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +//! > consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +//! > loss of profits, data, or business opportunities. +//! +//!
+use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ModalInteractionCallbackRequestDataComponentsInner { + ActionRowComponentForModalRequest(Box), + LabelComponentForModalRequest(Box), + TextDisplayComponentForModalRequest(Box), +} + +impl Default for ModalInteractionCallbackRequestDataComponentsInner { + fn default() -> Self { + Self::ActionRowComponentForModalRequest(Default::default()) + } +} + diff --git a/src/models/modal_submit_interaction_metadata_response.rs b/src/models/modal_submit_interaction_metadata_response.rs index d5b111d..abb4fb2 100644 --- a/src/models/modal_submit_interaction_metadata_response.rs +++ b/src/models/modal_submit_interaction_metadata_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,8 +50,8 @@ pub struct ModalSubmitInteractionMetadataResponse { pub id: String, #[serde(rename = "type")] pub r#type: i32, - #[serde(rename = "user", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub user: Option>>, + #[serde(rename = "user", skip_serializing_if = "Option::is_none")] + pub user: Option>, #[serde(rename = "authorizing_integration_owners")] pub authorizing_integration_owners: std::collections::HashMap, #[serde(rename = "original_response_message_id", skip_serializing_if = "Option::is_none")] diff --git a/src/models/modal_submit_interaction_metadata_response_triggering_interaction_metadata.rs b/src/models/modal_submit_interaction_metadata_response_triggering_interaction_metadata.rs index 349e7b0..b7da5b0 100644 --- a/src/models/modal_submit_interaction_metadata_response_triggering_interaction_metadata.rs +++ b/src/models/modal_submit_interaction_metadata_response_triggering_interaction_metadata.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/my_guild_response.rs b/src/models/my_guild_response.rs index da0a245..82e9d7a 100644 --- a/src/models/my_guild_response.rs +++ b/src/models/my_guild_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/new_member_action_response.rs b/src/models/new_member_action_response.rs index d9568c5..f55263c 100644 --- a/src/models/new_member_action_response.rs +++ b/src/models/new_member_action_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -54,10 +54,10 @@ pub struct NewMemberActionResponse { pub title: String, #[serde(rename = "description")] pub description: String, - #[serde(rename = "emoji", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub emoji: Option>>, - #[serde(rename = "icon", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub icon: Option>, + #[serde(rename = "emoji", skip_serializing_if = "Option::is_none")] + pub emoji: Option>, + #[serde(rename = "icon", skip_serializing_if = "Option::is_none")] + pub icon: Option, } impl NewMemberActionResponse { diff --git a/src/models/o_auth2_get_authorization_response.rs b/src/models/o_auth2_get_authorization_response.rs index c959660..9a5d394 100644 --- a/src/models/o_auth2_get_authorization_response.rs +++ b/src/models/o_auth2_get_authorization_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -52,8 +52,8 @@ pub struct OAuth2GetAuthorizationResponse { pub expires: String, #[serde(rename = "scopes")] pub scopes: Vec, - #[serde(rename = "user", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub user: Option>>, + #[serde(rename = "user", skip_serializing_if = "Option::is_none")] + pub user: Option>, } impl OAuth2GetAuthorizationResponse { diff --git a/src/models/o_auth2_get_keys.rs b/src/models/o_auth2_get_keys.rs index 07ed12a..d0852cc 100644 --- a/src/models/o_auth2_get_keys.rs +++ b/src/models/o_auth2_get_keys.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/o_auth2_get_open_id_connect_user_info_response.rs b/src/models/o_auth2_get_open_id_connect_user_info_response.rs index 4c4f9c8..1cc132e 100644 --- a/src/models/o_auth2_get_open_id_connect_user_info_response.rs +++ b/src/models/o_auth2_get_open_id_connect_user_info_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,16 +50,16 @@ pub struct OAuth2GetOpenIdConnectUserInfoResponse { pub sub: String, #[serde(rename = "email", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub email: Option>, - #[serde(rename = "email_verified", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub email_verified: Option>, - #[serde(rename = "preferred_username", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub preferred_username: Option>, + #[serde(rename = "email_verified", skip_serializing_if = "Option::is_none")] + pub email_verified: Option, + #[serde(rename = "preferred_username", skip_serializing_if = "Option::is_none")] + pub preferred_username: Option, #[serde(rename = "nickname", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub nickname: Option>, - #[serde(rename = "picture", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub picture: Option>, - #[serde(rename = "locale", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub locale: Option>, + #[serde(rename = "picture", skip_serializing_if = "Option::is_none")] + pub picture: Option, + #[serde(rename = "locale", skip_serializing_if = "Option::is_none")] + pub locale: Option, } impl OAuth2GetOpenIdConnectUserInfoResponse { diff --git a/src/models/o_auth2_key.rs b/src/models/o_auth2_key.rs index e774995..848921a 100644 --- a/src/models/o_auth2_key.rs +++ b/src/models/o_auth2_key.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/onboarding_prompt_option_request.rs b/src/models/onboarding_prompt_option_request.rs index ca3be49..5d74389 100644 --- a/src/models/onboarding_prompt_option_request.rs +++ b/src/models/onboarding_prompt_option_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/onboarding_prompt_option_response.rs b/src/models/onboarding_prompt_option_response.rs index b8b3152..37f4665 100644 --- a/src/models/onboarding_prompt_option_response.rs +++ b/src/models/onboarding_prompt_option_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/onboarding_prompt_response.rs b/src/models/onboarding_prompt_response.rs index d82913b..6c05d6a 100644 --- a/src/models/onboarding_prompt_response.rs +++ b/src/models/onboarding_prompt_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/partial_discord_integration_response.rs b/src/models/partial_discord_integration_response.rs index 961c8ff..127b793 100644 --- a/src/models/partial_discord_integration_response.rs +++ b/src/models/partial_discord_integration_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -52,19 +52,19 @@ pub struct PartialDiscordIntegrationResponse { pub r#type: Option, #[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub name: Option>, - #[serde(rename = "account", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub account: Option>>, + #[serde(rename = "account")] + pub account: Box, #[serde(rename = "application_id")] pub application_id: String, } impl PartialDiscordIntegrationResponse { - pub fn new(id: String, r#type: Option, application_id: String) -> PartialDiscordIntegrationResponse { + pub fn new(id: String, r#type: Option, account: models::AccountResponse, application_id: String) -> PartialDiscordIntegrationResponse { PartialDiscordIntegrationResponse { id, r#type, name: None, - account: None, + account: Box::new(account), application_id, } } diff --git a/src/models/partial_external_connection_integration_response.rs b/src/models/partial_external_connection_integration_response.rs index baf050a..4489788 100644 --- a/src/models/partial_external_connection_integration_response.rs +++ b/src/models/partial_external_connection_integration_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -52,17 +52,17 @@ pub struct PartialExternalConnectionIntegrationResponse { pub r#type: Option, #[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub name: Option>, - #[serde(rename = "account", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub account: Option>>, + #[serde(rename = "account")] + pub account: Box, } impl PartialExternalConnectionIntegrationResponse { - pub fn new(id: String, r#type: Option) -> PartialExternalConnectionIntegrationResponse { + pub fn new(id: String, r#type: Option, account: models::AccountResponse) -> PartialExternalConnectionIntegrationResponse { PartialExternalConnectionIntegrationResponse { id, r#type, name: None, - account: None, + account: Box::new(account), } } } diff --git a/src/models/partial_guild_subscription_integration_response.rs b/src/models/partial_guild_subscription_integration_response.rs index 2bedc64..269c266 100644 --- a/src/models/partial_guild_subscription_integration_response.rs +++ b/src/models/partial_guild_subscription_integration_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -52,17 +52,17 @@ pub struct PartialGuildSubscriptionIntegrationResponse { pub r#type: Option, #[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub name: Option>, - #[serde(rename = "account", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub account: Option>>, + #[serde(rename = "account")] + pub account: Box, } impl PartialGuildSubscriptionIntegrationResponse { - pub fn new(id: String, r#type: Option) -> PartialGuildSubscriptionIntegrationResponse { + pub fn new(id: String, r#type: Option, account: models::AccountResponse) -> PartialGuildSubscriptionIntegrationResponse { PartialGuildSubscriptionIntegrationResponse { id, r#type, name: None, - account: None, + account: Box::new(account), } } } diff --git a/src/models/partner_sdk_unmerge_provisional_account_request.rs b/src/models/partner_sdk_unmerge_provisional_account_request.rs index d5735ee..ce2884c 100644 --- a/src/models/partner_sdk_unmerge_provisional_account_request.rs +++ b/src/models/partner_sdk_unmerge_provisional_account_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/pinned_message_response.rs b/src/models/pinned_message_response.rs index e21c849..d5cb6b6 100644 --- a/src/models/pinned_message_response.rs +++ b/src/models/pinned_message_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/pinned_messages_response.rs b/src/models/pinned_messages_response.rs index bfd1811..ab36adb 100644 --- a/src/models/pinned_messages_response.rs +++ b/src/models/pinned_messages_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -46,16 +46,16 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PinnedMessagesResponse { - #[serde(rename = "items", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub items: Option>>, + #[serde(rename = "items")] + pub items: Vec, #[serde(rename = "has_more")] pub has_more: bool, } impl PinnedMessagesResponse { - pub fn new(has_more: bool) -> PinnedMessagesResponse { + pub fn new(items: Vec, has_more: bool) -> PinnedMessagesResponse { PinnedMessagesResponse { - items: None, + items, has_more, } } diff --git a/src/models/poll_answer_create_request.rs b/src/models/poll_answer_create_request.rs index 3444c1e..e462fe9 100644 --- a/src/models/poll_answer_create_request.rs +++ b/src/models/poll_answer_create_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/poll_answer_details_response.rs b/src/models/poll_answer_details_response.rs index e6e9123..39a747e 100644 --- a/src/models/poll_answer_details_response.rs +++ b/src/models/poll_answer_details_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -46,14 +46,14 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PollAnswerDetailsResponse { - #[serde(rename = "users", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub users: Option>>, + #[serde(rename = "users")] + pub users: Vec, } impl PollAnswerDetailsResponse { - pub fn new() -> PollAnswerDetailsResponse { + pub fn new(users: Vec) -> PollAnswerDetailsResponse { PollAnswerDetailsResponse { - users: None, + users, } } } diff --git a/src/models/poll_answer_response.rs b/src/models/poll_answer_response.rs index 47d4270..b791b5c 100644 --- a/src/models/poll_answer_response.rs +++ b/src/models/poll_answer_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/poll_create_request.rs b/src/models/poll_create_request.rs index 6da728b..ebf31c0 100644 --- a/src/models/poll_create_request.rs +++ b/src/models/poll_create_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/poll_emoji.rs b/src/models/poll_emoji.rs index efa9dc3..35f5bb7 100644 --- a/src/models/poll_emoji.rs +++ b/src/models/poll_emoji.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/poll_emoji_create_request.rs b/src/models/poll_emoji_create_request.rs index a2575ac..9d361cc 100644 --- a/src/models/poll_emoji_create_request.rs +++ b/src/models/poll_emoji_create_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/poll_media.rs b/src/models/poll_media.rs index 0bfd86a..bbda4c2 100644 --- a/src/models/poll_media.rs +++ b/src/models/poll_media.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/poll_media_create_request.rs b/src/models/poll_media_create_request.rs index a7d54c2..bbe574a 100644 --- a/src/models/poll_media_create_request.rs +++ b/src/models/poll_media_create_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/poll_media_response.rs b/src/models/poll_media_response.rs index ba30bee..f730bc7 100644 --- a/src/models/poll_media_response.rs +++ b/src/models/poll_media_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -46,10 +46,10 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PollMediaResponse { - #[serde(rename = "text", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub text: Option>, - #[serde(rename = "emoji", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub emoji: Option>>, + #[serde(rename = "text", skip_serializing_if = "Option::is_none")] + pub text: Option, + #[serde(rename = "emoji", skip_serializing_if = "Option::is_none")] + pub emoji: Option>, } impl PollMediaResponse { diff --git a/src/models/poll_response.rs b/src/models/poll_response.rs index 04d3e8e..0cde5ab 100644 --- a/src/models/poll_response.rs +++ b/src/models/poll_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/poll_results_entry_response.rs b/src/models/poll_results_entry_response.rs index 4101d9a..16e1b68 100644 --- a/src/models/poll_results_entry_response.rs +++ b/src/models/poll_results_entry_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,16 +50,16 @@ pub struct PollResultsEntryResponse { pub id: i32, #[serde(rename = "count")] pub count: i32, - #[serde(rename = "me_voted", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub me_voted: Option>, + #[serde(rename = "me_voted")] + pub me_voted: bool, } impl PollResultsEntryResponse { - pub fn new(id: i32, count: i32) -> PollResultsEntryResponse { + pub fn new(id: i32, count: i32, me_voted: bool) -> PollResultsEntryResponse { PollResultsEntryResponse { id, count, - me_voted: None, + me_voted, } } } diff --git a/src/models/poll_results_response.rs b/src/models/poll_results_response.rs index 07b47aa..986fb17 100644 --- a/src/models/poll_results_response.rs +++ b/src/models/poll_results_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -46,16 +46,16 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct PollResultsResponse { - #[serde(rename = "answer_counts", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub answer_counts: Option>>, + #[serde(rename = "answer_counts")] + pub answer_counts: Vec, #[serde(rename = "is_finalized")] pub is_finalized: bool, } impl PollResultsResponse { - pub fn new(is_finalized: bool) -> PollResultsResponse { + pub fn new(answer_counts: Vec, is_finalized: bool) -> PollResultsResponse { PollResultsResponse { - answer_counts: None, + answer_counts, is_finalized, } } diff --git a/src/models/pong_interaction_callback_request.rs b/src/models/pong_interaction_callback_request.rs index 00317c1..34ac530 100644 --- a/src/models/pong_interaction_callback_request.rs +++ b/src/models/pong_interaction_callback_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/private_application_response.rs b/src/models/private_application_response.rs index 2016b68..1f5dd71 100644 --- a/src/models/private_application_response.rs +++ b/src/models/private_application_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -56,30 +56,30 @@ pub struct PrivateApplicationResponse { pub description: String, #[serde(rename = "type", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub r#type: Option>, - #[serde(rename = "cover_image", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub cover_image: Option>, + #[serde(rename = "cover_image", skip_serializing_if = "Option::is_none")] + pub cover_image: Option, #[serde(rename = "primary_sku_id", skip_serializing_if = "Option::is_none")] pub primary_sku_id: Option, - #[serde(rename = "bot", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub bot: Option>>, - #[serde(rename = "slug", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub slug: Option>, + #[serde(rename = "bot", skip_serializing_if = "Option::is_none")] + pub bot: Option>, + #[serde(rename = "slug", skip_serializing_if = "Option::is_none")] + pub slug: Option, #[serde(rename = "guild_id", skip_serializing_if = "Option::is_none")] pub guild_id: Option, - #[serde(rename = "rpc_origins", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub rpc_origins: Option>>, - #[serde(rename = "bot_public", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub bot_public: Option>, - #[serde(rename = "bot_require_code_grant", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub bot_require_code_grant: Option>, - #[serde(rename = "terms_of_service_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub terms_of_service_url: Option>, - #[serde(rename = "privacy_policy_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub privacy_policy_url: Option>, - #[serde(rename = "custom_install_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub custom_install_url: Option>, - #[serde(rename = "install_params", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub install_params: Option>>, + #[serde(rename = "rpc_origins", skip_serializing_if = "Option::is_none")] + pub rpc_origins: Option>, + #[serde(rename = "bot_public", skip_serializing_if = "Option::is_none")] + pub bot_public: Option, + #[serde(rename = "bot_require_code_grant", skip_serializing_if = "Option::is_none")] + pub bot_require_code_grant: Option, + #[serde(rename = "terms_of_service_url", skip_serializing_if = "Option::is_none")] + pub terms_of_service_url: Option, + #[serde(rename = "privacy_policy_url", skip_serializing_if = "Option::is_none")] + pub privacy_policy_url: Option, + #[serde(rename = "custom_install_url", skip_serializing_if = "Option::is_none")] + pub custom_install_url: Option, + #[serde(rename = "install_params", skip_serializing_if = "Option::is_none")] + pub install_params: Option>, #[serde(rename = "integration_types_config", skip_serializing_if = "Option::is_none")] pub integration_types_config: Option>, #[serde(rename = "verify_key")] @@ -88,8 +88,8 @@ pub struct PrivateApplicationResponse { pub flags: i32, #[serde(rename = "max_participants", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub max_participants: Option>, - #[serde(rename = "tags", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub tags: Option>>, + #[serde(rename = "tags", skip_serializing_if = "Option::is_none")] + pub tags: Option>, #[serde(rename = "redirect_uris")] pub redirect_uris: Vec, #[serde(rename = "interactions_endpoint_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] diff --git a/src/models/private_channel_location.rs b/src/models/private_channel_location.rs index 0ba8e79..6504049 100644 --- a/src/models/private_channel_location.rs +++ b/src/models/private_channel_location.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/private_channel_response.rs b/src/models/private_channel_response.rs index d7306d4..c24c138 100644 --- a/src/models/private_channel_response.rs +++ b/src/models/private_channel_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/private_group_channel_response.rs b/src/models/private_group_channel_response.rs index 34d3b15..dcb6bb3 100644 --- a/src/models/private_group_channel_response.rs +++ b/src/models/private_group_channel_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -62,16 +62,16 @@ pub struct PrivateGroupChannelResponse { pub name: Option>, #[serde(rename = "icon", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub icon: Option>, - #[serde(rename = "owner_id", skip_serializing_if = "Option::is_none")] - pub owner_id: Option, - #[serde(rename = "managed", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub managed: Option>, + #[serde(rename = "owner_id")] + pub owner_id: String, + #[serde(rename = "managed", skip_serializing_if = "Option::is_none")] + pub managed: Option, #[serde(rename = "application_id", skip_serializing_if = "Option::is_none")] pub application_id: Option, } impl PrivateGroupChannelResponse { - pub fn new(id: String, r#type: i32, flags: i32, recipients: Vec) -> PrivateGroupChannelResponse { + pub fn new(id: String, r#type: i32, flags: i32, recipients: Vec, owner_id: String) -> PrivateGroupChannelResponse { PrivateGroupChannelResponse { id, r#type, @@ -81,7 +81,7 @@ impl PrivateGroupChannelResponse { recipients, name: None, icon: None, - owner_id: None, + owner_id, managed: None, application_id: None, } diff --git a/src/models/private_guild_member_response.rs b/src/models/private_guild_member_response.rs index f4efd60..e3c9e27 100644 --- a/src/models/private_guild_member_response.rs +++ b/src/models/private_guild_member_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -66,6 +66,8 @@ pub struct PrivateGuildMemberResponse { pub premium_since: Option>, #[serde(rename = "roles")] pub roles: Vec, + #[serde(rename = "collectibles", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub collectibles: Option>>, #[serde(rename = "user")] pub user: Box, #[serde(rename = "mute")] @@ -87,6 +89,7 @@ impl PrivateGuildMemberResponse { pending, premium_since: None, roles, + collectibles: None, user: Box::new(user), mute, deaf, diff --git a/src/models/provisional_token_response.rs b/src/models/provisional_token_response.rs index d7524fe..34a0d89 100644 --- a/src/models/provisional_token_response.rs +++ b/src/models/provisional_token_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/prune_guild_request.rs b/src/models/prune_guild_request.rs index 8fdab8a..db9edf6 100644 --- a/src/models/prune_guild_request.rs +++ b/src/models/prune_guild_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/prune_guild_request_include_roles.rs b/src/models/prune_guild_request_include_roles.rs index 3ffacdc..f5594bb 100644 --- a/src/models/prune_guild_request_include_roles.rs +++ b/src/models/prune_guild_request_include_roles.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/purchase_notification_response.rs b/src/models/purchase_notification_response.rs index 77648fa..590a52c 100644 --- a/src/models/purchase_notification_response.rs +++ b/src/models/purchase_notification_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -48,8 +48,8 @@ use serde::{Deserialize, Serialize}; pub struct PurchaseNotificationResponse { #[serde(rename = "type", deserialize_with = "Option::deserialize")] pub r#type: Option, - #[serde(rename = "guild_product_purchase", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub guild_product_purchase: Option>>, + #[serde(rename = "guild_product_purchase", skip_serializing_if = "Option::is_none")] + pub guild_product_purchase: Option>, } impl PurchaseNotificationResponse { diff --git a/src/models/quarantine_user_action.rs b/src/models/quarantine_user_action.rs index 4774e0e..d7e92f5 100644 --- a/src/models/quarantine_user_action.rs +++ b/src/models/quarantine_user_action.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/quarantine_user_action_response.rs b/src/models/quarantine_user_action_response.rs index f7678c7..a2bd283 100644 --- a/src/models/quarantine_user_action_response.rs +++ b/src/models/quarantine_user_action_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/ratelimited_response.rs b/src/models/ratelimited_response.rs new file mode 100644 index 0000000..3241f6b --- /dev/null +++ b/src/models/ratelimited_response.rs @@ -0,0 +1,75 @@ +//! # Discord HTTP API (Preview) - REST API Client +//! +//! Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. +//! +//! ## Metadata +//! +//! - **Copyright**: Copyright (c) 2025 Qntx +//! - **Author**: ΣX +//! - **Version**: 10 +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] +//! - **Generator Version**: 7.14.0 +//! +//!
+//! ⚠️ Important Disclaimer & Limitation of Liability +//!
+//! > **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +//! > to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +//! > and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +//! > of this software or its outputs. +//! > +//! > This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +//! > Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +//! > financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +//! > legal professionals before making decisions based on this software's outputs. +//! > +//! > Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +//! > other financial activities may result in substantial losses, including total loss of capital. The Developers are not +//! > liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +//! > outputs and ensuring their suitability for intended purposes. +//! > +//! > This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +//! > the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +//! > comply with third-party terms and conditions. +//! > +//! > Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +//! > their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +//! > Developers disclaim liability for any legal consequences arising from non-compliance. +//! > +//! > To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +//! > consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +//! > loss of profits, data, or business opportunities. +//! +//!
+use crate::models; +use serde::{Deserialize, Serialize}; + +/// RatelimitedResponse : Ratelimit error object returned by the Discord API +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct RatelimitedResponse { + /// Discord internal error code. See error code reference + #[serde(rename = "code")] + pub code: i32, + /// Human-readable error message + #[serde(rename = "message")] + pub message: String, + /// The number of seconds to wait before retrying your request + #[serde(rename = "retry_after")] + pub retry_after: f64, + /// Whether you are being ratelimited by the global ratelimit or a per-endpoint ratelimit + #[serde(rename = "global")] + pub global: bool, +} + +impl RatelimitedResponse { + /// Ratelimit error object returned by the Discord API + pub fn new(code: i32, message: String, retry_after: f64, global: bool) -> RatelimitedResponse { + RatelimitedResponse { + code, + message, + retry_after, + global, + } + } +} + diff --git a/src/models/resolved_objects_response.rs b/src/models/resolved_objects_response.rs index a77e7c3..0281a73 100644 --- a/src/models/resolved_objects_response.rs +++ b/src/models/resolved_objects_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -46,23 +46,23 @@ use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct ResolvedObjectsResponse { - #[serde(rename = "users")] - pub users: std::collections::HashMap, - #[serde(rename = "members")] - pub members: std::collections::HashMap, - #[serde(rename = "channels")] - pub channels: std::collections::HashMap, - #[serde(rename = "roles")] - pub roles: std::collections::HashMap, + #[serde(rename = "users", skip_serializing_if = "Option::is_none")] + pub users: Option>, + #[serde(rename = "members", skip_serializing_if = "Option::is_none")] + pub members: Option>, + #[serde(rename = "channels", skip_serializing_if = "Option::is_none")] + pub channels: Option>, + #[serde(rename = "roles", skip_serializing_if = "Option::is_none")] + pub roles: Option>, } impl ResolvedObjectsResponse { - pub fn new(users: std::collections::HashMap, members: std::collections::HashMap, channels: std::collections::HashMap, roles: std::collections::HashMap) -> ResolvedObjectsResponse { + pub fn new() -> ResolvedObjectsResponse { ResolvedObjectsResponse { - users, - members, - channels, - roles, + users: None, + members: None, + channels: None, + roles: None, } } } diff --git a/src/models/resource_channel_response.rs b/src/models/resource_channel_response.rs index 9f0861d..ad91781 100644 --- a/src/models/resource_channel_response.rs +++ b/src/models/resource_channel_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,10 +50,10 @@ pub struct ResourceChannelResponse { pub channel_id: String, #[serde(rename = "title")] pub title: String, - #[serde(rename = "emoji", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub emoji: Option>>, - #[serde(rename = "icon", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub icon: Option>, + #[serde(rename = "emoji", skip_serializing_if = "Option::is_none")] + pub emoji: Option>, + #[serde(rename = "icon", skip_serializing_if = "Option::is_none")] + pub icon: Option, #[serde(rename = "description")] pub description: String, } diff --git a/src/models/rich_embed.rs b/src/models/rich_embed.rs index 6fa51d3..eabdda2 100644 --- a/src/models/rich_embed.rs +++ b/src/models/rich_embed.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/rich_embed_author.rs b/src/models/rich_embed_author.rs index a2030d8..8469833 100644 --- a/src/models/rich_embed_author.rs +++ b/src/models/rich_embed_author.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/rich_embed_field.rs b/src/models/rich_embed_field.rs index 69c1f18..a06a563 100644 --- a/src/models/rich_embed_field.rs +++ b/src/models/rich_embed_field.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/rich_embed_footer.rs b/src/models/rich_embed_footer.rs index d7dd728..bf9fd29 100644 --- a/src/models/rich_embed_footer.rs +++ b/src/models/rich_embed_footer.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/rich_embed_image.rs b/src/models/rich_embed_image.rs index 47f0ce5..096b98c 100644 --- a/src/models/rich_embed_image.rs +++ b/src/models/rich_embed_image.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/rich_embed_provider.rs b/src/models/rich_embed_provider.rs index a69b762..eda9cb3 100644 --- a/src/models/rich_embed_provider.rs +++ b/src/models/rich_embed_provider.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/rich_embed_thumbnail.rs b/src/models/rich_embed_thumbnail.rs index f8d9b68..2401dbb 100644 --- a/src/models/rich_embed_thumbnail.rs +++ b/src/models/rich_embed_thumbnail.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/rich_embed_video.rs b/src/models/rich_embed_video.rs index f600c5f..cb0b2e8 100644 --- a/src/models/rich_embed_video.rs +++ b/src/models/rich_embed_video.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/role_select_component_for_message_request.rs b/src/models/role_select_component_for_message_request.rs index a8d1fc1..5ca6eda 100644 --- a/src/models/role_select_component_for_message_request.rs +++ b/src/models/role_select_component_for_message_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -48,6 +48,8 @@ use serde::{Deserialize, Serialize}; pub struct RoleSelectComponentForMessageRequest { #[serde(rename = "type")] pub r#type: i32, + #[serde(rename = "id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub id: Option>, #[serde(rename = "custom_id")] pub custom_id: String, #[serde(rename = "placeholder", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] @@ -58,6 +60,8 @@ pub struct RoleSelectComponentForMessageRequest { pub max_values: Option>, #[serde(rename = "disabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub disabled: Option>, + #[serde(rename = "required", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub required: Option>, #[serde(rename = "default_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub default_values: Option>>, } @@ -66,11 +70,13 @@ impl RoleSelectComponentForMessageRequest { pub fn new(r#type: i32, custom_id: String) -> RoleSelectComponentForMessageRequest { RoleSelectComponentForMessageRequest { r#type, + id: None, custom_id, placeholder: None, min_values: None, max_values: None, disabled: None, + required: None, default_values: None, } } diff --git a/src/models/role_select_component_for_modal_request.rs b/src/models/role_select_component_for_modal_request.rs new file mode 100644 index 0000000..ffb7199 --- /dev/null +++ b/src/models/role_select_component_for_modal_request.rs @@ -0,0 +1,84 @@ +//! # Discord HTTP API (Preview) - REST API Client +//! +//! Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. +//! +//! ## Metadata +//! +//! - **Copyright**: Copyright (c) 2025 Qntx +//! - **Author**: ΣX +//! - **Version**: 10 +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] +//! - **Generator Version**: 7.14.0 +//! +//!
+//! ⚠️ Important Disclaimer & Limitation of Liability +//!
+//! > **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +//! > to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +//! > and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +//! > of this software or its outputs. +//! > +//! > This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +//! > Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +//! > financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +//! > legal professionals before making decisions based on this software's outputs. +//! > +//! > Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +//! > other financial activities may result in substantial losses, including total loss of capital. The Developers are not +//! > liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +//! > outputs and ensuring their suitability for intended purposes. +//! > +//! > This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +//! > the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +//! > comply with third-party terms and conditions. +//! > +//! > Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +//! > their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +//! > Developers disclaim liability for any legal consequences arising from non-compliance. +//! > +//! > To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +//! > consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +//! > loss of profits, data, or business opportunities. +//! +//!
+use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct RoleSelectComponentForModalRequest { + #[serde(rename = "type")] + pub r#type: i32, + #[serde(rename = "id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub id: Option>, + #[serde(rename = "custom_id")] + pub custom_id: String, + #[serde(rename = "placeholder", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub placeholder: Option>, + #[serde(rename = "min_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub min_values: Option>, + #[serde(rename = "max_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub max_values: Option>, + #[serde(rename = "disabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub disabled: Option>, + #[serde(rename = "required", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub required: Option>, + #[serde(rename = "default_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub default_values: Option>>, +} + +impl RoleSelectComponentForModalRequest { + pub fn new(r#type: i32, custom_id: String) -> RoleSelectComponentForModalRequest { + RoleSelectComponentForModalRequest { + r#type, + id: None, + custom_id, + placeholder: None, + min_values: None, + max_values: None, + disabled: None, + required: None, + default_values: None, + } + } +} + diff --git a/src/models/role_select_component_response.rs b/src/models/role_select_component_response.rs index 988dea8..83a456c 100644 --- a/src/models/role_select_component_response.rs +++ b/src/models/role_select_component_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -52,16 +52,16 @@ pub struct RoleSelectComponentResponse { pub id: i32, #[serde(rename = "custom_id")] pub custom_id: String, - #[serde(rename = "placeholder", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub placeholder: Option>, + #[serde(rename = "placeholder", skip_serializing_if = "Option::is_none")] + pub placeholder: Option, #[serde(rename = "min_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub min_values: Option>, #[serde(rename = "max_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub max_values: Option>, - #[serde(rename = "disabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub disabled: Option>, - #[serde(rename = "default_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub default_values: Option>>, + #[serde(rename = "disabled", skip_serializing_if = "Option::is_none")] + pub disabled: Option, + #[serde(rename = "default_values", skip_serializing_if = "Option::is_none")] + pub default_values: Option>, } impl RoleSelectComponentResponse { diff --git a/src/models/role_select_default_value.rs b/src/models/role_select_default_value.rs index 89d93a8..16f0a6c 100644 --- a/src/models/role_select_default_value.rs +++ b/src/models/role_select_default_value.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/role_select_default_value_response.rs b/src/models/role_select_default_value_response.rs index ee1abcd..00e3949 100644 --- a/src/models/role_select_default_value_response.rs +++ b/src/models/role_select_default_value_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/scheduled_event_response.rs b/src/models/scheduled_event_response.rs index 5062aa3..c683b3d 100644 --- a/src/models/scheduled_event_response.rs +++ b/src/models/scheduled_event_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -58,8 +58,8 @@ pub struct ScheduledEventResponse { pub channel_id: Option, #[serde(rename = "creator_id", skip_serializing_if = "Option::is_none")] pub creator_id: Option, - #[serde(rename = "creator", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub creator: Option>>, + #[serde(rename = "creator", skip_serializing_if = "Option::is_none")] + pub creator: Option>, #[serde(rename = "image", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub image: Option>, #[serde(rename = "scheduled_start_time")] @@ -72,8 +72,8 @@ pub struct ScheduledEventResponse { pub entity_type: Option, #[serde(rename = "entity_id", skip_serializing_if = "Option::is_none")] pub entity_id: Option, - #[serde(rename = "user_count", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub user_count: Option>, + #[serde(rename = "user_count", skip_serializing_if = "Option::is_none")] + pub user_count: Option, #[serde(rename = "privacy_level", deserialize_with = "Option::deserialize")] pub privacy_level: Option, #[serde(rename = "user_rsvp", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] diff --git a/src/models/scheduled_event_user_response.rs b/src/models/scheduled_event_user_response.rs index 2c96442..e96144a 100644 --- a/src/models/scheduled_event_user_response.rs +++ b/src/models/scheduled_event_user_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,10 +50,10 @@ pub struct ScheduledEventUserResponse { pub guild_scheduled_event_id: String, #[serde(rename = "user_id")] pub user_id: String, - #[serde(rename = "user", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub user: Option>>, - #[serde(rename = "member", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub member: Option>>, + #[serde(rename = "user", skip_serializing_if = "Option::is_none")] + pub user: Option>, + #[serde(rename = "member", skip_serializing_if = "Option::is_none")] + pub member: Option>, } impl ScheduledEventUserResponse { diff --git a/src/models/sdk_message_request.rs b/src/models/sdk_message_request.rs index e4369d3..b859968 100644 --- a/src/models/sdk_message_request.rs +++ b/src/models/sdk_message_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -62,6 +62,8 @@ pub struct SdkMessageRequest { pub attachments: Option>>, #[serde(rename = "poll", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub poll: Option>>, + #[serde(rename = "shared_client_theme", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub shared_client_theme: Option>>, #[serde(rename = "confetti_potion", skip_serializing_if = "Option::is_none")] pub confetti_potion: Option, #[serde(rename = "message_reference", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] @@ -85,6 +87,7 @@ impl SdkMessageRequest { flags: None, attachments: None, poll: None, + shared_client_theme: None, confetti_potion: None, message_reference: None, nonce: None, diff --git a/src/models/section_component_for_message_request.rs b/src/models/section_component_for_message_request.rs index e0c932a..3f506f2 100644 --- a/src/models/section_component_for_message_request.rs +++ b/src/models/section_component_for_message_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -48,6 +48,8 @@ use serde::{Deserialize, Serialize}; pub struct SectionComponentForMessageRequest { #[serde(rename = "type")] pub r#type: i32, + #[serde(rename = "id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub id: Option>, #[serde(rename = "components")] pub components: Vec, #[serde(rename = "accessory")] @@ -58,6 +60,7 @@ impl SectionComponentForMessageRequest { pub fn new(r#type: i32, components: Vec, accessory: models::SectionComponentForMessageRequestAccessory) -> SectionComponentForMessageRequest { SectionComponentForMessageRequest { r#type, + id: None, components, accessory: Box::new(accessory), } diff --git a/src/models/section_component_for_message_request_accessory.rs b/src/models/section_component_for_message_request_accessory.rs index e0e43e1..d9d7223 100644 --- a/src/models/section_component_for_message_request_accessory.rs +++ b/src/models/section_component_for_message_request_accessory.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/section_component_response.rs b/src/models/section_component_response.rs index fd45d23..18ea20f 100644 --- a/src/models/section_component_response.rs +++ b/src/models/section_component_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/section_component_response_accessory.rs b/src/models/section_component_response_accessory.rs index 0f23145..584243d 100644 --- a/src/models/section_component_response_accessory.rs +++ b/src/models/section_component_response_accessory.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/separator_component_for_message_request.rs b/src/models/separator_component_for_message_request.rs index d14619e..909c602 100644 --- a/src/models/separator_component_for_message_request.rs +++ b/src/models/separator_component_for_message_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -48,6 +48,8 @@ use serde::{Deserialize, Serialize}; pub struct SeparatorComponentForMessageRequest { #[serde(rename = "type")] pub r#type: i32, + #[serde(rename = "id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub id: Option>, #[serde(rename = "spacing", skip_serializing_if = "Option::is_none")] pub spacing: Option, #[serde(rename = "divider", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] @@ -58,6 +60,7 @@ impl SeparatorComponentForMessageRequest { pub fn new(r#type: i32) -> SeparatorComponentForMessageRequest { SeparatorComponentForMessageRequest { r#type, + id: None, spacing: None, divider: None, } diff --git a/src/models/separator_component_response.rs b/src/models/separator_component_response.rs index e51eec0..d8b60e8 100644 --- a/src/models/separator_component_response.rs +++ b/src/models/separator_component_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/set_channel_permission_overwrite_request.rs b/src/models/set_channel_permission_overwrite_request.rs index 81b1294..f14fb0e 100644 --- a/src/models/set_channel_permission_overwrite_request.rs +++ b/src/models/set_channel_permission_overwrite_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/set_guild_application_command_permissions_request.rs b/src/models/set_guild_application_command_permissions_request.rs index 2ea0658..60286f6 100644 --- a/src/models/set_guild_application_command_permissions_request.rs +++ b/src/models/set_guild_application_command_permissions_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/settings_emoji_response.rs b/src/models/settings_emoji_response.rs index bb6e35d..c62c177 100644 --- a/src/models/settings_emoji_response.rs +++ b/src/models/settings_emoji_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,16 +50,16 @@ pub struct SettingsEmojiResponse { pub id: Option, #[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub name: Option>, - #[serde(rename = "animated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub animated: Option>, + #[serde(rename = "animated")] + pub animated: bool, } impl SettingsEmojiResponse { - pub fn new() -> SettingsEmojiResponse { + pub fn new(animated: bool) -> SettingsEmojiResponse { SettingsEmojiResponse { id: None, name: None, - animated: None, + animated, } } } diff --git a/src/models/slack_webhook.rs b/src/models/slack_webhook.rs index da6119b..022ca72 100644 --- a/src/models/slack_webhook.rs +++ b/src/models/slack_webhook.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/soundboard_create_request.rs b/src/models/soundboard_create_request.rs index 1db4cfc..05fb509 100644 --- a/src/models/soundboard_create_request.rs +++ b/src/models/soundboard_create_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/soundboard_patch_request_partial.rs b/src/models/soundboard_patch_request_partial.rs index 8f9a986..e3c7459 100644 --- a/src/models/soundboard_patch_request_partial.rs +++ b/src/models/soundboard_patch_request_partial.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/soundboard_sound_response.rs b/src/models/soundboard_sound_response.rs index 5787ecd..3d25129 100644 --- a/src/models/soundboard_sound_response.rs +++ b/src/models/soundboard_sound_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -60,8 +60,8 @@ pub struct SoundboardSoundResponse { pub guild_id: Option, #[serde(rename = "available")] pub available: bool, - #[serde(rename = "user", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub user: Option>>, + #[serde(rename = "user", skip_serializing_if = "Option::is_none")] + pub user: Option>, } impl SoundboardSoundResponse { diff --git a/src/models/soundboard_sound_send_request.rs b/src/models/soundboard_sound_send_request.rs index c11e982..2483fea 100644 --- a/src/models/soundboard_sound_send_request.rs +++ b/src/models/soundboard_sound_send_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/spam_link_rule_response.rs b/src/models/spam_link_rule_response.rs index 4ea73b2..0fff893 100644 --- a/src/models/spam_link_rule_response.rs +++ b/src/models/spam_link_rule_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -60,18 +60,18 @@ pub struct SpamLinkRuleResponse { pub actions: Vec, #[serde(rename = "trigger_type")] pub trigger_type: i32, - #[serde(rename = "enabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub enabled: Option>, - #[serde(rename = "exempt_roles", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub exempt_roles: Option>>, - #[serde(rename = "exempt_channels", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub exempt_channels: Option>>, + #[serde(rename = "enabled")] + pub enabled: bool, + #[serde(rename = "exempt_roles")] + pub exempt_roles: Vec, + #[serde(rename = "exempt_channels")] + pub exempt_channels: Vec, #[serde(rename = "trigger_metadata")] pub trigger_metadata: serde_json::Value, } impl SpamLinkRuleResponse { - pub fn new(id: String, guild_id: String, creator_id: String, name: String, event_type: i32, actions: Vec, trigger_type: i32, trigger_metadata: serde_json::Value) -> SpamLinkRuleResponse { + pub fn new(id: String, guild_id: String, creator_id: String, name: String, event_type: i32, actions: Vec, trigger_type: i32, enabled: bool, exempt_roles: Vec, exempt_channels: Vec, trigger_metadata: serde_json::Value) -> SpamLinkRuleResponse { SpamLinkRuleResponse { id, guild_id, @@ -80,9 +80,9 @@ impl SpamLinkRuleResponse { event_type, actions, trigger_type, - enabled: None, - exempt_roles: None, - exempt_channels: None, + enabled, + exempt_roles, + exempt_channels, trigger_metadata, } } diff --git a/src/models/stage_instance_response.rs b/src/models/stage_instance_response.rs index b5e36e8..07b854c 100644 --- a/src/models/stage_instance_response.rs +++ b/src/models/stage_instance_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -56,21 +56,21 @@ pub struct StageInstanceResponse { pub privacy_level: i32, #[serde(rename = "id")] pub id: String, - #[serde(rename = "discoverable_disabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub discoverable_disabled: Option>, + #[serde(rename = "discoverable_disabled")] + pub discoverable_disabled: bool, #[serde(rename = "guild_scheduled_event_id", skip_serializing_if = "Option::is_none")] pub guild_scheduled_event_id: Option, } impl StageInstanceResponse { - pub fn new(guild_id: String, channel_id: String, topic: String, privacy_level: i32, id: String) -> StageInstanceResponse { + pub fn new(guild_id: String, channel_id: String, topic: String, privacy_level: i32, id: String, discoverable_disabled: bool) -> StageInstanceResponse { StageInstanceResponse { guild_id, channel_id, topic, privacy_level, id, - discoverable_disabled: None, + discoverable_disabled, guild_scheduled_event_id: None, } } diff --git a/src/models/stage_scheduled_event_create_request.rs b/src/models/stage_scheduled_event_create_request.rs index 5ea1ca8..892179a 100644 --- a/src/models/stage_scheduled_event_create_request.rs +++ b/src/models/stage_scheduled_event_create_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/stage_scheduled_event_patch_request_partial.rs b/src/models/stage_scheduled_event_patch_request_partial.rs index d573c7e..a6470cb 100644 --- a/src/models/stage_scheduled_event_patch_request_partial.rs +++ b/src/models/stage_scheduled_event_patch_request_partial.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/stage_scheduled_event_response.rs b/src/models/stage_scheduled_event_response.rs index be74943..8cbde4d 100644 --- a/src/models/stage_scheduled_event_response.rs +++ b/src/models/stage_scheduled_event_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -58,8 +58,8 @@ pub struct StageScheduledEventResponse { pub channel_id: Option, #[serde(rename = "creator_id", skip_serializing_if = "Option::is_none")] pub creator_id: Option, - #[serde(rename = "creator", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub creator: Option>>, + #[serde(rename = "creator", skip_serializing_if = "Option::is_none")] + pub creator: Option>, #[serde(rename = "image", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub image: Option>, #[serde(rename = "scheduled_start_time")] @@ -72,8 +72,8 @@ pub struct StageScheduledEventResponse { pub entity_type: Option, #[serde(rename = "entity_id", skip_serializing_if = "Option::is_none")] pub entity_id: Option, - #[serde(rename = "user_count", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub user_count: Option>, + #[serde(rename = "user_count", skip_serializing_if = "Option::is_none")] + pub user_count: Option, #[serde(rename = "privacy_level", deserialize_with = "Option::deserialize")] pub privacy_level: Option, #[serde(rename = "user_rsvp", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] diff --git a/src/models/standard_sticker_response.rs b/src/models/standard_sticker_response.rs index 158de1c..8dcf387 100644 --- a/src/models/standard_sticker_response.rs +++ b/src/models/standard_sticker_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/sticker_pack_collection_response.rs b/src/models/sticker_pack_collection_response.rs index d4d277b..1c3b4d8 100644 --- a/src/models/sticker_pack_collection_response.rs +++ b/src/models/sticker_pack_collection_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/sticker_pack_response.rs b/src/models/sticker_pack_response.rs index ff04001..224489d 100644 --- a/src/models/sticker_pack_response.rs +++ b/src/models/sticker_pack_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/string_select_component_for_message_request.rs b/src/models/string_select_component_for_message_request.rs index f564328..63c0458 100644 --- a/src/models/string_select_component_for_message_request.rs +++ b/src/models/string_select_component_for_message_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -48,6 +48,8 @@ use serde::{Deserialize, Serialize}; pub struct StringSelectComponentForMessageRequest { #[serde(rename = "type")] pub r#type: i32, + #[serde(rename = "id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub id: Option>, #[serde(rename = "custom_id")] pub custom_id: String, #[serde(rename = "placeholder", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] @@ -58,19 +60,23 @@ pub struct StringSelectComponentForMessageRequest { pub max_values: Option>, #[serde(rename = "disabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub disabled: Option>, + #[serde(rename = "required", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub required: Option>, #[serde(rename = "options")] - pub options: Vec, + pub options: Vec, } impl StringSelectComponentForMessageRequest { - pub fn new(r#type: i32, custom_id: String, options: Vec) -> StringSelectComponentForMessageRequest { + pub fn new(r#type: i32, custom_id: String, options: Vec) -> StringSelectComponentForMessageRequest { StringSelectComponentForMessageRequest { r#type, + id: None, custom_id, placeholder: None, min_values: None, max_values: None, disabled: None, + required: None, options, } } diff --git a/src/models/string_select_component_for_modal_request.rs b/src/models/string_select_component_for_modal_request.rs new file mode 100644 index 0000000..458b83e --- /dev/null +++ b/src/models/string_select_component_for_modal_request.rs @@ -0,0 +1,84 @@ +//! # Discord HTTP API (Preview) - REST API Client +//! +//! Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. +//! +//! ## Metadata +//! +//! - **Copyright**: Copyright (c) 2025 Qntx +//! - **Author**: ΣX +//! - **Version**: 10 +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] +//! - **Generator Version**: 7.14.0 +//! +//!
+//! ⚠️ Important Disclaimer & Limitation of Liability +//!
+//! > **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +//! > to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +//! > and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +//! > of this software or its outputs. +//! > +//! > This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +//! > Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +//! > financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +//! > legal professionals before making decisions based on this software's outputs. +//! > +//! > Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +//! > other financial activities may result in substantial losses, including total loss of capital. The Developers are not +//! > liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +//! > outputs and ensuring their suitability for intended purposes. +//! > +//! > This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +//! > the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +//! > comply with third-party terms and conditions. +//! > +//! > Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +//! > their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +//! > Developers disclaim liability for any legal consequences arising from non-compliance. +//! > +//! > To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +//! > consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +//! > loss of profits, data, or business opportunities. +//! +//!
+use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct StringSelectComponentForModalRequest { + #[serde(rename = "type")] + pub r#type: i32, + #[serde(rename = "id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub id: Option>, + #[serde(rename = "custom_id")] + pub custom_id: String, + #[serde(rename = "placeholder", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub placeholder: Option>, + #[serde(rename = "min_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub min_values: Option>, + #[serde(rename = "max_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub max_values: Option>, + #[serde(rename = "disabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub disabled: Option>, + #[serde(rename = "required", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub required: Option>, + #[serde(rename = "options")] + pub options: Vec, +} + +impl StringSelectComponentForModalRequest { + pub fn new(r#type: i32, custom_id: String, options: Vec) -> StringSelectComponentForModalRequest { + StringSelectComponentForModalRequest { + r#type, + id: None, + custom_id, + placeholder: None, + min_values: None, + max_values: None, + disabled: None, + required: None, + options, + } + } +} + diff --git a/src/models/string_select_component_response.rs b/src/models/string_select_component_response.rs index 210fc5c..9a186bc 100644 --- a/src/models/string_select_component_response.rs +++ b/src/models/string_select_component_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -52,14 +52,14 @@ pub struct StringSelectComponentResponse { pub id: i32, #[serde(rename = "custom_id")] pub custom_id: String, - #[serde(rename = "placeholder", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub placeholder: Option>, + #[serde(rename = "placeholder", skip_serializing_if = "Option::is_none")] + pub placeholder: Option, #[serde(rename = "min_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub min_values: Option>, #[serde(rename = "max_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub max_values: Option>, - #[serde(rename = "disabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub disabled: Option>, + #[serde(rename = "disabled", skip_serializing_if = "Option::is_none")] + pub disabled: Option, #[serde(rename = "options")] pub options: Vec, } diff --git a/src/models/string_select_option_for_message_request.rs b/src/models/string_select_option_for_request.rs similarity index 92% rename from src/models/string_select_option_for_message_request.rs rename to src/models/string_select_option_for_request.rs index 3a7211f..ff4c93f 100644 --- a/src/models/string_select_option_for_message_request.rs +++ b/src/models/string_select_option_for_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -45,7 +45,7 @@ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct StringSelectOptionForMessageRequest { +pub struct StringSelectOptionForRequest { #[serde(rename = "label")] pub label: String, #[serde(rename = "value")] @@ -55,12 +55,12 @@ pub struct StringSelectOptionForMessageRequest { #[serde(rename = "default", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub default: Option>, #[serde(rename = "emoji", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub emoji: Option>>, + pub emoji: Option>>, } -impl StringSelectOptionForMessageRequest { - pub fn new(label: String, value: String) -> StringSelectOptionForMessageRequest { - StringSelectOptionForMessageRequest { +impl StringSelectOptionForRequest { + pub fn new(label: String, value: String) -> StringSelectOptionForRequest { + StringSelectOptionForRequest { label, value, description: None, diff --git a/src/models/string_select_option_response.rs b/src/models/string_select_option_response.rs index fbf8bbf..495e373 100644 --- a/src/models/string_select_option_response.rs +++ b/src/models/string_select_option_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,12 +50,12 @@ pub struct StringSelectOptionResponse { pub label: String, #[serde(rename = "value")] pub value: String, - #[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub description: Option>, - #[serde(rename = "emoji", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub emoji: Option>>, - #[serde(rename = "default", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub default: Option>, + #[serde(rename = "description", skip_serializing_if = "Option::is_none")] + pub description: Option, + #[serde(rename = "emoji", skip_serializing_if = "Option::is_none")] + pub emoji: Option>, + #[serde(rename = "default", skip_serializing_if = "Option::is_none")] + pub default: Option, } impl StringSelectOptionResponse { diff --git a/src/models/team_member_response.rs b/src/models/team_member_response.rs index bbd04b8..7ba7ee0 100644 --- a/src/models/team_member_response.rs +++ b/src/models/team_member_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/team_response.rs b/src/models/team_response.rs index d88fb15..52f0c51 100644 --- a/src/models/team_response.rs +++ b/src/models/team_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/text_display_component_for_message_request.rs b/src/models/text_display_component_for_message_request.rs index 6f33b62..7bfb5c8 100644 --- a/src/models/text_display_component_for_message_request.rs +++ b/src/models/text_display_component_for_message_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -48,6 +48,8 @@ use serde::{Deserialize, Serialize}; pub struct TextDisplayComponentForMessageRequest { #[serde(rename = "type")] pub r#type: i32, + #[serde(rename = "id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub id: Option>, #[serde(rename = "content")] pub content: String, } @@ -56,6 +58,7 @@ impl TextDisplayComponentForMessageRequest { pub fn new(r#type: i32, content: String) -> TextDisplayComponentForMessageRequest { TextDisplayComponentForMessageRequest { r#type, + id: None, content, } } diff --git a/src/models/text_display_component_for_modal_request.rs b/src/models/text_display_component_for_modal_request.rs new file mode 100644 index 0000000..3c0cf87 --- /dev/null +++ b/src/models/text_display_component_for_modal_request.rs @@ -0,0 +1,66 @@ +//! # Discord HTTP API (Preview) - REST API Client +//! +//! Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. +//! +//! ## Metadata +//! +//! - **Copyright**: Copyright (c) 2025 Qntx +//! - **Author**: ΣX +//! - **Version**: 10 +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] +//! - **Generator Version**: 7.14.0 +//! +//!
+//! ⚠️ Important Disclaimer & Limitation of Liability +//!
+//! > **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +//! > to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +//! > and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +//! > of this software or its outputs. +//! > +//! > This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +//! > Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +//! > financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +//! > legal professionals before making decisions based on this software's outputs. +//! > +//! > Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +//! > other financial activities may result in substantial losses, including total loss of capital. The Developers are not +//! > liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +//! > outputs and ensuring their suitability for intended purposes. +//! > +//! > This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +//! > the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +//! > comply with third-party terms and conditions. +//! > +//! > Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +//! > their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +//! > Developers disclaim liability for any legal consequences arising from non-compliance. +//! > +//! > To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +//! > consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +//! > loss of profits, data, or business opportunities. +//! +//!
+use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct TextDisplayComponentForModalRequest { + #[serde(rename = "type")] + pub r#type: i32, + #[serde(rename = "id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub id: Option>, + #[serde(rename = "content")] + pub content: String, +} + +impl TextDisplayComponentForModalRequest { + pub fn new(r#type: i32, content: String) -> TextDisplayComponentForModalRequest { + TextDisplayComponentForModalRequest { + r#type, + id: None, + content, + } + } +} + diff --git a/src/models/text_display_component_response.rs b/src/models/text_display_component_response.rs index 8f1d328..1186ce3 100644 --- a/src/models/text_display_component_response.rs +++ b/src/models/text_display_component_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/text_input_component_for_modal_request.rs b/src/models/text_input_component_for_modal_request.rs index 1b5a946..ad13a17 100644 --- a/src/models/text_input_component_for_modal_request.rs +++ b/src/models/text_input_component_for_modal_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -48,12 +48,14 @@ use serde::{Deserialize, Serialize}; pub struct TextInputComponentForModalRequest { #[serde(rename = "type")] pub r#type: i32, + #[serde(rename = "id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub id: Option>, #[serde(rename = "custom_id")] pub custom_id: String, #[serde(rename = "style")] pub style: i32, - #[serde(rename = "label")] - pub label: String, + #[serde(rename = "label", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub label: Option>, #[serde(rename = "value", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub value: Option>, #[serde(rename = "placeholder", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] @@ -67,12 +69,13 @@ pub struct TextInputComponentForModalRequest { } impl TextInputComponentForModalRequest { - pub fn new(r#type: i32, custom_id: String, style: i32, label: String) -> TextInputComponentForModalRequest { + pub fn new(r#type: i32, custom_id: String, style: i32) -> TextInputComponentForModalRequest { TextInputComponentForModalRequest { r#type, + id: None, custom_id, style, - label, + label: None, value: None, placeholder: None, required: None, diff --git a/src/models/text_input_component_response.rs b/src/models/text_input_component_response.rs index 18af3b1..59301f6 100644 --- a/src/models/text_input_component_response.rs +++ b/src/models/text_input_component_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -56,12 +56,12 @@ pub struct TextInputComponentResponse { pub style: i32, #[serde(rename = "label", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub label: Option>, - #[serde(rename = "value", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub value: Option>, - #[serde(rename = "placeholder", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub placeholder: Option>, - #[serde(rename = "required", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub required: Option>, + #[serde(rename = "value", skip_serializing_if = "Option::is_none")] + pub value: Option, + #[serde(rename = "placeholder", skip_serializing_if = "Option::is_none")] + pub placeholder: Option, + #[serde(rename = "required", skip_serializing_if = "Option::is_none")] + pub required: Option, #[serde(rename = "min_length", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub min_length: Option>, #[serde(rename = "max_length", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] diff --git a/src/models/thread_member_response.rs b/src/models/thread_member_response.rs index 409e753..366ae7a 100644 --- a/src/models/thread_member_response.rs +++ b/src/models/thread_member_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -54,8 +54,8 @@ pub struct ThreadMemberResponse { pub join_timestamp: String, #[serde(rename = "flags")] pub flags: i32, - #[serde(rename = "member", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub member: Option>>, + #[serde(rename = "member", skip_serializing_if = "Option::is_none")] + pub member: Option>, } impl ThreadMemberResponse { diff --git a/src/models/thread_metadata_response.rs b/src/models/thread_metadata_response.rs index 64c7f94..819adbf 100644 --- a/src/models/thread_metadata_response.rs +++ b/src/models/thread_metadata_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -54,10 +54,10 @@ pub struct ThreadMetadataResponse { pub auto_archive_duration: i32, #[serde(rename = "locked")] pub locked: bool, - #[serde(rename = "create_timestamp", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub create_timestamp: Option>, - #[serde(rename = "invitable", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub invitable: Option>, + #[serde(rename = "create_timestamp", skip_serializing_if = "Option::is_none")] + pub create_timestamp: Option, + #[serde(rename = "invitable", skip_serializing_if = "Option::is_none")] + pub invitable: Option, } impl ThreadMetadataResponse { diff --git a/src/models/thread_response.rs b/src/models/thread_response.rs index 9bda8c9..4364136 100644 --- a/src/models/thread_response.rs +++ b/src/models/thread_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -62,12 +62,12 @@ pub struct ThreadResponse { pub name: String, #[serde(rename = "parent_id", skip_serializing_if = "Option::is_none")] pub parent_id: Option, - #[serde(rename = "rate_limit_per_user", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub rate_limit_per_user: Option>, - #[serde(rename = "bitrate", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub bitrate: Option>, - #[serde(rename = "user_limit", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub user_limit: Option>, + #[serde(rename = "rate_limit_per_user", skip_serializing_if = "Option::is_none")] + pub rate_limit_per_user: Option, + #[serde(rename = "bitrate", skip_serializing_if = "Option::is_none")] + pub bitrate: Option, + #[serde(rename = "user_limit", skip_serializing_if = "Option::is_none")] + pub user_limit: Option, #[serde(rename = "rtc_region", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub rtc_region: Option>, #[serde(rename = "video_quality_mode", skip_serializing_if = "Option::is_none")] @@ -76,22 +76,22 @@ pub struct ThreadResponse { pub permissions: Option>, #[serde(rename = "owner_id")] pub owner_id: String, - #[serde(rename = "thread_metadata", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub thread_metadata: Option>>, + #[serde(rename = "thread_metadata")] + pub thread_metadata: Box, #[serde(rename = "message_count")] pub message_count: i32, #[serde(rename = "member_count")] pub member_count: i32, #[serde(rename = "total_message_sent")] pub total_message_sent: i32, - #[serde(rename = "applied_tags", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub applied_tags: Option>>, - #[serde(rename = "member", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub member: Option>>, + #[serde(rename = "applied_tags", skip_serializing_if = "Option::is_none")] + pub applied_tags: Option>, + #[serde(rename = "member", skip_serializing_if = "Option::is_none")] + pub member: Option>, } impl ThreadResponse { - pub fn new(id: String, r#type: i32, flags: i32, guild_id: String, name: String, owner_id: String, message_count: i32, member_count: i32, total_message_sent: i32) -> ThreadResponse { + pub fn new(id: String, r#type: i32, flags: i32, guild_id: String, name: String, owner_id: String, thread_metadata: models::ThreadMetadataResponse, message_count: i32, member_count: i32, total_message_sent: i32) -> ThreadResponse { ThreadResponse { id, r#type, @@ -108,7 +108,7 @@ impl ThreadResponse { video_quality_mode: None, permissions: None, owner_id, - thread_metadata: None, + thread_metadata: Box::new(thread_metadata), message_count, member_count, total_message_sent, diff --git a/src/models/thread_search_response.rs b/src/models/thread_search_response.rs index 8a80a78..aefce12 100644 --- a/src/models/thread_search_response.rs +++ b/src/models/thread_search_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,22 +50,22 @@ pub struct ThreadSearchResponse { pub threads: Vec, #[serde(rename = "members")] pub members: Vec, - #[serde(rename = "has_more", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub has_more: Option>, - #[serde(rename = "first_messages", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub first_messages: Option>>, - #[serde(rename = "total_results", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub total_results: Option>, + #[serde(rename = "has_more")] + pub has_more: bool, + #[serde(rename = "first_messages", skip_serializing_if = "Option::is_none")] + pub first_messages: Option>, + #[serde(rename = "total_results")] + pub total_results: i32, } impl ThreadSearchResponse { - pub fn new(threads: Vec, members: Vec) -> ThreadSearchResponse { + pub fn new(threads: Vec, members: Vec, has_more: bool, total_results: i32) -> ThreadSearchResponse { ThreadSearchResponse { threads, members, - has_more: None, + has_more, first_messages: None, - total_results: None, + total_results, } } } diff --git a/src/models/thread_search_tag_parameter.rs b/src/models/thread_search_tag_parameter.rs index ebb3f73..2d4690b 100644 --- a/src/models/thread_search_tag_parameter.rs +++ b/src/models/thread_search_tag_parameter.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/threads_response.rs b/src/models/threads_response.rs index 104291b..3380fa1 100644 --- a/src/models/threads_response.rs +++ b/src/models/threads_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -50,18 +50,18 @@ pub struct ThreadsResponse { pub threads: Vec, #[serde(rename = "members")] pub members: Vec, - #[serde(rename = "has_more", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub has_more: Option>, - #[serde(rename = "first_messages", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub first_messages: Option>>, + #[serde(rename = "has_more")] + pub has_more: bool, + #[serde(rename = "first_messages", skip_serializing_if = "Option::is_none")] + pub first_messages: Option>, } impl ThreadsResponse { - pub fn new(threads: Vec, members: Vec) -> ThreadsResponse { + pub fn new(threads: Vec, members: Vec, has_more: bool) -> ThreadsResponse { ThreadsResponse { threads, members, - has_more: None, + has_more, first_messages: None, } } diff --git a/src/models/thumbnail_component_for_message_request.rs b/src/models/thumbnail_component_for_message_request.rs index aff7cca..e116c7b 100644 --- a/src/models/thumbnail_component_for_message_request.rs +++ b/src/models/thumbnail_component_for_message_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -48,6 +48,8 @@ use serde::{Deserialize, Serialize}; pub struct ThumbnailComponentForMessageRequest { #[serde(rename = "type")] pub r#type: i32, + #[serde(rename = "id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub id: Option>, #[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub description: Option>, #[serde(rename = "spoiler", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] @@ -60,6 +62,7 @@ impl ThumbnailComponentForMessageRequest { pub fn new(r#type: i32, media: models::UnfurledMediaRequest) -> ThumbnailComponentForMessageRequest { ThumbnailComponentForMessageRequest { r#type, + id: None, description: None, spoiler: None, media: Box::new(media), diff --git a/src/models/thumbnail_component_response.rs b/src/models/thumbnail_component_response.rs index 707f216..c99e544 100644 --- a/src/models/thumbnail_component_response.rs +++ b/src/models/thumbnail_component_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/unfurled_media_request.rs b/src/models/unfurled_media_request.rs index 5c47588..ebf914d 100644 --- a/src/models/unfurled_media_request.rs +++ b/src/models/unfurled_media_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/unfurled_media_request_with_attachment_reference_required.rs b/src/models/unfurled_media_request_with_attachment_reference_required.rs index 6400027..a908a42 100644 --- a/src/models/unfurled_media_request_with_attachment_reference_required.rs +++ b/src/models/unfurled_media_request_with_attachment_reference_required.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/unfurled_media_response.rs b/src/models/unfurled_media_response.rs index 0e955dd..452afa1 100644 --- a/src/models/unfurled_media_response.rs +++ b/src/models/unfurled_media_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/update_application_emoji_request.rs b/src/models/update_application_emoji_request.rs index 2ba1343..63f866d 100644 --- a/src/models/update_application_emoji_request.rs +++ b/src/models/update_application_emoji_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/update_application_user_role_connection_request.rs b/src/models/update_application_user_role_connection_request.rs index c6af909..9246e2a 100644 --- a/src/models/update_application_user_role_connection_request.rs +++ b/src/models/update_application_user_role_connection_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/update_auto_moderation_rule_request.rs b/src/models/update_auto_moderation_rule_request.rs index 3e8d70b..0a90b7a 100644 --- a/src/models/update_auto_moderation_rule_request.rs +++ b/src/models/update_auto_moderation_rule_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/update_channel_request.rs b/src/models/update_channel_request.rs index ead5177..7759016 100644 --- a/src/models/update_channel_request.rs +++ b/src/models/update_channel_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/update_default_reaction_emoji_request.rs b/src/models/update_default_reaction_emoji_request.rs index f89cfda..7c83170 100644 --- a/src/models/update_default_reaction_emoji_request.rs +++ b/src/models/update_default_reaction_emoji_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/update_dm_request_partial.rs b/src/models/update_dm_request_partial.rs index 8f08447..85edd98 100644 --- a/src/models/update_dm_request_partial.rs +++ b/src/models/update_dm_request_partial.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/update_group_dm_request_partial.rs b/src/models/update_group_dm_request_partial.rs index 501eabd..67cf6d4 100644 --- a/src/models/update_group_dm_request_partial.rs +++ b/src/models/update_group_dm_request_partial.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/update_guild_channel_request_partial.rs b/src/models/update_guild_channel_request_partial.rs index 1c4ddb7..626c944 100644 --- a/src/models/update_guild_channel_request_partial.rs +++ b/src/models/update_guild_channel_request_partial.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/update_guild_emoji_request.rs b/src/models/update_guild_emoji_request.rs index c3f5a92..e7e9313 100644 --- a/src/models/update_guild_emoji_request.rs +++ b/src/models/update_guild_emoji_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/update_guild_member_request.rs b/src/models/update_guild_member_request.rs index 5eb88b3..36a330b 100644 --- a/src/models/update_guild_member_request.rs +++ b/src/models/update_guild_member_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/update_guild_onboarding_request.rs b/src/models/update_guild_onboarding_request.rs index ce39205..799b663 100644 --- a/src/models/update_guild_onboarding_request.rs +++ b/src/models/update_guild_onboarding_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/update_guild_scheduled_event_request.rs b/src/models/update_guild_scheduled_event_request.rs index d5b75e4..4c86b48 100644 --- a/src/models/update_guild_scheduled_event_request.rs +++ b/src/models/update_guild_scheduled_event_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/update_guild_sticker_request.rs b/src/models/update_guild_sticker_request.rs index b7afb76..149fcc9 100644 --- a/src/models/update_guild_sticker_request.rs +++ b/src/models/update_guild_sticker_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/update_guild_template_request.rs b/src/models/update_guild_template_request.rs index 612e6fe..b93d89c 100644 --- a/src/models/update_guild_template_request.rs +++ b/src/models/update_guild_template_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/update_guild_widget_settings_request.rs b/src/models/update_guild_widget_settings_request.rs index d61dbf6..9709c3e 100644 --- a/src/models/update_guild_widget_settings_request.rs +++ b/src/models/update_guild_widget_settings_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/update_message_interaction_callback_request.rs b/src/models/update_message_interaction_callback_request.rs index 8626125..ac68da3 100644 --- a/src/models/update_message_interaction_callback_request.rs +++ b/src/models/update_message_interaction_callback_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/update_message_interaction_callback_response.rs b/src/models/update_message_interaction_callback_response.rs index 73f2973..a767bf3 100644 --- a/src/models/update_message_interaction_callback_response.rs +++ b/src/models/update_message_interaction_callback_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/update_my_guild_member_request.rs b/src/models/update_my_guild_member_request.rs index f936b41..19cbbab 100644 --- a/src/models/update_my_guild_member_request.rs +++ b/src/models/update_my_guild_member_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/update_onboarding_prompt_request.rs b/src/models/update_onboarding_prompt_request.rs index b5f66ee..0c2005d 100644 --- a/src/models/update_onboarding_prompt_request.rs +++ b/src/models/update_onboarding_prompt_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/bulk_update_guild_roles_request_inner.rs b/src/models/update_role_positions_request.rs similarity index 93% rename from src/models/bulk_update_guild_roles_request_inner.rs rename to src/models/update_role_positions_request.rs index 05a7a1b..3f7382a 100644 --- a/src/models/bulk_update_guild_roles_request_inner.rs +++ b/src/models/update_role_positions_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -45,16 +45,16 @@ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct BulkUpdateGuildRolesRequestInner { +pub struct UpdateRolePositionsRequest { #[serde(rename = "id", skip_serializing_if = "Option::is_none")] pub id: Option, #[serde(rename = "position", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub position: Option>, } -impl BulkUpdateGuildRolesRequestInner { - pub fn new() -> BulkUpdateGuildRolesRequestInner { - BulkUpdateGuildRolesRequestInner { +impl UpdateRolePositionsRequest { + pub fn new() -> UpdateRolePositionsRequest { + UpdateRolePositionsRequest { id: None, position: None, } diff --git a/src/models/create_guild_request_role_item.rs b/src/models/update_role_request_partial.rs similarity index 91% rename from src/models/create_guild_request_role_item.rs rename to src/models/update_role_request_partial.rs index 3a5d58e..2b0abb9 100644 --- a/src/models/create_guild_request_role_item.rs +++ b/src/models/update_role_request_partial.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -45,9 +45,7 @@ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct CreateGuildRequestRoleItem { - #[serde(rename = "id")] - pub id: i32, +pub struct UpdateRoleRequestPartial { #[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub name: Option>, #[serde(rename = "permissions", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] @@ -58,19 +56,21 @@ pub struct CreateGuildRequestRoleItem { pub hoist: Option>, #[serde(rename = "mentionable", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub mentionable: Option>, + #[serde(rename = "icon", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub icon: Option>, #[serde(rename = "unicode_emoji", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub unicode_emoji: Option>, } -impl CreateGuildRequestRoleItem { - pub fn new(id: i32) -> CreateGuildRequestRoleItem { - CreateGuildRequestRoleItem { - id, +impl UpdateRoleRequestPartial { + pub fn new() -> UpdateRoleRequestPartial { + UpdateRoleRequestPartial { name: None, permissions: None, color: None, hoist: None, mentionable: None, + icon: None, unicode_emoji: None, } } diff --git a/src/models/update_self_voice_state_request.rs b/src/models/update_self_voice_state_request_partial.rs similarity index 93% rename from src/models/update_self_voice_state_request.rs rename to src/models/update_self_voice_state_request_partial.rs index 4e78551..b9b3f6e 100644 --- a/src/models/update_self_voice_state_request.rs +++ b/src/models/update_self_voice_state_request_partial.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -45,7 +45,7 @@ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct UpdateSelfVoiceStateRequest { +pub struct UpdateSelfVoiceStateRequestPartial { #[serde(rename = "request_to_speak_timestamp", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub request_to_speak_timestamp: Option>, #[serde(rename = "suppress", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] @@ -54,9 +54,9 @@ pub struct UpdateSelfVoiceStateRequest { pub channel_id: Option, } -impl UpdateSelfVoiceStateRequest { - pub fn new() -> UpdateSelfVoiceStateRequest { - UpdateSelfVoiceStateRequest { +impl UpdateSelfVoiceStateRequestPartial { + pub fn new() -> UpdateSelfVoiceStateRequestPartial { + UpdateSelfVoiceStateRequestPartial { request_to_speak_timestamp: None, suppress: None, channel_id: None, diff --git a/src/models/update_stage_instance_request.rs b/src/models/update_stage_instance_request.rs index 0cd15e8..027d96a 100644 --- a/src/models/update_stage_instance_request.rs +++ b/src/models/update_stage_instance_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/update_thread_request_partial.rs b/src/models/update_thread_request_partial.rs index 4a6c1ff..54b758c 100644 --- a/src/models/update_thread_request_partial.rs +++ b/src/models/update_thread_request_partial.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/update_thread_tag_request.rs b/src/models/update_thread_tag_request.rs index e6cd9bd..8677d9e 100644 --- a/src/models/update_thread_tag_request.rs +++ b/src/models/update_thread_tag_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/update_voice_state_request.rs b/src/models/update_voice_state_request_partial.rs similarity index 93% rename from src/models/update_voice_state_request.rs rename to src/models/update_voice_state_request_partial.rs index 18df71e..e1c7d2e 100644 --- a/src/models/update_voice_state_request.rs +++ b/src/models/update_voice_state_request_partial.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -45,16 +45,16 @@ use crate::models; use serde::{Deserialize, Serialize}; #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] -pub struct UpdateVoiceStateRequest { +pub struct UpdateVoiceStateRequestPartial { #[serde(rename = "suppress", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub suppress: Option>, #[serde(rename = "channel_id", skip_serializing_if = "Option::is_none")] pub channel_id: Option, } -impl UpdateVoiceStateRequest { - pub fn new() -> UpdateVoiceStateRequest { - UpdateVoiceStateRequest { +impl UpdateVoiceStateRequestPartial { + pub fn new() -> UpdateVoiceStateRequestPartial { + UpdateVoiceStateRequestPartial { suppress: None, channel_id: None, } diff --git a/src/models/update_webhook_by_token_request.rs b/src/models/update_webhook_by_token_request.rs index 42c393e..6f85008 100644 --- a/src/models/update_webhook_by_token_request.rs +++ b/src/models/update_webhook_by_token_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/update_webhook_request.rs b/src/models/update_webhook_request.rs index 8322db2..29136d8 100644 --- a/src/models/update_webhook_request.rs +++ b/src/models/update_webhook_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/user_avatar_decoration_response.rs b/src/models/user_avatar_decoration_response.rs index 1177ef5..79c94ed 100644 --- a/src/models/user_avatar_decoration_response.rs +++ b/src/models/user_avatar_decoration_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/user_collectibles_response.rs b/src/models/user_collectibles_response.rs index 444905e..9a7a254 100644 --- a/src/models/user_collectibles_response.rs +++ b/src/models/user_collectibles_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/user_communication_disabled_action.rs b/src/models/user_communication_disabled_action.rs index c54b103..ecdec11 100644 --- a/src/models/user_communication_disabled_action.rs +++ b/src/models/user_communication_disabled_action.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/user_communication_disabled_action_metadata.rs b/src/models/user_communication_disabled_action_metadata.rs index b34068a..945776b 100644 --- a/src/models/user_communication_disabled_action_metadata.rs +++ b/src/models/user_communication_disabled_action_metadata.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/user_communication_disabled_action_metadata_response.rs b/src/models/user_communication_disabled_action_metadata_response.rs index e39d357..a46c56d 100644 --- a/src/models/user_communication_disabled_action_metadata_response.rs +++ b/src/models/user_communication_disabled_action_metadata_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/user_communication_disabled_action_response.rs b/src/models/user_communication_disabled_action_response.rs index 08e4d75..f217b77 100644 --- a/src/models/user_communication_disabled_action_response.rs +++ b/src/models/user_communication_disabled_action_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/user_guild_onboarding_response.rs b/src/models/user_guild_onboarding_response.rs index 977e158..2161d89 100644 --- a/src/models/user_guild_onboarding_response.rs +++ b/src/models/user_guild_onboarding_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/user_nameplate_response.rs b/src/models/user_nameplate_response.rs index be01b4c..effd5b3 100644 --- a/src/models/user_nameplate_response.rs +++ b/src/models/user_nameplate_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -48,21 +48,21 @@ use serde::{Deserialize, Serialize}; pub struct UserNameplateResponse { #[serde(rename = "sku_id", skip_serializing_if = "Option::is_none")] pub sku_id: Option, - #[serde(rename = "asset", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub asset: Option>, - #[serde(rename = "label", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub label: Option>, - #[serde(rename = "palette", skip_serializing_if = "Option::is_none")] - pub palette: Option, + #[serde(rename = "asset")] + pub asset: String, + #[serde(rename = "label")] + pub label: String, + #[serde(rename = "palette")] + pub palette: String, } impl UserNameplateResponse { - pub fn new() -> UserNameplateResponse { + pub fn new(asset: String, label: String, palette: String) -> UserNameplateResponse { UserNameplateResponse { sku_id: None, - asset: None, - label: None, - palette: None, + asset, + label, + palette, } } } diff --git a/src/models/user_pii_response.rs b/src/models/user_pii_response.rs index fc31f3f..3b5c85a 100644 --- a/src/models/user_pii_response.rs +++ b/src/models/user_pii_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -58,10 +58,10 @@ pub struct UserPiiResponse { pub public_flags: i32, #[serde(rename = "flags")] pub flags: i64, - #[serde(rename = "bot", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub bot: Option>, - #[serde(rename = "system", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub system: Option>, + #[serde(rename = "bot", skip_serializing_if = "Option::is_none")] + pub bot: Option, + #[serde(rename = "system", skip_serializing_if = "Option::is_none")] + pub system: Option, #[serde(rename = "banner", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub banner: Option>, #[serde(rename = "accent_color", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] @@ -82,8 +82,8 @@ pub struct UserPiiResponse { pub premium_type: Option, #[serde(rename = "email", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub email: Option>, - #[serde(rename = "verified", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub verified: Option>, + #[serde(rename = "verified", skip_serializing_if = "Option::is_none")] + pub verified: Option, } impl UserPiiResponse { diff --git a/src/models/user_primary_guild_response.rs b/src/models/user_primary_guild_response.rs index e1aae5d..6843436 100644 --- a/src/models/user_primary_guild_response.rs +++ b/src/models/user_primary_guild_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/user_response.rs b/src/models/user_response.rs index e81b626..ec21f76 100644 --- a/src/models/user_response.rs +++ b/src/models/user_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -58,10 +58,10 @@ pub struct UserResponse { pub public_flags: i32, #[serde(rename = "flags")] pub flags: i64, - #[serde(rename = "bot", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub bot: Option>, - #[serde(rename = "system", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub system: Option>, + #[serde(rename = "bot", skip_serializing_if = "Option::is_none")] + pub bot: Option, + #[serde(rename = "system", skip_serializing_if = "Option::is_none")] + pub system: Option, #[serde(rename = "banner", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub banner: Option>, #[serde(rename = "accent_color", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] diff --git a/src/models/user_select_component_for_message_request.rs b/src/models/user_select_component_for_message_request.rs index 4133ae1..ea66d95 100644 --- a/src/models/user_select_component_for_message_request.rs +++ b/src/models/user_select_component_for_message_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -48,6 +48,8 @@ use serde::{Deserialize, Serialize}; pub struct UserSelectComponentForMessageRequest { #[serde(rename = "type")] pub r#type: i32, + #[serde(rename = "id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub id: Option>, #[serde(rename = "custom_id")] pub custom_id: String, #[serde(rename = "placeholder", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] @@ -58,6 +60,8 @@ pub struct UserSelectComponentForMessageRequest { pub max_values: Option>, #[serde(rename = "disabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub disabled: Option>, + #[serde(rename = "required", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub required: Option>, #[serde(rename = "default_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub default_values: Option>>, } @@ -66,11 +70,13 @@ impl UserSelectComponentForMessageRequest { pub fn new(r#type: i32, custom_id: String) -> UserSelectComponentForMessageRequest { UserSelectComponentForMessageRequest { r#type, + id: None, custom_id, placeholder: None, min_values: None, max_values: None, disabled: None, + required: None, default_values: None, } } diff --git a/src/models/user_select_component_for_modal_request.rs b/src/models/user_select_component_for_modal_request.rs new file mode 100644 index 0000000..f3fcfcd --- /dev/null +++ b/src/models/user_select_component_for_modal_request.rs @@ -0,0 +1,84 @@ +//! # Discord HTTP API (Preview) - REST API Client +//! +//! Preview of the Discord v10 HTTP API specification. See https://discord.com/developers/docs for more details. +//! +//! ## Metadata +//! +//! - **Copyright**: Copyright (c) 2025 Qntx +//! - **Author**: ΣX +//! - **Version**: 10 +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] +//! - **Generator Version**: 7.14.0 +//! +//!
+//! ⚠️ Important Disclaimer & Limitation of Liability +//!
+//! > **IMPORTANT**: This software is provided "as is" without any warranties, express or implied, including but not limited +//! > to warranties of merchantability, fitness for a particular purpose, or non-infringement. The developers, contributors, +//! > and licensors (collectively, "Developers") make no representations regarding the accuracy, completeness, or reliability +//! > of this software or its outputs. +//! > +//! > This client is not intended to provide financial, investment, tax, or legal advice. It facilitates interaction with the +//! > Discord HTTP API (Preview) service but does not endorse or recommend any financial actions, including the purchase, sale, or holding of +//! > financial instruments (e.g., stocks, bonds, derivatives, cryptocurrencies). Users must consult qualified financial or +//! > legal professionals before making decisions based on this software's outputs. +//! > +//! > Financial markets are inherently speculative and carry significant risks. Using this software in trading, analysis, or +//! > other financial activities may result in substantial losses, including total loss of capital. The Developers are not +//! > liable for any losses or damages arising from such use. Users assume full responsibility for validating the software's +//! > outputs and ensuring their suitability for intended purposes. +//! > +//! > This client may rely on third-party data or services (e.g., market feeds, APIs). The Developers do not control or verify +//! > the accuracy of these services and are not liable for any errors, delays, or losses resulting from their use. Users must +//! > comply with third-party terms and conditions. +//! > +//! > Users are solely responsible for ensuring compliance with all applicable financial, tax, and regulatory requirements in +//! > their jurisdiction. This includes obtaining necessary licenses or approvals for trading or investment activities. The +//! > Developers disclaim liability for any legal consequences arising from non-compliance. +//! > +//! > To the fullest extent permitted by law, the Developers shall not be liable for any direct, indirect, incidental, +//! > consequential, or punitive damages arising from the use or inability to use this software, including but not limited to +//! > loss of profits, data, or business opportunities. +//! +//!
+use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct UserSelectComponentForModalRequest { + #[serde(rename = "type")] + pub r#type: i32, + #[serde(rename = "id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub id: Option>, + #[serde(rename = "custom_id")] + pub custom_id: String, + #[serde(rename = "placeholder", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub placeholder: Option>, + #[serde(rename = "min_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub min_values: Option>, + #[serde(rename = "max_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub max_values: Option>, + #[serde(rename = "disabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub disabled: Option>, + #[serde(rename = "required", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub required: Option>, + #[serde(rename = "default_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub default_values: Option>>, +} + +impl UserSelectComponentForModalRequest { + pub fn new(r#type: i32, custom_id: String) -> UserSelectComponentForModalRequest { + UserSelectComponentForModalRequest { + r#type, + id: None, + custom_id, + placeholder: None, + min_values: None, + max_values: None, + disabled: None, + required: None, + default_values: None, + } + } +} + diff --git a/src/models/user_select_component_response.rs b/src/models/user_select_component_response.rs index 6496001..598a5e3 100644 --- a/src/models/user_select_component_response.rs +++ b/src/models/user_select_component_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -52,16 +52,16 @@ pub struct UserSelectComponentResponse { pub id: i32, #[serde(rename = "custom_id")] pub custom_id: String, - #[serde(rename = "placeholder", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub placeholder: Option>, + #[serde(rename = "placeholder", skip_serializing_if = "Option::is_none")] + pub placeholder: Option, #[serde(rename = "min_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub min_values: Option>, #[serde(rename = "max_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub max_values: Option>, - #[serde(rename = "disabled", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub disabled: Option>, - #[serde(rename = "default_values", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub default_values: Option>>, + #[serde(rename = "disabled", skip_serializing_if = "Option::is_none")] + pub disabled: Option, + #[serde(rename = "default_values", skip_serializing_if = "Option::is_none")] + pub default_values: Option>, } impl UserSelectComponentResponse { diff --git a/src/models/user_select_default_value.rs b/src/models/user_select_default_value.rs index deb98f5..dc8b466 100644 --- a/src/models/user_select_default_value.rs +++ b/src/models/user_select_default_value.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/user_select_default_value_response.rs b/src/models/user_select_default_value_response.rs index 30671b8..9ba722f 100644 --- a/src/models/user_select_default_value_response.rs +++ b/src/models/user_select_default_value_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/vanity_url_error_response.rs b/src/models/vanity_url_error_response.rs index eda7442..6100d4a 100644 --- a/src/models/vanity_url_error_response.rs +++ b/src/models/vanity_url_error_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/vanity_url_response.rs b/src/models/vanity_url_response.rs index d207a9c..710ad82 100644 --- a/src/models/vanity_url_response.rs +++ b/src/models/vanity_url_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/voice_region_response.rs b/src/models/voice_region_response.rs index a2bcb12..7e71d47 100644 --- a/src/models/voice_region_response.rs +++ b/src/models/voice_region_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/voice_scheduled_event_create_request.rs b/src/models/voice_scheduled_event_create_request.rs index 55c0918..40dd8ba 100644 --- a/src/models/voice_scheduled_event_create_request.rs +++ b/src/models/voice_scheduled_event_create_request.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/voice_scheduled_event_patch_request_partial.rs b/src/models/voice_scheduled_event_patch_request_partial.rs index 681a9fc..63faee5 100644 --- a/src/models/voice_scheduled_event_patch_request_partial.rs +++ b/src/models/voice_scheduled_event_patch_request_partial.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/voice_scheduled_event_response.rs b/src/models/voice_scheduled_event_response.rs index e685732..55c7b77 100644 --- a/src/models/voice_scheduled_event_response.rs +++ b/src/models/voice_scheduled_event_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -58,8 +58,8 @@ pub struct VoiceScheduledEventResponse { pub channel_id: Option, #[serde(rename = "creator_id", skip_serializing_if = "Option::is_none")] pub creator_id: Option, - #[serde(rename = "creator", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub creator: Option>>, + #[serde(rename = "creator", skip_serializing_if = "Option::is_none")] + pub creator: Option>, #[serde(rename = "image", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub image: Option>, #[serde(rename = "scheduled_start_time")] @@ -72,8 +72,8 @@ pub struct VoiceScheduledEventResponse { pub entity_type: Option, #[serde(rename = "entity_id", skip_serializing_if = "Option::is_none")] pub entity_id: Option, - #[serde(rename = "user_count", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub user_count: Option>, + #[serde(rename = "user_count", skip_serializing_if = "Option::is_none")] + pub user_count: Option, #[serde(rename = "privacy_level", deserialize_with = "Option::deserialize")] pub privacy_level: Option, #[serde(rename = "user_rsvp", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] diff --git a/src/models/voice_state_response.rs b/src/models/voice_state_response.rs index 2e6e0d3..25b18f1 100644 --- a/src/models/voice_state_response.rs +++ b/src/models/voice_state_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -52,8 +52,8 @@ pub struct VoiceStateResponse { pub deaf: bool, #[serde(rename = "guild_id", skip_serializing_if = "Option::is_none")] pub guild_id: Option, - #[serde(rename = "member", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub member: Option>>, + #[serde(rename = "member", skip_serializing_if = "Option::is_none")] + pub member: Option>, #[serde(rename = "mute")] pub mute: bool, #[serde(rename = "request_to_speak_timestamp", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] diff --git a/src/models/webhook_slack_embed.rs b/src/models/webhook_slack_embed.rs index f0ecffb..a6014c6 100644 --- a/src/models/webhook_slack_embed.rs +++ b/src/models/webhook_slack_embed.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/webhook_slack_embed_field.rs b/src/models/webhook_slack_embed_field.rs index 2d5ad98..c6c948f 100644 --- a/src/models/webhook_slack_embed_field.rs +++ b/src/models/webhook_slack_embed_field.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/webhook_source_channel_response.rs b/src/models/webhook_source_channel_response.rs index 3a70a74..6a9cda4 100644 --- a/src/models/webhook_source_channel_response.rs +++ b/src/models/webhook_source_channel_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/webhook_source_guild_response.rs b/src/models/webhook_source_guild_response.rs index 575118e..4349a9f 100644 --- a/src/models/webhook_source_guild_response.rs +++ b/src/models/webhook_source_guild_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/welcome_message_response.rs b/src/models/welcome_message_response.rs index b164efa..2138923 100644 --- a/src/models/welcome_message_response.rs +++ b/src/models/welcome_message_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/welcome_screen_patch_request_partial.rs b/src/models/welcome_screen_patch_request_partial.rs index 8bcdb46..499e161 100644 --- a/src/models/welcome_screen_patch_request_partial.rs +++ b/src/models/welcome_screen_patch_request_partial.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/widget_activity.rs b/src/models/widget_activity.rs index 6c4b02d..06bb1c8 100644 --- a/src/models/widget_activity.rs +++ b/src/models/widget_activity.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/widget_channel.rs b/src/models/widget_channel.rs index e7cadab..be1feeb 100644 --- a/src/models/widget_channel.rs +++ b/src/models/widget_channel.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/widget_member.rs b/src/models/widget_member.rs index 7c0f7df..54d0596 100644 --- a/src/models/widget_member.rs +++ b/src/models/widget_member.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
@@ -58,18 +58,18 @@ pub struct WidgetMember { pub status: String, #[serde(rename = "avatar_url")] pub avatar_url: String, - #[serde(rename = "activity", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub activity: Option>>, - #[serde(rename = "deaf", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub deaf: Option>, - #[serde(rename = "mute", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub mute: Option>, - #[serde(rename = "self_deaf", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub self_deaf: Option>, - #[serde(rename = "self_mute", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub self_mute: Option>, - #[serde(rename = "suppress", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] - pub suppress: Option>, + #[serde(rename = "activity", skip_serializing_if = "Option::is_none")] + pub activity: Option>, + #[serde(rename = "deaf", skip_serializing_if = "Option::is_none")] + pub deaf: Option, + #[serde(rename = "mute", skip_serializing_if = "Option::is_none")] + pub mute: Option, + #[serde(rename = "self_deaf", skip_serializing_if = "Option::is_none")] + pub self_deaf: Option, + #[serde(rename = "self_mute", skip_serializing_if = "Option::is_none")] + pub self_mute: Option, + #[serde(rename = "suppress", skip_serializing_if = "Option::is_none")] + pub suppress: Option, #[serde(rename = "channel_id", skip_serializing_if = "Option::is_none")] pub channel_id: Option, } diff --git a/src/models/widget_response.rs b/src/models/widget_response.rs index 4c58811..6f0dbe6 100644 --- a/src/models/widget_response.rs +++ b/src/models/widget_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!
diff --git a/src/models/widget_settings_response.rs b/src/models/widget_settings_response.rs index 302e0db..6b77fa5 100644 --- a/src/models/widget_settings_response.rs +++ b/src/models/widget_settings_response.rs @@ -7,7 +7,7 @@ //! - **Copyright**: Copyright (c) 2025 Qntx //! - **Author**: ΣX //! - **Version**: 10 -//! - **Modified**: 2025-07-05T02:42:20.508163788Z[Etc/UTC] +//! - **Modified**: 2025-09-06T05:32:19.066280170Z[Etc/UTC] //! - **Generator Version**: 7.14.0 //! //!