rain_sdk/models/reports.rs
1//! Models for report endpoints
2
3use serde::{Deserialize, Serialize};
4
5/// Format of the report
6#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
7#[serde(rename_all = "lowercase")]
8pub enum ReportFormat {
9 Csv,
10 Json,
11 Ssrp,
12}
13
14/// Query parameters for getting a report
15#[derive(Debug, Clone, Serialize, Deserialize)]
16pub struct GetReportParams {
17 #[serde(skip_serializing_if = "Option::is_none")]
18 pub format: Option<ReportFormat>,
19}
20
21/// Report response (raw bytes, content type depends on format)
22pub type ReportResponse = Vec<u8>;