use serde::Serialize; use serde_json::{Map, Value}; #[derive(Debug, Serialize)] pub struct PostApplication { pub data: PostApplicationData, } #[derive(Debug, Serialize)] pub struct PostApplicationData { pub code: String, #[serde(rename = "unitId")] pub unit_id: String, #[serde(rename = "hostUri")] pub host_uri: String, #[serde(skip_serializing_if = "Option::is_none")] pub name: Option, #[serde(skip_serializing_if = "Option::is_none")] pub info: Option>, } #[derive(Debug, Default, Serialize)] pub struct GetApplicationCount { #[serde(skip_serializing_if = "Option::is_none")] pub unit: Option, #[serde(skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(skip_serializing_if = "Option::is_none")] pub contains: Option, } #[derive(Debug, Default, Serialize)] pub struct GetApplicationList { #[serde(skip_serializing_if = "Option::is_none")] pub unit: Option, #[serde(skip_serializing_if = "Option::is_none")] pub code: Option, #[serde(skip_serializing_if = "Option::is_none")] pub contains: 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, } #[derive(Debug, Default, Serialize)] pub struct PatchApplication { pub data: PatchApplicationData, } #[derive(Debug, Default, Serialize)] pub struct PatchApplicationData { #[serde(rename = "hostUri", skip_serializing_if = "Option::is_none")] pub host_uri: Option, #[serde(skip_serializing_if = "Option::is_none")] pub name: Option, #[serde(skip_serializing_if = "Option::is_none")] pub info: Option>, }