use std::collections::HashMap;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum MessagePayload {
Request(Request),
Response(Response),
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Request {
pub sender_id: String, pub request_id: String,
pub service_id: String,
pub endpoint: Option<String>,
pub request_type: String, pub method: String, pub payload: String,
pub headers: HashMap<String, String>, pub payload_encrypted: bool,
pub signature: Option<String>,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Response {
pub request_id: String,
pub status_code: u16,
pub content_type: String,
pub payload: String,
pub headers: HashMap<String, String>, pub is_stream_chunk: bool,
pub stream_done: bool,
}