fastly_api/models/bot_request_metrics_data_item.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/// BotRequestMetricsDataItem : A time series data item containing bot request metric counts. The `bot` field is present when grouped by bot. The `datacenter` field is present when grouped by data center. This dataset is sparse, meaning only keys with non-zero values are included.
9
10
11
12#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
13pub struct BotRequestMetricsDataItem {
14 /// Timestamp for the time series being reported.
15 #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")]
16 pub timestamp: Option<String>,
17 /// Bot identifier for which data was recorded. Present only when grouped by bot.
18 #[serde(rename = "bot", skip_serializing_if = "Option::is_none")]
19 pub bot: Option<String>,
20 /// Datacenter (POP) for which data was recorded. Present only when grouped by datacenter.
21 #[serde(rename = "datacenter", skip_serializing_if = "Option::is_none")]
22 pub datacenter: Option<String>,
23 /// Count of edge requests where a bot was detected and the request was allowed by the configured policy.
24 #[serde(rename = "bot_edge_requests_allowed_count", skip_serializing_if = "Option::is_none")]
25 pub bot_edge_requests_allowed_count: Option<i64>,
26 /// Count of edge requests where a bot was detected and a client challenge was issued for the request by the configured policy.
27 #[serde(rename = "bot_edge_requests_challenged_count", skip_serializing_if = "Option::is_none")]
28 pub bot_edge_requests_challenged_count: Option<i64>,
29 /// Count of edge requests where a bot was detected and the request was blocked by the configured policy.
30 #[serde(rename = "bot_edge_requests_blocked_count", skip_serializing_if = "Option::is_none")]
31 pub bot_edge_requests_blocked_count: Option<i64>,
32 /// Count of edge requests where a bot was detected and the client making the request has already solved a challenge issued by the configured policy.
33 #[serde(rename = "bot_edge_requests_challenge_token_valid_count", skip_serializing_if = "Option::is_none")]
34 pub bot_edge_requests_challenge_token_valid_count: Option<i64>,
35}
36
37impl BotRequestMetricsDataItem {
38 /// A time series data item containing bot request metric counts. The `bot` field is present when grouped by bot. The `datacenter` field is present when grouped by data center. This dataset is sparse, meaning only keys with non-zero values are included.
39 pub fn new() -> BotRequestMetricsDataItem {
40 BotRequestMetricsDataItem {
41 timestamp: None,
42 bot: None,
43 datacenter: None,
44 bot_edge_requests_allowed_count: None,
45 bot_edge_requests_challenged_count: None,
46 bot_edge_requests_blocked_count: None,
47 bot_edge_requests_challenge_token_valid_count: None,
48 }
49 }
50}
51
52