1use crate::location::State;
2use serde::{Deserialize, Serialize};
3
4#[derive(Debug, Serialize, Deserialize, Eq, PartialEq)]
5pub struct Warning {
6 pub area_id: String,
7 pub expiry_time: String,
8 pub id: String,
9 pub issue_time: String,
10 pub phase: String,
11 pub short_title: String,
12 pub state: State,
13 pub title: String,
14 pub r#type: String,
15 pub warning_group_type: String,
16}
17
18#[derive(Serialize, Deserialize)]
19pub struct WarningMetadata {
20 pub copyright: String,
21 pub response_timestamp: String,
22}
23
24#[derive(Serialize, Deserialize)]
25pub struct WarningResponse {
26 pub data: Vec<Warning>,
27 pub metadata: WarningMetadata,
28}