fastly_api/models/
attack_report.rs1#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct AttackReport {
13 #[serde(rename = "id")]
15 pub id: String,
16 #[serde(rename = "name")]
18 pub name: String,
19 #[serde(rename = "total_count")]
21 pub total_count: i32,
22 #[serde(rename = "blocked_count")]
24 pub blocked_count: i32,
25 #[serde(rename = "flagged_count")]
27 pub flagged_count: i32,
28 #[serde(rename = "attack_count")]
30 pub attack_count: i32,
31 #[serde(rename = "all_flagged_ip_count")]
33 pub all_flagged_ip_count: i32,
34 #[serde(rename = "flagged_ip_count")]
36 pub flagged_ip_count: i32,
37 #[serde(rename = "top_attack_signals")]
38 pub top_attack_signals: Vec<crate::models::AttackSignal>,
39 #[serde(rename = "top_attack_sources")]
40 pub top_attack_sources: Vec<crate::models::AttackSource>,
41}
42
43impl AttackReport {
44 pub fn new(id: String, name: String, total_count: i32, blocked_count: i32, flagged_count: i32, attack_count: i32, all_flagged_ip_count: i32, flagged_ip_count: i32, top_attack_signals: Vec<crate::models::AttackSignal>, top_attack_sources: Vec<crate::models::AttackSource>) -> AttackReport {
45 AttackReport {
46 id,
47 name,
48 total_count,
49 blocked_count,
50 flagged_count,
51 attack_count,
52 all_flagged_ip_count,
53 flagged_ip_count,
54 top_attack_signals,
55 top_attack_sources,
56 }
57 }
58}
59
60