use litty::literal;
use serde::{Deserialize, Serialize};
use genotype_runtime::Any;
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebhookCollectionV1 {
pub r#type: WebhookCollectionV1TypeCollection,
pub id: String,
pub collection: super::collection::CollectionV1,
}
#[literal("collection")]
pub struct WebhookCollectionV1TypeCollection;
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebhookPingV1 {
pub r#type: WebhookPingV1TypePing,
pub id: String,
}
#[literal("ping")]
pub struct WebhookPingV1TypePing;
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebhookPongV1 {
pub ping: WebhookPongV1PingPong,
}
#[literal("pong")]
pub struct WebhookPongV1PingPong;
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct WebhookV1 {
pub v: Any,
pub id: String,
pub time: i64,
pub payload: WebhookV1Payload,
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
pub enum WebhookV1Payload {
WebhookPingV1(WebhookPingV1),
WebhookCollectionV1(WebhookCollectionV1),
}