greentic_deploy_spec/
environment_runtime.rs1use crate::capability_slot::PackDescriptor;
7use crate::version::SchemaVersion;
8use chrono::{DateTime, Utc};
9use greentic_types::EnvId;
10use serde::{Deserialize, Serialize};
11use serde_json::Value;
12use std::collections::BTreeMap;
13
14pub type RuntimeDiscoveryValue = Value;
18
19#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
20pub struct EnvironmentRuntime {
21 pub schema: SchemaVersion,
22 pub environment_id: EnvId,
23 #[serde(default)]
24 pub discovered: BTreeMap<String, RuntimeDiscoveryValue>,
25 pub generated_at: DateTime<Utc>,
26 pub generated_by: PackDescriptor,
27 pub generation: u64,
29}
30
31impl EnvironmentRuntime {
32 pub fn schema_str() -> &'static str {
33 SchemaVersion::ENVIRONMENT_RUNTIME_V1
34 }
35}