botx_api/api/v3/chats/remove_user/
models.rs1use serde::{Serialize, Deserialize};
2use uuid::Uuid;
3
4use crate::api::{
5 models::ChatNotFound,
6 v3::chats::models::*
7};
8
9
10#[derive(Debug, Serialize, Deserialize, Default, Clone, Builder)]
12#[builder(setter(into, prefix = "with", strip_option))]
13pub struct RemoveUserRequest {
14 pub group_chat_id: Uuid,
16
17 pub user_huids: Vec<Uuid>,
19}
20
21#[derive(Debug, Serialize, Deserialize, Clone)]
23pub struct RemoveUserResponse {
24 pub result: bool,
28}
29
30#[derive(Debug, Serialize, Deserialize, Clone)]
32#[serde(tag = "reason")]
33pub enum RemoveUserError {
34 #[serde(rename(serialize = "chat_not_found", deserialize = "chat_not_found"))]
36 ChatNotFound(ChatNotFound),
37
38 #[serde(rename(serialize = "no_permission_for_operation", deserialize = "no_permission_for_operation"))]
40 NoPermissionForOperation(NoPermissionForOperation),
41
42 #[serde(rename(serialize = "chat_members_not_modifiable", deserialize = "chat_members_not_modifiable"))]
44 ChatMemberNotModifiable(ChatMemberNotModifiableWithChatId),
45
46 #[serde(other)]
49 Other,
50}