use serde::{Serialize, Deserialize};
use uuid::Uuid;
use crate::api::{
models::ChatNotFound,
v3::chats::models::*
};
#[derive(Debug, Serialize, Deserialize, Default, Clone, Builder)]
#[builder(setter(into, prefix = "with", strip_option))]
pub struct AddUserRequest {
pub group_chat_id: Uuid,
pub user_huids: Vec<Uuid>,
}
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct AddUserResponse {
pub result: bool,
}
#[derive(Debug, Serialize, Deserialize, Clone)]
#[serde(tag = "reason")]
pub enum AddUserError {
#[serde(rename(serialize = "chat_not_found", deserialize = "chat_not_found"))]
ChatNotFound(ChatNotFound),
#[serde(rename(serialize = "no_permission_for_operation", deserialize = "no_permission_for_operation"))]
NoPermissionForOperation(NoPermissionForOperation),
#[serde(rename(serialize = "chat_members_not_modifiable", deserialize = "chat_members_not_modifiable"))]
ChatMemberNotModifiable(ChatMemberNotModifiableWithChatId),
#[serde(other)]
Other,
}