use serde::Deserialize;
#[derive(Deserialize, Debug, PartialEq)]
pub struct LongPollSession {
pub key: String,
pub server: String,
pub ts: String,
}
#[derive(Debug, Deserialize, Clone)]
pub struct LongPollResponse<T> {
#[serde(skip_serializing_if = "Option::is_none")]
pub ts: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub updates: Option<Vec<Event<T>>>,
#[serde(skip_serializing_if = "Option::is_none")]
pub failed: Option<i32>,
}
#[derive(Debug, Deserialize, Clone)]
pub struct Event<T> {
#[serde(rename = "type")]
pub update_type: String,
pub event_id: String,
pub v: String,
pub object: T,
}