botx_api/api/v3/chats/set_stealth/
models.rs1use serde::{Serialize, Deserialize};
2use uuid::Uuid;
3
4use crate::api::{
5 models::ChatNotFound,
6 v3::chats::models::*
7};
8
9#[derive(Debug, Serialize, Deserialize, Default, Clone, Builder)]
11#[builder(setter(into, prefix = "with", strip_option))]
12pub struct SetStealthRequest {
13 pub group_chat_id: Uuid,
15
16 pub disable_web: bool,
18
19 #[builder(default)]
21 pub burn_in: Option<u32>,
22
23 #[builder(default)]
25 pub expire_in: Option<u32>,
26}
27
28#[derive(Debug, Serialize, Deserialize, Clone)]
30pub struct SetStealthResponse {
31 pub result: bool,
35}
36
37#[derive(Debug, Serialize, Deserialize, Clone)]
39#[serde(tag = "reason")]
40pub enum SetStealthError {
41 #[serde(rename(serialize = "chat_not_found", deserialize = "chat_not_found"))]
43 ChatNotFound(ChatNotFound),
44
45 #[serde(rename(serialize = "no_permission_for_operation", deserialize = "no_permission_for_operation"))]
47 NoPermissionForOperation(NoPermissionForOperation),
48
49 #[serde(other)]
52 Other,
53}