use crate::capability_slot::PackDescriptor;
use crate::version::SchemaVersion;
use chrono::{DateTime, Utc};
use greentic_types::EnvId;
use serde::{Deserialize, Serialize};
use serde_json::Value;
use std::collections::BTreeMap;
pub type RuntimeDiscoveryValue = Value;
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct EnvironmentRuntime {
pub schema: SchemaVersion,
pub environment_id: EnvId,
#[serde(default)]
pub discovered: BTreeMap<String, RuntimeDiscoveryValue>,
pub generated_at: DateTime<Utc>,
pub generated_by: PackDescriptor,
pub generation: u64,
}
impl EnvironmentRuntime {
pub fn schema_str() -> &'static str {
SchemaVersion::ENVIRONMENT_RUNTIME_V1
}
}