/*
 * Mithril
 *
 * Mithril Compute API
 *
 * The version of the OpenAPI document: 1.0.0
 *
 * Generated by: https://openapi-generator.tech
 */

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

/// HistoricalPricePointModel : A single historical price point for an instance type in a region.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct HistoricalPricePointModel {
    /// Spot price per hour in dollars
    #[serde(rename = "spot_instance_price")]
    pub spot_instance_price: String,
    /// Reserved price per hour in dollars
    #[serde(rename = "reserved_instance_price")]
    pub reserved_instance_price: String,
    /// Timestamp when this price was recorded
    #[serde(rename = "timestamp")]
    pub timestamp: String,
    /// Instance type FID
    #[serde(rename = "instance_type")]
    pub instance_type: String,
    /// Region name
    #[serde(rename = "region")]
    pub region: String,
}

impl HistoricalPricePointModel {
    /// A single historical price point for an instance type in a region.
    pub fn new(
        spot_instance_price: String,
        reserved_instance_price: String,
        timestamp: String,
        instance_type: String,
        region: String,
    ) -> HistoricalPricePointModel {
        HistoricalPricePointModel {
            spot_instance_price,
            reserved_instance_price,
            timestamp,
            instance_type,
            region,
        }
    }
}
