Skip to main content

fastly_api/models/
bot_management_protection_mode.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/// BotManagementProtectionMode : The protection mode of the workspace. `off` disables all enforcement. `log` detects and logs bots without blocking or challenging requests. `block` enforces the actions set on categories and bots.
9
10use std::fmt;
11
12/// The protection mode of the workspace. `off` disables all enforcement. `log` detects and logs bots without blocking or challenging requests. `block` enforces the actions set on categories and bots.
13#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
14pub enum BotManagementProtectionMode {
15    #[serde(rename = "false")]
16    _false,
17    #[serde(rename = "log")]
18    Log,
19    #[serde(rename = "block")]
20    Block,
21
22}
23
24impl fmt::Display for BotManagementProtectionMode {
25    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
26        match self {
27            Self::_false => write!(f, "{}", "false"),
28            Self::Log => write!(f, "{}", "log"),
29            Self::Block => write!(f, "{}", "block"),
30        }
31    }
32}
33
34impl Default for BotManagementProtectionMode {
35    fn default() -> BotManagementProtectionMode {
36        Self::_false
37    }
38}
39
40
41
42