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 PublicPoolInfo {
    #[serde(rename = "status")]
    pub status: i32,
    #[serde(rename = "operator_fee")]
    pub operator_fee: String,
    #[serde(rename = "min_operator_share_rate")]
    pub min_operator_share_rate: String,
    #[serde(rename = "total_shares")]
    pub total_shares: i64,
    #[serde(rename = "operator_shares")]
    pub operator_shares: i64,
    #[serde(rename = "annual_percentage_yield")]
    pub annual_percentage_yield: f64,
    #[serde(rename = "daily_returns")]
    pub daily_returns: Vec<models::DailyReturn>,
    #[serde(rename = "share_prices")]
    pub share_prices: Vec<models::SharePrice>,
}

impl PublicPoolInfo {
    pub fn new(
        status: i32,
        operator_fee: String,
        min_operator_share_rate: String,
        total_shares: i64,
        operator_shares: i64,
        annual_percentage_yield: f64,
        daily_returns: Vec<models::DailyReturn>,
        share_prices: Vec<models::SharePrice>,
    ) -> PublicPoolInfo {
        PublicPoolInfo {
            status,
            operator_fee,
            min_operator_share_rate,
            total_shares,
            operator_shares,
            annual_percentage_yield,
            daily_returns,
            share_prices,
        }
    }
}