ebbmem_client_generated/models/memory_table_response.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/// MemoryTableResponse : Paginated table response for memory browser with cursor support.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct MemoryTableResponse {
17 /// Paginated memory row items
18 #[serde(rename = "items", skip_serializing_if = "Option::is_none")]
19 pub items: Option<Vec<models::MemoryRow>>,
20 /// Alias for items (backward compatibility)
21 #[serde(rename = "rows", skip_serializing_if = "Option::is_none")]
22 pub rows: Option<Vec<models::MemoryRow>>,
23 /// Total count of matching records
24 #[serde(rename = "total", skip_serializing_if = "Option::is_none")]
25 pub total: Option<i32>,
26 /// Alias for total (backward compatibility)
27 #[serde(rename = "total_count", skip_serializing_if = "Option::is_none")]
28 pub total_count: Option<i32>,
29 /// Whether more pages are available
30 #[serde(rename = "has_more", skip_serializing_if = "Option::is_none")]
31 pub has_more: Option<bool>,
32 /// Opaque base64 cursor for next page
33 #[serde(rename = "next_cursor", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
34 pub next_cursor: Option<Option<String>>,
35 /// Page index (legacy pagination)
36 #[serde(rename = "page", skip_serializing_if = "Option::is_none")]
37 pub page: Option<i32>,
38 /// Items per page (legacy pagination)
39 #[serde(rename = "page_size", skip_serializing_if = "Option::is_none")]
40 pub page_size: Option<i32>,
41 /// Counts by tier
42 #[serde(rename = "tier_counts", skip_serializing_if = "Option::is_none")]
43 pub tier_counts: Option<std::collections::HashMap<String, i32>>,
44 /// Tombstone ratios by tier
45 #[serde(rename = "tombstone_ratios", skip_serializing_if = "Option::is_none")]
46 pub tombstone_ratios: Option<std::collections::HashMap<String, f64>>,
47}
48
49impl MemoryTableResponse {
50 /// Paginated table response for memory browser with cursor support.
51 pub fn new() -> MemoryTableResponse {
52 MemoryTableResponse {
53 items: None,
54 rows: None,
55 total: None,
56 total_count: None,
57 has_more: None,
58 next_cursor: None,
59 page: None,
60 page_size: None,
61 tier_counts: None,
62 tombstone_ratios: None,
63 }
64 }
65}
66