ebbmem-client-generated 0.2.0

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.
Documentation
/*
 * Ebb Memory Engine API
 *
 * 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.
 *
 * The version of the OpenAPI document: 0.2.0
 * Contact: maintainers@spectrayan.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// MemoryRow : Row model for memory table view.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct MemoryRow {
    #[serde(rename = "id")]
    pub id: String,
    /// Canonical 128-bit engram id (UUID-formatted) from the engine
    #[serde(rename = "memory_uuid", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub memory_uuid: Option<Option<String>>,
    #[serde(rename = "text")]
    pub text: String,
    #[serde(rename = "text_preview", skip_serializing_if = "Option::is_none")]
    pub text_preview: Option<String>,
    #[serde(rename = "tier", skip_serializing_if = "Option::is_none")]
    pub tier: Option<String>,
    #[serde(rename = "source", skip_serializing_if = "Option::is_none")]
    pub source: Option<String>,
    #[serde(rename = "importance", skip_serializing_if = "Option::is_none")]
    pub importance: Option<f64>,
    #[serde(rename = "valence", skip_serializing_if = "Option::is_none")]
    pub valence: Option<i32>,
    #[serde(rename = "arousal", skip_serializing_if = "Option::is_none")]
    pub arousal: Option<i32>,
    #[serde(rename = "cognitive_mass", skip_serializing_if = "Option::is_none")]
    pub cognitive_mass: Option<f64>,
    #[serde(rename = "storage_strength", skip_serializing_if = "Option::is_none")]
    pub storage_strength: Option<f64>,
    #[serde(rename = "timestamp_ms", skip_serializing_if = "Option::is_none")]
    pub timestamp_ms: Option<i32>,
    #[serde(rename = "recall_count", skip_serializing_if = "Option::is_none")]
    pub recall_count: Option<i32>,
    #[serde(rename = "tombstoned", skip_serializing_if = "Option::is_none")]
    pub tombstoned: Option<bool>,
    #[serde(rename = "suppressed", skip_serializing_if = "Option::is_none")]
    pub suppressed: Option<bool>,
    #[serde(rename = "pinned", skip_serializing_if = "Option::is_none")]
    pub pinned: Option<bool>,
    #[serde(rename = "resolved", skip_serializing_if = "Option::is_none")]
    pub resolved: Option<bool>,
    #[serde(rename = "consolidated", skip_serializing_if = "Option::is_none")]
    pub consolidated: Option<bool>,
    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<String>>,
    #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
    #[serde(rename = "namespace", skip_serializing_if = "Option::is_none")]
    pub namespace: Option<String>,
    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
    pub metadata: Option<std::collections::HashMap<String, serde_json::Value>>,
}

impl MemoryRow {
    /// Row model for memory table view.
    pub fn new(id: String, text: String) -> MemoryRow {
        MemoryRow {
            id,
            memory_uuid: None,
            text,
            text_preview: None,
            tier: None,
            source: None,
            importance: None,
            valence: None,
            arousal: None,
            cognitive_mass: None,
            storage_strength: None,
            timestamp_ms: None,
            recall_count: None,
            tombstoned: None,
            suppressed: None,
            pinned: None,
            resolved: None,
            consolidated: None,
            tags: None,
            created_at: None,
            namespace: None,
            metadata: None,
        }
    }
}