dapnet_api/types/
calls.rs

1use chrono::{DateTime, Utc};
2use derive_builder::Builder;
3use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Serialize, Builder)]
6pub struct OutgoingCall {
7    /// Message text of the call
8    pub(crate) text: String,
9
10    /// Call signs of this calls recipients
11    #[serde(rename = "callSignNames")]
12    pub(crate) recipients: Vec<String>,
13
14    /// Names of transmitter groups used to transmit this call
15    #[serde(rename = "transmitterGroupNames")]
16    pub(crate) transmitter_groups: Vec<String>,
17
18    /// Flag indicating if this call was sent with high priority
19    #[builder(default = "false")]
20    pub(crate) emergency: bool,
21}
22
23#[derive(Debug, Deserialize)]
24pub struct Call {
25    /// Message text of the call
26    pub text: String,
27
28    /// Time at which the call was sent
29    pub timestamp: DateTime<Utc>,
30
31    /// User who submitted the call
32    #[serde(rename = "ownerName")]
33    pub sender: String,
34
35    /// Call signs of this calls recipients
36    #[serde(rename = "callSignNames")]
37    pub recipients: Vec<String>,
38
39    /// Names of transmitter groups used to transmit this call
40    #[serde(rename = "transmitterGroupNames")]
41    pub transmitter_groups: Vec<String>,
42
43    /// Flag indicating if this call was sent with high priority
44    pub emergency: bool,
45}