lighter-rust 0.2.0

A comprehensive Rust SDK for the Lighter trading platform with async/await, WebSocket support, and Ethereum wallet integration
/*
 *
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document:
 *
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ReqExportData {
    #[serde(rename = "auth", skip_serializing_if = "Option::is_none")]
    pub auth: Option<String>,
    #[serde(rename = "account_index", skip_serializing_if = "Option::is_none")]
    pub account_index: Option<i64>,
    #[serde(rename = "market_id", skip_serializing_if = "Option::is_none")]
    pub market_id: Option<i32>,
    #[serde(rename = "type")]
    pub r#type: Type,
}

impl ReqExportData {
    pub fn new(r#type: Type) -> ReqExportData {
        ReqExportData {
            auth: None,
            account_index: None,
            market_id: None,
            r#type,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
    #[serde(rename = "funding")]
    Funding,
    #[serde(rename = "trade")]
    Trade,
}

impl Default for Type {
    fn default() -> Type {
        Self::Funding
    }
}