use serde::{Deserialize, Serialize};
#[derive(Debug, Deserialize, Serialize, Clone)]
#[serde(rename_all = "camelCase")]
pub struct EntityInput {
pub name: String,
pub entity_type: String,
pub observations: Vec<String>,
}
#[derive(Debug, Deserialize, Serialize, Clone)]
#[serde(rename_all = "camelCase")]
pub struct RelationInput {
pub from: String,
pub to: String,
pub relation_type: String,
}
#[derive(Debug, Deserialize, Clone)]
#[serde(rename_all = "camelCase")]
pub struct ObservationInput {
pub entity_name: String,
pub contents: Vec<String>,
}
#[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct ObservationDeletion {
pub entity_name: String,
pub observations: Vec<String>,
}
#[derive(Debug, Serialize, Deserialize, Clone)]
#[serde(rename_all = "camelCase")]
pub struct EntityOutput {
pub name: String,
pub entity_type: String,
#[serde(skip_serializing_if = "Vec::is_empty", default)]
pub observations: Vec<String>,
pub truths: std::collections::BTreeMap<String, String>,
pub observation_count: usize,
#[serde(skip_serializing_if = "Option::is_none")]
pub body: Option<String>,
}
#[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Graph {
pub entities: Vec<EntityOutput>,
pub relations: Vec<RelationInput>,
}