dingtalk_sdk/types/
webhook.rs1use serde::Serialize;
2
3#[derive(Debug, Clone, Serialize)]
5pub struct ActionCardButton {
6 pub title: String,
8 #[serde(rename = "actionURL")]
10 pub action_url: String,
11}
12
13impl ActionCardButton {
14 #[must_use]
16 pub fn new(title: impl Into<String>, action_url: impl Into<String>) -> Self {
17 Self {
18 title: title.into(),
19 action_url: action_url.into(),
20 }
21 }
22}
23
24#[derive(Debug, Clone, Serialize)]
26pub struct FeedCardLink {
27 pub title: String,
29 #[serde(rename = "messageURL")]
31 pub message_url: String,
32 #[serde(rename = "picURL")]
34 pub pic_url: String,
35}
36
37impl FeedCardLink {
38 #[must_use]
40 pub fn new(
41 title: impl Into<String>,
42 message_url: impl Into<String>,
43 pic_url: impl Into<String>,
44 ) -> Self {
45 Self {
46 title: title.into(),
47 message_url: message_url.into(),
48 pic_url: pic_url.into(),
49 }
50 }
51}