use serde::Serialize; #[derive(Debug, Default, Serialize)] pub struct GetCount { #[serde(skip_serializing_if = "Option::is_none")] pub unit: Option, #[serde(skip_serializing_if = "Option::is_none")] pub device: Option, #[serde(skip_serializing_if = "Option::is_none")] pub network: Option, #[serde(skip_serializing_if = "Option::is_none")] pub addr: Option, #[serde(skip_serializing_if = "Option::is_none")] pub profile: Option, #[serde(skip_serializing_if = "Option::is_none")] pub tfield: Option, #[serde(skip_serializing_if = "Option::is_none")] pub tstart: Option, #[serde(skip_serializing_if = "Option::is_none")] pub tend: Option, } #[derive(Debug, Default, Serialize)] pub struct GetList { #[serde(skip_serializing_if = "Option::is_none")] pub unit: Option, #[serde(skip_serializing_if = "Option::is_none")] pub device: Option, #[serde(skip_serializing_if = "Option::is_none")] pub network: Option, #[serde(skip_serializing_if = "Option::is_none")] pub addr: Option, #[serde(skip_serializing_if = "Option::is_none")] pub profile: Option, #[serde(skip_serializing_if = "Option::is_none")] pub tfield: Option, #[serde(skip_serializing_if = "Option::is_none")] pub tstart: Option, #[serde(skip_serializing_if = "Option::is_none")] pub tend: Option, #[serde(skip_serializing_if = "Option::is_none")] pub offset: Option, #[serde(skip_serializing_if = "Option::is_none")] pub limit: Option, #[serde(skip_serializing_if = "Option::is_none")] pub sort: Option, // this will be fill from sort_vec automatically. #[serde(skip_serializing)] pub sort_vec: Option>, #[serde(skip_serializing_if = "Option::is_none")] pub format: Option, }