bluefin_api 1.7.0

Bluefin API
Documentation
/*
 * Bluefin API
 *
 * Bluefin API
 *
 * 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 EpochConfigs {
    /// The name of the campaign.
    #[serde(rename = "campaignName")]
    pub campaign_name: String,
    /// Duration of the epoch in seconds.
    #[serde(rename = "epochDuration")]
    pub epoch_duration: i32,
    /// Allocation of Sui token rewards in the epoch (e9 format).
    #[serde(rename = "suiRewardsAllocationE9")]
    pub sui_rewards_allocation_e9: String,
    /// Allocation of Blue token rewards in the epoch (e9 format).
    #[serde(rename = "blueRewardsAllocationE9")]
    pub blue_rewards_allocation_e9: String,
    /// Allocation of wal token rewards in the epoch (e9 format)
    #[serde(rename = "walRewardsAllocationE9")]
    pub wal_rewards_allocation_e9: String,
    /// Interval number for the epoch.
    #[serde(rename = "intervalNumber")]
    pub interval_number: i32,
    /// Epoch number for the epoch.
    #[serde(rename = "epochNumber")]
    pub epoch_number: i32,
    /// Object to add custom configurations for campaigns.
    #[serde(rename = "config")]
    pub config: std::collections::HashMap<String, serde_json::Value>,
}

impl EpochConfigs {
    pub fn new(campaign_name: String, epoch_duration: i32, sui_rewards_allocation_e9: String, blue_rewards_allocation_e9: String, wal_rewards_allocation_e9: String, interval_number: i32, epoch_number: i32, config: std::collections::HashMap<String, serde_json::Value>) -> EpochConfigs {
        EpochConfigs {
            campaign_name,
            epoch_duration,
            sui_rewards_allocation_e9,
            blue_rewards_allocation_e9,
            wal_rewards_allocation_e9,
            interval_number,
            epoch_number,
            config,
        }
    }
}