@@ -41,18 +41,10 @@ type (
41
41
ConfigID int `json:"configId,omitempty"`
42
42
Version int `json:"version,omitempty"`
43
43
Policies []struct {
44
- PolicyID string `json:"policyId,omitempty"`
45
- PolicyName string `json:"policyName,omitempty"`
46
- HasRatePolicyWithAPIKey bool `json:"hasRatePolicyWithApiKey,omitempty"`
47
- PolicySecurityControls struct {
48
- ApplyApplicationLayerControls bool `json:"applyApplicationLayerControls,omitempty"`
49
- ApplyNetworkLayerControls bool `json:"applyNetworkLayerControls,omitempty"`
50
- ApplyRateControls bool `json:"applyRateControls,omitempty"`
51
- ApplyReputationControls bool `json:"applyReputationControls,omitempty"`
52
- ApplyBotmanControls bool `json:"applyBotmanControls,omitempty"`
53
- ApplyAPIConstraints bool `json:"applyApiConstraints,omitempty"`
54
- ApplySlowPostControls bool `json:"applySlowPostControls,omitempty"`
55
- } `json:"policySecurityControls,omitempty"`
44
+ PolicyID string `json:"policyId,omitempty"`
45
+ PolicyName string `json:"policyName,omitempty"`
46
+ HasRatePolicyWithAPIKey bool `json:"hasRatePolicyWithApiKey,omitempty"`
47
+ PolicySecurityControls * SecurityControls `json:"policySecurityControls,omitempty"`
56
48
} `json:"policies,omitempty"`
57
49
}
58
50
@@ -65,20 +57,12 @@ type (
65
57
66
58
// GetSecurityPolicyResponse is returned from a call to GetSecurityPolicy.
67
59
GetSecurityPolicyResponse struct {
68
- ConfigID int `json:"configId,omitempty"`
69
- PolicyID string `json:"policyId,omitempty"`
70
- PolicyName string `json:"policyName,omitempty"`
71
- DefaultSettings bool `json:"defaultSettings,omitempty"`
72
- PolicySecurityControls struct {
73
- ApplyAPIConstraints bool `json:"applyApiConstraints,omitempty"`
74
- ApplyApplicationLayerControls bool `json:"applyApplicationLayerControls,omitempty"`
75
- ApplyBotmanControls bool `json:"applyBotmanControls,omitempty"`
76
- ApplyNetworkLayerControls bool `json:"applyNetworkLayerControls,omitempty"`
77
- ApplyRateControls bool `json:"applyRateControls,omitempty"`
78
- ApplyReputationControls bool `json:"applyReputationControls,omitempty"`
79
- ApplySlowPostControls bool `json:"applySlowPostControls,omitempty"`
80
- } `json:"policySecurityControls,omitempty"`
81
- Version int `json:"version,omitempty"`
60
+ ConfigID int `json:"configId,omitempty"`
61
+ PolicyID string `json:"policyId,omitempty"`
62
+ PolicyName string `json:"policyName,omitempty"`
63
+ DefaultSettings bool `json:"defaultSettings,omitempty"`
64
+ PolicySecurityControls * SecurityControls `json:"policySecurityControls,omitempty"`
65
+ Version int `json:"version,omitempty"`
82
66
}
83
67
84
68
// CreateSecurityPolicyRequest is used to create a ecurity policy.
@@ -93,20 +77,12 @@ type (
93
77
94
78
// CreateSecurityPolicyResponse is returned from a call to CreateSecurityPolicy.
95
79
CreateSecurityPolicyResponse struct {
96
- ConfigID int `json:"configId"`
97
- PolicyID string `json:"policyId"`
98
- PolicyName string `json:"policyName"`
99
- DefaultSettings bool `json:"defaultSettings,omitempty"`
100
- PolicySecurityControls struct {
101
- ApplyAPIConstraints bool `json:"applyApiConstraints"`
102
- ApplyApplicationLayerControls bool `json:"applyApplicationLayerControls"`
103
- ApplyBotmanControls bool `json:"applyBotmanControls"`
104
- ApplyNetworkLayerControls bool `json:"applyNetworkLayerControls"`
105
- ApplyRateControls bool `json:"applyRateControls"`
106
- ApplyReputationControls bool `json:"applyReputationControls"`
107
- ApplySlowPostControls bool `json:"applySlowPostControls"`
108
- } `json:"policySecurityControls"`
109
- Version int `json:"version"`
80
+ ConfigID int `json:"configId"`
81
+ PolicyID string `json:"policyId"`
82
+ PolicyName string `json:"policyName"`
83
+ DefaultSettings bool `json:"defaultSettings,omitempty"`
84
+ PolicySecurityControls * SecurityControls `json:"policySecurityControls,omitempty"`
85
+ Version int `json:"version"`
110
86
}
111
87
112
88
// UpdateSecurityPolicyRequest is used to modify a security policy.
@@ -119,20 +95,12 @@ type (
119
95
120
96
// UpdateSecurityPolicyResponse is returned from a call to UpdateSecurityPolicy.
121
97
UpdateSecurityPolicyResponse struct {
122
- ConfigID int `json:"configId"`
123
- PolicyID string `json:"policyId"`
124
- PolicyName string `json:"policyName"`
125
- DefaultSettings bool `json:"defaultSettings,omitempty"`
126
- PolicySecurityControls struct {
127
- ApplyAPIConstraints bool `json:"applyApiConstraints"`
128
- ApplyApplicationLayerControls bool `json:"applyApplicationLayerControls"`
129
- ApplyBotmanControls bool `json:"applyBotmanControls"`
130
- ApplyNetworkLayerControls bool `json:"applyNetworkLayerControls"`
131
- ApplyRateControls bool `json:"applyRateControls"`
132
- ApplyReputationControls bool `json:"applyReputationControls"`
133
- ApplySlowPostControls bool `json:"applySlowPostControls"`
134
- } `json:"policySecurityControls"`
135
- Version int `json:"version"`
98
+ ConfigID int `json:"configId"`
99
+ PolicyID string `json:"policyId"`
100
+ PolicyName string `json:"policyName"`
101
+ DefaultSettings bool `json:"defaultSettings,omitempty"`
102
+ PolicySecurityControls * SecurityControls `json:"policySecurityControls,omitempty"`
103
+ Version int `json:"version"`
136
104
}
137
105
138
106
// RemoveSecurityPolicyRequest is used to remove a security policy.
@@ -144,19 +112,22 @@ type (
144
112
145
113
// RemoveSecurityPolicyResponse is returned from a call to RemoveSecurityPolicy.
146
114
RemoveSecurityPolicyResponse struct {
147
- ConfigID int `json:"configId"`
148
- PolicyID string `json:"policyId"`
149
- PolicyName string `json:"policyName"`
150
- PolicySecurityControls struct {
151
- ApplyAPIConstraints bool `json:"applyApiConstraints"`
152
- ApplyApplicationLayerControls bool `json:"applyApplicationLayerControls"`
153
- ApplyBotmanControls bool `json:"applyBotmanControls"`
154
- ApplyNetworkLayerControls bool `json:"applyNetworkLayerControls"`
155
- ApplyRateControls bool `json:"applyRateControls"`
156
- ApplyReputationControls bool `json:"applyReputationControls"`
157
- ApplySlowPostControls bool `json:"applySlowPostControls"`
158
- } `json:"policySecurityControls"`
159
- Version int `json:"version"`
115
+ ConfigID int `json:"configId"`
116
+ PolicyID string `json:"policyId"`
117
+ PolicyName string `json:"policyName"`
118
+ PolicySecurityControls * SecurityControls `json:"policySecurityControls,omitempty"`
119
+ Version int `json:"version"`
120
+ }
121
+
122
+ // SecurityControls is returned as part of GetSecurityPoliciesResponse and similar responses.
123
+ SecurityControls struct {
124
+ ApplyApplicationLayerControls bool `json:"applyApplicationLayerControls,omitempty"`
125
+ ApplyAPIConstraints bool `json:"applyApiConstraints,omitempty"`
126
+ ApplyBotmanControls bool `json:"applyBotmanControls,omitempty"`
127
+ ApplyNetworkLayerControls bool `json:"applyNetworkLayerControls,omitempty"`
128
+ ApplyRateControls bool `json:"applyRateControls,omitempty"`
129
+ ApplyReputationControls bool `json:"applyReputationControls,omitempty"`
130
+ ApplySlowPostControls bool `json:"applySlowPostControls,omitempty"`
160
131
}
161
132
)
162
133
0 commit comments