zabbix_api/macro/
model.rs

1use serde::{Deserialize, Serialize};
2use crate::r#macro::macrotype::MacroType;
3
4/// API Object: https://www.zabbix.com/documentation/6.0/en/manual/api/reference/usermacro/object
5#[derive(Deserialize, Debug)]
6pub struct ZabbixGlobalMacro {
7    #[serde(rename = "globalmacroid")]
8    pub id: String,
9    pub r#macro: String,
10    pub value: String,
11    pub r#type: u8,
12    pub description: String,
13}
14
15/// API Object: https://www.zabbix.com/documentation/6.0/en/manual/api/reference/usermacro/object
16#[derive(Serialize, Deserialize, Debug)]
17pub struct ZabbixHostMacro {
18    #[serde(rename = "hostmacroid")]
19    pub id: String,
20    #[serde(rename = "hostid")]
21    pub host_id: String,
22    pub r#macro: String,
23    pub value: String,
24    pub r#type: MacroType,
25    pub description: String,
26}