botx_api/bot/models/
status_request.rs1use serde::{Deserialize, Serialize};
2use uuid::Uuid;
3
4use crate::api::models::Status;
5
6use super::ChatType;
7
8#[derive(Deserialize, Debug)]
9pub struct StatusRequest {
10 pub bot_id: Uuid,
11 pub user_huid: Uuid,
12 pub ad_login: Option<String>,
13 pub ad_domain: Option<String>,
14 pub is_admin: Option<bool>,
15 pub chat_type: Option<ChatType>,
16}
17
18#[derive(Serialize, Debug, Clone, Builder)]
19#[builder(setter(into, prefix = "with", strip_option))]
20pub struct StatusResponse {
21 pub status: Status,
23
24 pub result: StatusResponseResult,
26}
27
28#[derive(Serialize, Debug, Clone, Builder)]
29#[builder(setter(into, prefix = "with", strip_option))]
30pub struct StatusResponseResult {
31 pub enabled: bool,
33
34 #[builder(default)]
36 pub status_message: Option<String>,
37
38 #[builder(default)]
40 pub commands: Vec<BotCommand>,
41}
42
43#[derive(Serialize, Debug, Clone, Builder)]
45#[builder(setter(into, prefix = "with", strip_option))]
46pub struct BotCommand {
47 pub description: String,
49
50 pub body: String,
52
53 pub name: String,
55}