/*
 * Websocket Subscription Schemas
 *
 * Schema definitions Websocket API subscriptions for Thalex exchange.
 *
 * The version of the OpenAPI document: 1.0.0
 *
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SystemEvent {
    /// Type of the system event.  - `reconnect`: you receive this event when the WebSocket connection is about to be closed by the server and you need to open a new one. This can happen, for example, during exchange maintenance windows. The event is sent at least 10 seconds before the connection is closed.
    #[serde(rename = "event")]
    pub event: Event,
}

impl SystemEvent {
    pub fn new(event: Event) -> SystemEvent {
        SystemEvent { event }
    }
}
/// Type of the system event.  - `reconnect`: you receive this event when the WebSocket connection is about to be closed by the server and you need to open a new one. This can happen, for example, during exchange maintenance windows. The event is sent at least 10 seconds before the connection is closed.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Event {
    #[serde(rename = "reconnect")]
    Reconnect,
}

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