use crate::core;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct FetchProfile {
#[serde(rename = "description")]
pub description: String,
#[serde(rename = "breakdown")]
pub breakdown: core::search::FetchProfileBreakdown,
#[serde(rename = "debug", default, skip_serializing_if = "Option::is_none")]
pub debug: Option<core::search::FetchProfileDebug>,
#[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::FetchProfile>>,
#[serde(rename = "type")]
pub r#type: String,
}
impl FetchProfile {
pub fn new(description: String, breakdown: core::search::FetchProfileBreakdown, time_in_nanos: String, r#type: String) -> FetchProfile {
FetchProfile {
description,
breakdown,
debug: None,
time_in_nanos,
children: None,
r#type,
}
}
}