Skip to main content

ebbmem_client_generated/models/
memory_row.rs

1/*
2 * Ebb Memory Engine API
3 *
4 * Production cognitive memory engine and multi-transport gateway for autonomous AI agents. Features continuous mass-dilated logarithmic decay, Hebbian co-activation networks, off-heap mmap storage, and unified enterprise security.  Canonical public HTTP contract for Ebb client SDKs. Generated from the hosted FastAPI application. Excludes internal and admin routes (`/api/v1/admin/_**`, `/metrics`, `/mcp`). Protected operations require `Authorization: Bearer <token>` (security scheme `HTTPBearer`). The same routes accept an optional `X-API-Key` header and `X-Ebb-Namespace` to select a namespace. Error responses use the `ErrorResponse` envelope (`code`, `message`, `details`) plus FastAPI's `HTTPValidationError` for 422.  SDK subset of the Ebb HTTP contract. Includes Memory, Tasks, Events, and Health. Omits admin, runtime config, provider probes, registration, password reset, and SSO.
5 *
6 * The version of the OpenAPI document: 0.2.0
7 * Contact: maintainers@spectrayan.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// MemoryRow : Row model for memory table view.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct MemoryRow {
17    #[serde(rename = "id")]
18    pub id: String,
19    /// Canonical 128-bit engram id (UUID-formatted) from the engine
20    #[serde(rename = "memory_uuid", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
21    pub memory_uuid: Option<Option<String>>,
22    #[serde(rename = "text")]
23    pub text: String,
24    #[serde(rename = "text_preview", skip_serializing_if = "Option::is_none")]
25    pub text_preview: Option<String>,
26    #[serde(rename = "tier", skip_serializing_if = "Option::is_none")]
27    pub tier: Option<String>,
28    #[serde(rename = "source", skip_serializing_if = "Option::is_none")]
29    pub source: Option<String>,
30    #[serde(rename = "importance", skip_serializing_if = "Option::is_none")]
31    pub importance: Option<f64>,
32    #[serde(rename = "valence", skip_serializing_if = "Option::is_none")]
33    pub valence: Option<i32>,
34    #[serde(rename = "arousal", skip_serializing_if = "Option::is_none")]
35    pub arousal: Option<i32>,
36    #[serde(rename = "cognitive_mass", skip_serializing_if = "Option::is_none")]
37    pub cognitive_mass: Option<f64>,
38    #[serde(rename = "storage_strength", skip_serializing_if = "Option::is_none")]
39    pub storage_strength: Option<f64>,
40    #[serde(rename = "timestamp_ms", skip_serializing_if = "Option::is_none")]
41    pub timestamp_ms: Option<i32>,
42    #[serde(rename = "recall_count", skip_serializing_if = "Option::is_none")]
43    pub recall_count: Option<i32>,
44    #[serde(rename = "tombstoned", skip_serializing_if = "Option::is_none")]
45    pub tombstoned: Option<bool>,
46    #[serde(rename = "suppressed", skip_serializing_if = "Option::is_none")]
47    pub suppressed: Option<bool>,
48    #[serde(rename = "pinned", skip_serializing_if = "Option::is_none")]
49    pub pinned: Option<bool>,
50    #[serde(rename = "resolved", skip_serializing_if = "Option::is_none")]
51    pub resolved: Option<bool>,
52    #[serde(rename = "consolidated", skip_serializing_if = "Option::is_none")]
53    pub consolidated: Option<bool>,
54    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
55    pub tags: Option<Vec<String>>,
56    #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
57    pub created_at: Option<String>,
58    #[serde(rename = "namespace", skip_serializing_if = "Option::is_none")]
59    pub namespace: Option<String>,
60    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
61    pub metadata: Option<std::collections::HashMap<String, serde_json::Value>>,
62}
63
64impl MemoryRow {
65    /// Row model for memory table view.
66    pub fn new(id: String, text: String) -> MemoryRow {
67        MemoryRow {
68            id,
69            memory_uuid: None,
70            text,
71            text_preview: None,
72            tier: None,
73            source: None,
74            importance: None,
75            valence: None,
76            arousal: None,
77            cognitive_mass: None,
78            storage_strength: None,
79            timestamp_ms: None,
80            recall_count: None,
81            tombstoned: None,
82            suppressed: None,
83            pinned: None,
84            resolved: None,
85            consolidated: None,
86            tags: None,
87            created_at: None,
88            namespace: None,
89            metadata: None,
90        }
91    }
92}
93