zabbix_api/client/
jsonrpc.rs

1use serde::{Deserialize, Serialize};
2
3use crate::error::ZabbixError;
4
5#[derive(Serialize)]
6pub struct ZabbixApiRequest<T: Serialize> {
7    pub jsonrpc: String,
8    pub method: String,
9    pub params: T,
10    pub id: i8,
11    pub auth: Option<String>
12}
13
14#[derive(Deserialize,Debug)]
15pub struct ZabbixApiResponse<R> {
16    pub jsonrpc: String,
17    pub result: Option<R>,
18    pub id: i8,
19    pub error: Option<ZabbixError>
20}