fastly_api/models/
waf_exclusion_response_data_attributes.rs1#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct WafExclusionResponseDataAttributes {
13 #[serde(rename = "created_at", skip_serializing_if = "Option::is_none")]
15 pub created_at: Option<String>,
16 #[serde(rename = "deleted_at", skip_serializing_if = "Option::is_none")]
18 pub deleted_at: Option<String>,
19 #[serde(rename = "updated_at", skip_serializing_if = "Option::is_none")]
21 pub updated_at: Option<String>,
22 #[serde(rename = "condition", skip_serializing_if = "Option::is_none")]
24 pub condition: Option<String>,
25 #[serde(rename = "exclusion_type", skip_serializing_if = "Option::is_none")]
27 pub exclusion_type: Option<ExclusionType>,
28 #[serde(rename = "logging", skip_serializing_if = "Option::is_none")]
30 pub logging: Option<bool>,
31 #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
33 pub name: Option<String>,
34 #[serde(rename = "number", skip_serializing_if = "Option::is_none")]
36 pub number: Option<i32>,
37 #[serde(rename = "variable", skip_serializing_if = "Option::is_none")]
39 pub variable: Option<Variable>,
40}
41
42impl WafExclusionResponseDataAttributes {
43 pub fn new() -> WafExclusionResponseDataAttributes {
44 WafExclusionResponseDataAttributes {
45 created_at: None,
46 deleted_at: None,
47 updated_at: None,
48 condition: None,
49 exclusion_type: None,
50 logging: None,
51 name: None,
52 number: None,
53 variable: None,
54 }
55 }
56}
57
58#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
60pub enum ExclusionType {
61 #[serde(rename = "rule")]
62 Rule,
63 #[serde(rename = "variable")]
64 Variable,
65 #[serde(rename = "waf")]
66 Waf,
67}
68
69impl Default for ExclusionType {
70 fn default() -> ExclusionType {
71 Self::Rule
72 }
73}
74#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
76pub enum Variable {
77 #[serde(rename = "req.cookies")]
78 ReqCookies,
79 #[serde(rename = "req.headers")]
80 ReqHeaders,
81 #[serde(rename = "req.post")]
82 ReqPost,
83 #[serde(rename = "req.post_filename")]
84 ReqPostFilename,
85 #[serde(rename = "req.qs")]
86 ReqQs,
87 #[serde(rename = "null")]
88 Null,
89}
90
91impl Default for Variable {
92 fn default() -> Variable {
93 Self::ReqCookies
94 }
95}
96