1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize)]
pub struct InitiateWormConfiguration {
    #[serde(rename = "RetentionPeriodInDays")]
    pub retention_period_in_days: i32,
}

impl Default for InitiateWormConfiguration {
    fn default() -> Self {
        Self {
            retention_period_in_days: 1,
        }
    }
}

#[derive(Debug, Serialize, Deserialize)]
pub struct ExtendWormConfiguration {
    #[serde(rename = "RetentionPeriodInDays")]
    pub retention_period_in_days: u32,
}

impl Default for ExtendWormConfiguration {
    fn default() -> Self {
        Self {
            retention_period_in_days: 1,
        }
    }
}

#[derive(Debug, Serialize, Deserialize)]
pub struct WormConfiguration {
    #[serde(rename = "WormId")]
    pub worm_id: String,
    #[serde(rename = "State")]
    pub state: String,
    #[serde(rename = "RetentionPeriodInDays")]
    pub retention_period_in_days: i32,
    #[serde(rename = "CreationDate")]
    pub creation_date: String,
}