use chrono::{serde::ts_milliseconds, DateTime, Utc};
use serde::{Deserialize, Serialize};
#[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct FirehoseRequest {
pub access_key: Option<String>,
pub request_id: String,
#[serde(with = "ts_milliseconds")]
pub timestamp: DateTime<Utc>,
pub records: Vec<EncodedFirehoseRecord>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct EncodedFirehoseRecord {
pub data: String,
}
#[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct FirehoseResponse {
pub request_id: String,
#[serde(with = "ts_milliseconds")]
pub timestamp: DateTime<Utc>,
pub error_message: Option<String>,
}