use crate::dto::{
prelude::*,
state::{AppStateInput, SubnetStateInput},
topology::{AppIndexArgs, SubnetIndexArgs},
};
#[derive(CandidType, Clone, Debug, Deserialize)]
pub struct StateSnapshotInput {
pub app_state: Option<AppStateInput>,
pub subnet_state: Option<SubnetStateInput>,
pub app_index: Option<AppIndexArgs>,
pub subnet_index: Option<SubnetIndexArgs>,
}
#[derive(CandidType, Clone, Debug, Deserialize)]
pub struct TopologySnapshotInput {
pub parents: Vec<TopologyPathNode>,
pub children_map: Vec<TopologyChildren>,
}
#[derive(CandidType, Clone, Debug, Deserialize)]
pub struct TopologyChildren {
pub parent_pid: Principal,
pub children: Vec<TopologyDirectChild>,
}
#[derive(CandidType, Clone, Debug, Deserialize)]
pub struct TopologyDirectChild {
pub pid: Principal,
pub role: CanisterRole,
}
#[derive(CandidType, Clone, Debug, Deserialize)]
pub struct TopologyPathNode {
pub pid: Principal,
pub role: CanisterRole,
pub parent_pid: Option<Principal>,
}