1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/cloud/compute/v1/compute.proto 18 19 package com.google.cloud.compute.v1; 20 21 public interface SecurityPolicyRuleOrBuilder 22 extends 23 // @@protoc_insertion_point(interface_extends:google.cloud.compute.v1.SecurityPolicyRule) 24 com.google.protobuf.MessageOrBuilder { 25 26 /** 27 * 28 * 29 * <pre> 30 * The Action to perform when the rule is matched. The following are the valid actions: - allow: allow access to target. - deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for `STATUS` are 403, 404, and 502. - rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rate_limit_options to be set. - redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. - throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rate_limit_options to be set for this. 31 * </pre> 32 * 33 * <code>optional string action = 187661878;</code> 34 * 35 * @return Whether the action field is set. 36 */ hasAction()37 boolean hasAction(); 38 /** 39 * 40 * 41 * <pre> 42 * The Action to perform when the rule is matched. The following are the valid actions: - allow: allow access to target. - deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for `STATUS` are 403, 404, and 502. - rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rate_limit_options to be set. - redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. - throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rate_limit_options to be set for this. 43 * </pre> 44 * 45 * <code>optional string action = 187661878;</code> 46 * 47 * @return The action. 48 */ getAction()49 java.lang.String getAction(); 50 /** 51 * 52 * 53 * <pre> 54 * The Action to perform when the rule is matched. The following are the valid actions: - allow: allow access to target. - deny(STATUS): deny access to target, returns the HTTP response code specified. Valid values for `STATUS` are 403, 404, and 502. - rate_based_ban: limit client traffic to the configured threshold and ban the client if the traffic exceeds the threshold. Configure parameters for this action in RateLimitOptions. Requires rate_limit_options to be set. - redirect: redirect to a different target. This can either be an internal reCAPTCHA redirect, or an external URL-based redirect via a 302 response. Parameters for this action can be configured via redirectOptions. - throttle: limit client traffic to the configured threshold. Configure parameters for this action in rateLimitOptions. Requires rate_limit_options to be set for this. 55 * </pre> 56 * 57 * <code>optional string action = 187661878;</code> 58 * 59 * @return The bytes for action. 60 */ getActionBytes()61 com.google.protobuf.ByteString getActionBytes(); 62 63 /** 64 * 65 * 66 * <pre> 67 * An optional description of this resource. Provide this property when you create the resource. 68 * </pre> 69 * 70 * <code>optional string description = 422937596;</code> 71 * 72 * @return Whether the description field is set. 73 */ hasDescription()74 boolean hasDescription(); 75 /** 76 * 77 * 78 * <pre> 79 * An optional description of this resource. Provide this property when you create the resource. 80 * </pre> 81 * 82 * <code>optional string description = 422937596;</code> 83 * 84 * @return The description. 85 */ getDescription()86 java.lang.String getDescription(); 87 /** 88 * 89 * 90 * <pre> 91 * An optional description of this resource. Provide this property when you create the resource. 92 * </pre> 93 * 94 * <code>optional string description = 422937596;</code> 95 * 96 * @return The bytes for description. 97 */ getDescriptionBytes()98 com.google.protobuf.ByteString getDescriptionBytes(); 99 100 /** 101 * 102 * 103 * <pre> 104 * Optional, additional actions that are performed on headers. 105 * </pre> 106 * 107 * <code> 108 * optional .google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderAction header_action = 328077352; 109 * </code> 110 * 111 * @return Whether the headerAction field is set. 112 */ hasHeaderAction()113 boolean hasHeaderAction(); 114 /** 115 * 116 * 117 * <pre> 118 * Optional, additional actions that are performed on headers. 119 * </pre> 120 * 121 * <code> 122 * optional .google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderAction header_action = 328077352; 123 * </code> 124 * 125 * @return The headerAction. 126 */ getHeaderAction()127 com.google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderAction getHeaderAction(); 128 /** 129 * 130 * 131 * <pre> 132 * Optional, additional actions that are performed on headers. 133 * </pre> 134 * 135 * <code> 136 * optional .google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderAction header_action = 328077352; 137 * </code> 138 */ 139 com.google.cloud.compute.v1.SecurityPolicyRuleHttpHeaderActionOrBuilder getHeaderActionOrBuilder()140 getHeaderActionOrBuilder(); 141 142 /** 143 * 144 * 145 * <pre> 146 * [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules 147 * </pre> 148 * 149 * <code>optional string kind = 3292052;</code> 150 * 151 * @return Whether the kind field is set. 152 */ hasKind()153 boolean hasKind(); 154 /** 155 * 156 * 157 * <pre> 158 * [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules 159 * </pre> 160 * 161 * <code>optional string kind = 3292052;</code> 162 * 163 * @return The kind. 164 */ getKind()165 java.lang.String getKind(); 166 /** 167 * 168 * 169 * <pre> 170 * [Output only] Type of the resource. Always compute#securityPolicyRule for security policy rules 171 * </pre> 172 * 173 * <code>optional string kind = 3292052;</code> 174 * 175 * @return The bytes for kind. 176 */ getKindBytes()177 com.google.protobuf.ByteString getKindBytes(); 178 179 /** 180 * 181 * 182 * <pre> 183 * A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. 184 * </pre> 185 * 186 * <code>optional .google.cloud.compute.v1.SecurityPolicyRuleMatcher match = 103668165;</code> 187 * 188 * @return Whether the match field is set. 189 */ hasMatch()190 boolean hasMatch(); 191 /** 192 * 193 * 194 * <pre> 195 * A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. 196 * </pre> 197 * 198 * <code>optional .google.cloud.compute.v1.SecurityPolicyRuleMatcher match = 103668165;</code> 199 * 200 * @return The match. 201 */ getMatch()202 com.google.cloud.compute.v1.SecurityPolicyRuleMatcher getMatch(); 203 /** 204 * 205 * 206 * <pre> 207 * A match condition that incoming traffic is evaluated against. If it evaluates to true, the corresponding 'action' is enforced. 208 * </pre> 209 * 210 * <code>optional .google.cloud.compute.v1.SecurityPolicyRuleMatcher match = 103668165;</code> 211 */ getMatchOrBuilder()212 com.google.cloud.compute.v1.SecurityPolicyRuleMatcherOrBuilder getMatchOrBuilder(); 213 214 /** 215 * 216 * 217 * <pre> 218 * Preconfigured WAF configuration to be applied for the rule. If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect. 219 * </pre> 220 * 221 * <code> 222 * optional .google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfig preconfigured_waf_config = 117805027; 223 * </code> 224 * 225 * @return Whether the preconfiguredWafConfig field is set. 226 */ hasPreconfiguredWafConfig()227 boolean hasPreconfiguredWafConfig(); 228 /** 229 * 230 * 231 * <pre> 232 * Preconfigured WAF configuration to be applied for the rule. If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect. 233 * </pre> 234 * 235 * <code> 236 * optional .google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfig preconfigured_waf_config = 117805027; 237 * </code> 238 * 239 * @return The preconfiguredWafConfig. 240 */ getPreconfiguredWafConfig()241 com.google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfig getPreconfiguredWafConfig(); 242 /** 243 * 244 * 245 * <pre> 246 * Preconfigured WAF configuration to be applied for the rule. If the rule does not evaluate preconfigured WAF rules, i.e., if evaluatePreconfiguredWaf() is not used, this field will have no effect. 247 * </pre> 248 * 249 * <code> 250 * optional .google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfig preconfigured_waf_config = 117805027; 251 * </code> 252 */ 253 com.google.cloud.compute.v1.SecurityPolicyRulePreconfiguredWafConfigOrBuilder getPreconfiguredWafConfigOrBuilder()254 getPreconfiguredWafConfigOrBuilder(); 255 256 /** 257 * 258 * 259 * <pre> 260 * If set to true, the specified action is not enforced. 261 * </pre> 262 * 263 * <code>optional bool preview = 218686408;</code> 264 * 265 * @return Whether the preview field is set. 266 */ hasPreview()267 boolean hasPreview(); 268 /** 269 * 270 * 271 * <pre> 272 * If set to true, the specified action is not enforced. 273 * </pre> 274 * 275 * <code>optional bool preview = 218686408;</code> 276 * 277 * @return The preview. 278 */ getPreview()279 boolean getPreview(); 280 281 /** 282 * 283 * 284 * <pre> 285 * An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority. 286 * </pre> 287 * 288 * <code>optional int32 priority = 445151652;</code> 289 * 290 * @return Whether the priority field is set. 291 */ hasPriority()292 boolean hasPriority(); 293 /** 294 * 295 * 296 * <pre> 297 * An integer indicating the priority of a rule in the list. The priority must be a positive value between 0 and 2147483647. Rules are evaluated from highest to lowest priority where 0 is the highest priority and 2147483647 is the lowest priority. 298 * </pre> 299 * 300 * <code>optional int32 priority = 445151652;</code> 301 * 302 * @return The priority. 303 */ getPriority()304 int getPriority(); 305 306 /** 307 * 308 * 309 * <pre> 310 * Must be specified if the action is "rate_based_ban" or "throttle". Cannot be specified for any other actions. 311 * </pre> 312 * 313 * <code> 314 * optional .google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptions rate_limit_options = 67544315; 315 * </code> 316 * 317 * @return Whether the rateLimitOptions field is set. 318 */ hasRateLimitOptions()319 boolean hasRateLimitOptions(); 320 /** 321 * 322 * 323 * <pre> 324 * Must be specified if the action is "rate_based_ban" or "throttle". Cannot be specified for any other actions. 325 * </pre> 326 * 327 * <code> 328 * optional .google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptions rate_limit_options = 67544315; 329 * </code> 330 * 331 * @return The rateLimitOptions. 332 */ getRateLimitOptions()333 com.google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptions getRateLimitOptions(); 334 /** 335 * 336 * 337 * <pre> 338 * Must be specified if the action is "rate_based_ban" or "throttle". Cannot be specified for any other actions. 339 * </pre> 340 * 341 * <code> 342 * optional .google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptions rate_limit_options = 67544315; 343 * </code> 344 */ 345 com.google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptionsOrBuilder getRateLimitOptionsOrBuilder()346 getRateLimitOptionsOrBuilder(); 347 348 /** 349 * 350 * 351 * <pre> 352 * Parameters defining the redirect action. Cannot be specified for any other actions. 353 * </pre> 354 * 355 * <code> 356 * optional .google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions redirect_options = 163285307; 357 * </code> 358 * 359 * @return Whether the redirectOptions field is set. 360 */ hasRedirectOptions()361 boolean hasRedirectOptions(); 362 /** 363 * 364 * 365 * <pre> 366 * Parameters defining the redirect action. Cannot be specified for any other actions. 367 * </pre> 368 * 369 * <code> 370 * optional .google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions redirect_options = 163285307; 371 * </code> 372 * 373 * @return The redirectOptions. 374 */ getRedirectOptions()375 com.google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions getRedirectOptions(); 376 /** 377 * 378 * 379 * <pre> 380 * Parameters defining the redirect action. Cannot be specified for any other actions. 381 * </pre> 382 * 383 * <code> 384 * optional .google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions redirect_options = 163285307; 385 * </code> 386 */ 387 com.google.cloud.compute.v1.SecurityPolicyRuleRedirectOptionsOrBuilder getRedirectOptionsOrBuilder()388 getRedirectOptionsOrBuilder(); 389 } 390