libfireparse/
models.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
4pub struct Alias {
5    pub r#type: String,
6    pub name: String,
7    pub value: String,
8    pub description: String,
9}
10
11#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
12pub struct Rule {
13    pub disabled: bool,
14    pub r#type: String,
15    pub policy: String,
16    pub protocol: String,
17    pub source_inversed: bool,
18    pub source_port: String,
19    pub source_addr: String,
20    pub source_type: String,
21    pub destination_port: String,
22    pub destination_addr: String,
23    pub destination_type: String,
24    pub destination_inversed: bool,
25    pub description: String,
26    pub interface: String,
27    pub order: u64,
28}
29
30#[derive(Debug, Serialize, Deserialize, Clone, PartialEq)]
31pub struct NetworkInterface {
32    pub name: String,
33    pub device: String,
34    pub address: String,
35}
36
37pub struct Configuration {
38    pub rules: Vec<Rule>,
39    pub aliases: Vec<Alias>,
40    pub interfaces: Vec<NetworkInterface>,
41    pub raw_content: String,
42    pub hostname: String,
43}