use crate::core;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AggregationProfile {
#[serde(rename = "time_in_nanos")]
pub time_in_nanos: String,
#[serde(rename = "breakdown")]
pub breakdown: core::search::AggregationBreakdown,
#[serde(rename = "children", default, skip_serializing_if = "Option::is_none")]
pub children: Option<Vec<core::search::AggregationProfile>>,
#[serde(rename = "debug", default, skip_serializing_if = "Option::is_none")]
pub debug: Option<core::search::AggregationProfileDebug>,
#[serde(rename = "type")]
pub r#type: String,
#[serde(rename = "description")]
pub description: String,
}
impl AggregationProfile {
pub fn new(time_in_nanos: String, breakdown: core::search::AggregationBreakdown, r#type: String, description: String) -> AggregationProfile {
AggregationProfile {
time_in_nanos,
breakdown,
children: None,
debug: None,
r#type,
description,
}
}
}