gewe_core/message/
download.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, Serialize, Deserialize)]
4#[serde(rename_all = "camelCase")]
5pub struct DownloadImageRequest<'a> {
6 #[serde(rename = "appId")]
7 pub app_id: &'a str,
8 pub xml: &'a str,
9 #[serde(rename = "type")]
10 pub image_type: i32,
11}
12
13#[derive(Debug, Clone, Serialize, Deserialize, Default)]
14#[serde(rename_all = "camelCase")]
15pub struct DownloadImageResponse {
16 #[serde(rename = "fileUrl")]
17 pub file_url: String,
18}
19
20#[derive(Debug, Clone, Serialize, Deserialize)]
21#[serde(rename_all = "camelCase")]
22pub struct DownloadVideoRequest<'a> {
23 #[serde(rename = "appId")]
24 pub app_id: &'a str,
25 pub xml: &'a str,
26}
27
28pub type DownloadVideoResponse = DownloadImageResponse;
29
30#[derive(Debug, Clone, Serialize, Deserialize)]
31#[serde(rename_all = "camelCase")]
32pub struct DownloadFileRequest<'a> {
33 #[serde(rename = "appId")]
34 pub app_id: &'a str,
35 pub xml: &'a str,
36}
37
38pub type DownloadFileResponse = DownloadImageResponse;
39
40#[derive(Debug, Clone, Serialize, Deserialize)]
41#[serde(rename_all = "camelCase")]
42pub struct DownloadVoiceRequest<'a> {
43 #[serde(rename = "appId")]
44 pub app_id: &'a str,
45 pub xml: &'a str,
46 #[serde(rename = "msgId")]
47 pub msg_id: i64,
48}
49
50pub type DownloadVoiceResponse = DownloadImageResponse;
51
52#[derive(Debug, Clone, Serialize, Deserialize)]
53#[serde(rename_all = "camelCase")]
54pub struct DownloadEmojiRequest<'a> {
55 #[serde(rename = "appId")]
56 pub app_id: &'a str,
57 #[serde(rename = "emojiMd5")]
58 pub emoji_md5: &'a str,
59}
60
61#[derive(Debug, Clone, Serialize, Deserialize, Default)]
62#[serde(rename_all = "camelCase")]
63pub struct DownloadEmojiResponse {
64 pub url: String,
65}
66
67#[derive(Debug, Clone, Serialize, Deserialize)]
68#[serde(rename_all = "camelCase")]
69pub struct DownloadCdnRequest<'a> {
70 #[serde(rename = "appId")]
71 pub app_id: &'a str,
72 #[serde(rename = "aesKey")]
73 pub aes_key: &'a str,
74 #[serde(rename = "fileId")]
75 pub file_id: &'a str,
76 #[serde(rename = "type")]
77 pub r#type: &'a str,
78 #[serde(rename = "totalSize")]
79 pub total_size: &'a str,
80 pub suffix: &'a str,
81}
82
83pub type DownloadCdnResponse = DownloadImageResponse;