/*
 * OpenAPI
 *
 * OpenAPI
 *
 * The version of the OpenAPI document: 0.0.1
 *
 * Generated by: https://openapi-generator.tech
 */

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

/// TokenTransferMessage : Server-to-client TokenTransfer event message.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TokenTransferMessage {
    #[serde(rename = "e")]
    pub e: E,
    #[serde(rename = "t")]
    pub t: i64,
    #[serde(rename = "data")]
    pub data: models::TokenTransferMessageData,
}

impl TokenTransferMessage {
    /// Server-to-client TokenTransfer event message.
    pub fn new(e: E, t: i64, data: models::TokenTransferMessageData) -> TokenTransferMessage {
        TokenTransferMessage { e, t, data }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum E {
    #[serde(rename = "TokenTransfer")]
    TokenTransfer,
}

impl Default for E {
    fn default() -> E {
        Self::TokenTransfer
    }
}
