use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GrowthSummary {
#[serde(rename = "artifacts_added")]
pub artifacts_added: i64,
#[serde(rename = "artifacts_end")]
pub artifacts_end: i64,
#[serde(rename = "artifacts_start")]
pub artifacts_start: i64,
#[serde(rename = "downloads_in_period")]
pub downloads_in_period: i64,
#[serde(rename = "period_end")]
pub period_end: String,
#[serde(rename = "period_start")]
pub period_start: String,
#[serde(rename = "storage_bytes_end")]
pub storage_bytes_end: i64,
#[serde(rename = "storage_bytes_start")]
pub storage_bytes_start: i64,
#[serde(rename = "storage_growth_bytes")]
pub storage_growth_bytes: i64,
#[serde(rename = "storage_growth_percent")]
pub storage_growth_percent: f64,
}
impl GrowthSummary {
pub fn new(artifacts_added: i64, artifacts_end: i64, artifacts_start: i64, downloads_in_period: i64, period_end: String, period_start: String, storage_bytes_end: i64, storage_bytes_start: i64, storage_growth_bytes: i64, storage_growth_percent: f64) -> GrowthSummary {
GrowthSummary {
artifacts_added,
artifacts_end,
artifacts_start,
downloads_in_period,
period_end,
period_start,
storage_bytes_end,
storage_bytes_start,
storage_growth_bytes,
storage_growth_percent,
}
}
}