fcm_service/domain/
android_config.rs

1use serde::{Deserialize, Serialize};
2
3/// Configuration for Android devices.
4#[derive(Clone, Debug, Serialize, Deserialize, Default)]
5pub struct AndroidConfig {
6    collapse_key: Option<String>,
7    priority: Option<String>,
8    ttl: Option<String>,
9}
10
11impl AndroidConfig {
12    #[must_use]
13    pub fn new() -> Self {
14        Self {
15            ..Default::default()
16        }
17    }
18
19    #[must_use]
20    pub fn collapse_key(&self) -> Option<&String> {
21        self.collapse_key.as_ref()
22    }
23
24    #[must_use]
25    pub fn priority(&self) -> Option<&String> {
26        self.priority.as_ref()
27    }
28
29    #[must_use]
30    pub fn ttl(&self) -> Option<&String> {
31        self.ttl.as_ref()
32    }
33
34    pub fn set_collapse_key(&mut self, collapse_key: Option<String>) {
35        self.collapse_key = collapse_key;
36    }
37
38    pub fn set_priority(&mut self, priority: Option<String>) {
39        self.priority = priority;
40    }
41
42    pub fn set_ttl(&mut self, ttl: Option<String>) {
43        self.ttl = ttl;
44    }
45}