Skip to main content

fastly_api/models/
bot_management_error.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/// BotManagementError : An error response, formatted as a problem details object.
9
10
11
12#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
13pub struct BotManagementError {
14    /// A short summary of the problem.
15    #[serde(rename = "title")]
16    pub title: String,
17    /// The HTTP status code of the response.
18    #[serde(rename = "status")]
19    pub status: i32,
20    /// An explanation of the problem, specific to this occurrence.
21    #[serde(rename = "detail", skip_serializing_if = "Option::is_none")]
22    pub detail: Option<String>,
23}
24
25impl BotManagementError {
26    /// An error response, formatted as a problem details object.
27    pub fn new(title: String, status: i32) -> BotManagementError {
28        BotManagementError {
29            title,
30            status,
31            detail: None,
32        }
33    }
34}
35
36