Skip to main content

feagi_api/v1/
simulation_dtos.rs

1// Copyright 2025 Neuraville Inc.
2// Licensed under the Apache License, Version 2.0
3
4//! Simulation API DTOs
5//!
6//! Request/response types for simulation control and stimulation
7
8use serde::{Deserialize, Serialize};
9use std::collections::HashMap;
10use utoipa::ToSchema;
11
12/// Stimulation script upload request
13#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
14pub struct StimulationUploadRequest {
15    pub stimulation_script: HashMap<String, serde_json::Value>,
16}
17
18/// Simulation control request
19#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
20pub struct SimulationControlRequest {
21    pub config: HashMap<String, serde_json::Value>,
22}
23
24/// Simulation status response
25#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
26pub struct SimulationStatusResponse {
27    pub active: bool,
28    pub stimulation_running: bool,
29}
30
31/// Simulation statistics response
32#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
33pub struct SimulationStatsResponse {
34    pub total_stimulations: u64,
35    pub active_scripts: usize,
36}
37
38/// Generic success response
39#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
40pub struct SimulationSuccessResponse {
41    pub message: String,
42    pub success: bool,
43}