/*
 * Zernio API
 *
 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
 *
 * The version of the OpenAPI document: 1.0.4
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// WebhookPayloadTest : Webhook payload for test deliveries
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct WebhookPayloadTest {
    /// Stable webhook event ID
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "event")]
    pub event: Event,
    /// Human-readable test message
    #[serde(rename = "message")]
    pub message: String,
    #[serde(rename = "timestamp")]
    pub timestamp: String,
}

impl WebhookPayloadTest {
    /// Webhook payload for test deliveries
    pub fn new(id: String, event: Event, message: String, timestamp: String) -> WebhookPayloadTest {
        WebhookPayloadTest {
            id,
            event,
            message,
            timestamp,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Event {
    #[serde(rename = "webhook.test")]
    WebhookTest,
}

impl Default for Event {
    fn default() -> Event {
        Self::WebhookTest
    }
}
