fastly_api/models/
ddos_protection_event.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 DdosProtectionEvent {
13    /// Date and time in ISO 8601 format.
14    #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
15    pub created_at: Option<String>,
16    /// Date and time in ISO 8601 format.
17    #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
18    pub updated_at: Option<String>,
19    /// Unique ID of the event.
20    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
21    pub id: Option<String>,
22    /// A human-readable name for the event.
23    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
24    pub name: Option<String>,
25    /// Number of requests classified as non-attack traffic for an event.
26    #[serde(rename = "requests_allowed", skip_serializing_if = "Option::is_none")]
27    pub requests_allowed: Option<i32>,
28    /// Number of requests classified as DDoS attack traffic for an event.
29    #[serde(rename = "requests_detected", skip_serializing_if = "Option::is_none")]
30    pub requests_detected: Option<i32>,
31    /// Alphanumeric string identifying the customer.
32    #[serde(rename = "customer_id", skip_serializing_if = "Option::is_none")]
33    pub customer_id: Option<String>,
34    /// Alphanumeric string identifying the service.
35    #[serde(rename = "service_id", skip_serializing_if = "Option::is_none")]
36    pub service_id: Option<String>,
37    /// Date and time in ISO 8601 format.
38    #[serde(rename = "started_at", skip_serializing_if = "Option::is_none")]
39    pub started_at: Option<String>,
40    /// Date and time in ISO 8601 format.
41    #[serde(rename = "ended_at", skip_serializing_if = "Option::is_none")]
42    pub ended_at: Option<String>,
43}
44
45impl DdosProtectionEvent {
46    pub fn new() -> DdosProtectionEvent {
47        DdosProtectionEvent {
48            created_at: None,
49            updated_at: None,
50            id: None,
51            name: None,
52            requests_allowed: None,
53            requests_detected: None,
54            customer_id: None,
55            service_id: None,
56            started_at: None,
57            ended_at: None,
58        }
59    }
60}
61
62