From 9172f56fd92f06db64efbdc924eccdcb5ba18b57 Mon Sep 17 00:00:00 2001 From: Samuel Lorch Date: Thu, 2 Nov 2023 21:47:11 +0100 Subject: [PATCH] minor field renaming --- src/definitions/object.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/definitions/object.rs b/src/definitions/object.rs index 1cbc6f1..77ebd15 100644 --- a/src/definitions/object.rs +++ b/src/definitions/object.rs @@ -18,10 +18,10 @@ pub struct Address { #[derive(Serialize, Deserialize, Clone, Debug)] #[serde(rename_all = "snake_case")] pub enum AddressType { - Host { host: String }, + Host { address: String }, Range { range: IpAddr }, Network { network: IpNet }, - Group { children: Vec }, + Group { members: Vec }, } #[derive(Serialize, Deserialize, Clone, Validate, Debug)] @@ -31,7 +31,7 @@ pub struct Service { } #[derive(Serialize, Deserialize, Clone, Debug)] -#[serde(rename_all = "snake_case")] +#[serde(rename_all = "lowercase")] pub enum ServiceType { TCP { source: PortDefinition, @@ -52,6 +52,7 @@ pub enum ServiceType { #[derive(Serialize, Deserialize, Clone, Debug)] #[serde(rename_all = "snake_case")] pub enum PortDefinition { + Any, Single { port: u64 }, Range { start_port: u64, end_port: u64 }, }