fastly_api/models/
attack_report.rs

1/*
2 * Fastly API
3 *
4 * Via the Fastly API you can perform any of the operations that are possible within the management console,  including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://www.fastly.com/documentation/reference/api/) 
5 *
6 */
7
8
9
10
11#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct AttackReport {
13    /// ID of the workspace.
14    #[serde(rename = "id")]
15    pub id: String,
16    /// Name of the workspace.
17    #[serde(rename = "name")]
18    pub name: String,
19    /// Total request count
20    #[serde(rename = "total_count")]
21    pub total_count: i32,
22    /// Blocked request count
23    #[serde(rename = "blocked_count")]
24    pub blocked_count: i32,
25    /// Flagged request count
26    #[serde(rename = "flagged_count")]
27    pub flagged_count: i32,
28    /// Attack request count
29    #[serde(rename = "attack_count")]
30    pub attack_count: i32,
31    /// Count of IPs that have been flagged
32    #[serde(rename = "all_flagged_ip_count")]
33    pub all_flagged_ip_count: i32,
34    /// Count of currently flagged IPs
35    #[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