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