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 ReqGetPublicPools {
    #[serde(rename = "auth", skip_serializing_if = "Option::is_none")]
    pub auth: Option<String>,
    #[serde(rename = "filter", skip_serializing_if = "Option::is_none")]
    pub filter: Option<Filter>,
    #[serde(rename = "index")]
    pub index: i64,
    #[serde(rename = "limit")]
    pub limit: i64,
    #[serde(rename = "account_index", skip_serializing_if = "Option::is_none")]
    pub account_index: Option<i64>,
}

impl ReqGetPublicPools {
    pub fn new(index: i64, limit: i64) -> ReqGetPublicPools {
        ReqGetPublicPools {
            auth: None,
            filter: None,
            index,
            limit,
            account_index: None,
        }
    }
}
///
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Filter {
    #[serde(rename = "all")]
    All,
    #[serde(rename = "user")]
    User,
    #[serde(rename = "protocol")]
    Protocol,
    #[serde(rename = "account_index")]
    AccountIndex,
}

impl Default for Filter {
    fn default() -> Filter {
        Self::All
    }
}