use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, bon::Builder)]
pub struct SessionWithTraces {
#[serde(rename = "id")]
pub id: String,
#[serde(rename = "createdAt")]
pub created_at: chrono::DateTime<chrono::FixedOffset>,
#[serde(rename = "projectId")]
pub project_id: String,
#[serde(rename = "environment")]
pub environment: String,
#[serde(rename = "traces")]
pub traces: Vec<models::Trace>,
#[serde(rename = "_deprecation", skip_serializing_if = "Option::is_none")]
pub _deprecation: Option<Box<models::Deprecation>>,
}
impl SessionWithTraces {
pub fn new(
id: String,
created_at: chrono::DateTime<chrono::FixedOffset>,
project_id: String,
environment: String,
traces: Vec<models::Trace>,
) -> SessionWithTraces {
SessionWithTraces {
id,
created_at,
project_id,
environment,
traces,
_deprecation: None,
}
}
}