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