• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 SecurityPolicyRuleRateLimitOptionsOrBuilder
22     extends
23     // @@protoc_insertion_point(interface_extends:google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptions)
24     com.google.protobuf.MessageOrBuilder {
25 
26   /**
27    *
28    *
29    * <pre>
30    * Can only be specified if the action for the rule is "rate_based_ban". If specified, determines the time (in seconds) the traffic will continue to be banned by the rate limit after the rate falls below the threshold.
31    * </pre>
32    *
33    * <code>optional int32 ban_duration_sec = 42896726;</code>
34    *
35    * @return Whether the banDurationSec field is set.
36    */
hasBanDurationSec()37   boolean hasBanDurationSec();
38   /**
39    *
40    *
41    * <pre>
42    * Can only be specified if the action for the rule is "rate_based_ban". If specified, determines the time (in seconds) the traffic will continue to be banned by the rate limit after the rate falls below the threshold.
43    * </pre>
44    *
45    * <code>optional int32 ban_duration_sec = 42896726;</code>
46    *
47    * @return The banDurationSec.
48    */
getBanDurationSec()49   int getBanDurationSec();
50 
51   /**
52    *
53    *
54    * <pre>
55    * Can only be specified if the action for the rule is "rate_based_ban". If specified, the key will be banned for the configured 'ban_duration_sec' when the number of requests that exceed the 'rate_limit_threshold' also exceed this 'ban_threshold'.
56    * </pre>
57    *
58    * <code>
59    * optional .google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptionsThreshold ban_threshold = 501208123;
60    * </code>
61    *
62    * @return Whether the banThreshold field is set.
63    */
hasBanThreshold()64   boolean hasBanThreshold();
65   /**
66    *
67    *
68    * <pre>
69    * Can only be specified if the action for the rule is "rate_based_ban". If specified, the key will be banned for the configured 'ban_duration_sec' when the number of requests that exceed the 'rate_limit_threshold' also exceed this 'ban_threshold'.
70    * </pre>
71    *
72    * <code>
73    * optional .google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptionsThreshold ban_threshold = 501208123;
74    * </code>
75    *
76    * @return The banThreshold.
77    */
getBanThreshold()78   com.google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptionsThreshold getBanThreshold();
79   /**
80    *
81    *
82    * <pre>
83    * Can only be specified if the action for the rule is "rate_based_ban". If specified, the key will be banned for the configured 'ban_duration_sec' when the number of requests that exceed the 'rate_limit_threshold' also exceed this 'ban_threshold'.
84    * </pre>
85    *
86    * <code>
87    * optional .google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptionsThreshold ban_threshold = 501208123;
88    * </code>
89    */
90   com.google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptionsThresholdOrBuilder
getBanThresholdOrBuilder()91       getBanThresholdOrBuilder();
92 
93   /**
94    *
95    *
96    * <pre>
97    * Action to take for requests that are under the configured rate limit threshold. Valid option is "allow" only.
98    * </pre>
99    *
100    * <code>optional string conform_action = 517612367;</code>
101    *
102    * @return Whether the conformAction field is set.
103    */
hasConformAction()104   boolean hasConformAction();
105   /**
106    *
107    *
108    * <pre>
109    * Action to take for requests that are under the configured rate limit threshold. Valid option is "allow" only.
110    * </pre>
111    *
112    * <code>optional string conform_action = 517612367;</code>
113    *
114    * @return The conformAction.
115    */
getConformAction()116   java.lang.String getConformAction();
117   /**
118    *
119    *
120    * <pre>
121    * Action to take for requests that are under the configured rate limit threshold. Valid option is "allow" only.
122    * </pre>
123    *
124    * <code>optional string conform_action = 517612367;</code>
125    *
126    * @return The bytes for conformAction.
127    */
getConformActionBytes()128   com.google.protobuf.ByteString getConformActionBytes();
129 
130   /**
131    *
132    *
133    * <pre>
134    * Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if "enforceOnKey" is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. - HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes. - SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session. - REGION_CODE: The country/region from which the request originates.
135    * Check the EnforceOnKey enum for the list of possible values.
136    * </pre>
137    *
138    * <code>optional string enforce_on_key = 416648956;</code>
139    *
140    * @return Whether the enforceOnKey field is set.
141    */
hasEnforceOnKey()142   boolean hasEnforceOnKey();
143   /**
144    *
145    *
146    * <pre>
147    * Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if "enforceOnKey" is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. - HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes. - SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session. - REGION_CODE: The country/region from which the request originates.
148    * Check the EnforceOnKey enum for the list of possible values.
149    * </pre>
150    *
151    * <code>optional string enforce_on_key = 416648956;</code>
152    *
153    * @return The enforceOnKey.
154    */
getEnforceOnKey()155   java.lang.String getEnforceOnKey();
156   /**
157    *
158    *
159    * <pre>
160    * Determines the key to enforce the rate_limit_threshold on. Possible values are: - ALL: A single rate limit threshold is applied to all the requests matching this rule. This is the default value if "enforceOnKey" is not configured. - IP: The source IP address of the request is the key. Each IP has this limit enforced separately. - HTTP_HEADER: The value of the HTTP header whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the header value. If no such header is present in the request, the key type defaults to ALL. - XFF_IP: The first IP address (i.e. the originating client IP address) specified in the list of IPs under X-Forwarded-For HTTP header. If no such header is present or the value is not a valid IP, the key defaults to the source IP address of the request i.e. key type IP. - HTTP_COOKIE: The value of the HTTP cookie whose name is configured under "enforceOnKeyName". The key value is truncated to the first 128 bytes of the cookie value. If no such cookie is present in the request, the key type defaults to ALL. - HTTP_PATH: The URL path of the HTTP request. The key value is truncated to the first 128 bytes. - SNI: Server name indication in the TLS session of the HTTPS request. The key value is truncated to the first 128 bytes. The key type defaults to ALL on a HTTP session. - REGION_CODE: The country/region from which the request originates.
161    * Check the EnforceOnKey enum for the list of possible values.
162    * </pre>
163    *
164    * <code>optional string enforce_on_key = 416648956;</code>
165    *
166    * @return The bytes for enforceOnKey.
167    */
getEnforceOnKeyBytes()168   com.google.protobuf.ByteString getEnforceOnKeyBytes();
169 
170   /**
171    *
172    *
173    * <pre>
174    * Rate limit key name applicable only for the following key types: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value.
175    * </pre>
176    *
177    * <code>optional string enforce_on_key_name = 132555246;</code>
178    *
179    * @return Whether the enforceOnKeyName field is set.
180    */
hasEnforceOnKeyName()181   boolean hasEnforceOnKeyName();
182   /**
183    *
184    *
185    * <pre>
186    * Rate limit key name applicable only for the following key types: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value.
187    * </pre>
188    *
189    * <code>optional string enforce_on_key_name = 132555246;</code>
190    *
191    * @return The enforceOnKeyName.
192    */
getEnforceOnKeyName()193   java.lang.String getEnforceOnKeyName();
194   /**
195    *
196    *
197    * <pre>
198    * Rate limit key name applicable only for the following key types: HTTP_HEADER -- Name of the HTTP header whose value is taken as the key value. HTTP_COOKIE -- Name of the HTTP cookie whose value is taken as the key value.
199    * </pre>
200    *
201    * <code>optional string enforce_on_key_name = 132555246;</code>
202    *
203    * @return The bytes for enforceOnKeyName.
204    */
getEnforceOnKeyNameBytes()205   com.google.protobuf.ByteString getEnforceOnKeyNameBytes();
206 
207   /**
208    *
209    *
210    * <pre>
211    * Action to take for requests that are above the configured rate limit threshold, to either deny with a specified HTTP response code, or redirect to a different endpoint. Valid options are `deny(STATUS)`, where valid values for `STATUS` are 403, 404, 429, and 502, and `redirect`, where the redirect parameters come from `exceedRedirectOptions` below.
212    * </pre>
213    *
214    * <code>optional string exceed_action = 167159073;</code>
215    *
216    * @return Whether the exceedAction field is set.
217    */
hasExceedAction()218   boolean hasExceedAction();
219   /**
220    *
221    *
222    * <pre>
223    * Action to take for requests that are above the configured rate limit threshold, to either deny with a specified HTTP response code, or redirect to a different endpoint. Valid options are `deny(STATUS)`, where valid values for `STATUS` are 403, 404, 429, and 502, and `redirect`, where the redirect parameters come from `exceedRedirectOptions` below.
224    * </pre>
225    *
226    * <code>optional string exceed_action = 167159073;</code>
227    *
228    * @return The exceedAction.
229    */
getExceedAction()230   java.lang.String getExceedAction();
231   /**
232    *
233    *
234    * <pre>
235    * Action to take for requests that are above the configured rate limit threshold, to either deny with a specified HTTP response code, or redirect to a different endpoint. Valid options are `deny(STATUS)`, where valid values for `STATUS` are 403, 404, 429, and 502, and `redirect`, where the redirect parameters come from `exceedRedirectOptions` below.
236    * </pre>
237    *
238    * <code>optional string exceed_action = 167159073;</code>
239    *
240    * @return The bytes for exceedAction.
241    */
getExceedActionBytes()242   com.google.protobuf.ByteString getExceedActionBytes();
243 
244   /**
245    *
246    *
247    * <pre>
248    * Parameters defining the redirect action that is used as the exceed action. Cannot be specified if the exceed action is not redirect.
249    * </pre>
250    *
251    * <code>
252    * optional .google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions exceed_redirect_options = 473646694;
253    * </code>
254    *
255    * @return Whether the exceedRedirectOptions field is set.
256    */
hasExceedRedirectOptions()257   boolean hasExceedRedirectOptions();
258   /**
259    *
260    *
261    * <pre>
262    * Parameters defining the redirect action that is used as the exceed action. Cannot be specified if the exceed action is not redirect.
263    * </pre>
264    *
265    * <code>
266    * optional .google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions exceed_redirect_options = 473646694;
267    * </code>
268    *
269    * @return The exceedRedirectOptions.
270    */
getExceedRedirectOptions()271   com.google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions getExceedRedirectOptions();
272   /**
273    *
274    *
275    * <pre>
276    * Parameters defining the redirect action that is used as the exceed action. Cannot be specified if the exceed action is not redirect.
277    * </pre>
278    *
279    * <code>
280    * optional .google.cloud.compute.v1.SecurityPolicyRuleRedirectOptions exceed_redirect_options = 473646694;
281    * </code>
282    */
283   com.google.cloud.compute.v1.SecurityPolicyRuleRedirectOptionsOrBuilder
getExceedRedirectOptionsOrBuilder()284       getExceedRedirectOptionsOrBuilder();
285 
286   /**
287    *
288    *
289    * <pre>
290    * Threshold at which to begin ratelimiting.
291    * </pre>
292    *
293    * <code>
294    * optional .google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptionsThreshold rate_limit_threshold = 315875208;
295    * </code>
296    *
297    * @return Whether the rateLimitThreshold field is set.
298    */
hasRateLimitThreshold()299   boolean hasRateLimitThreshold();
300   /**
301    *
302    *
303    * <pre>
304    * Threshold at which to begin ratelimiting.
305    * </pre>
306    *
307    * <code>
308    * optional .google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptionsThreshold rate_limit_threshold = 315875208;
309    * </code>
310    *
311    * @return The rateLimitThreshold.
312    */
getRateLimitThreshold()313   com.google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptionsThreshold getRateLimitThreshold();
314   /**
315    *
316    *
317    * <pre>
318    * Threshold at which to begin ratelimiting.
319    * </pre>
320    *
321    * <code>
322    * optional .google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptionsThreshold rate_limit_threshold = 315875208;
323    * </code>
324    */
325   com.google.cloud.compute.v1.SecurityPolicyRuleRateLimitOptionsThresholdOrBuilder
getRateLimitThresholdOrBuilder()326       getRateLimitThresholdOrBuilder();
327 }
328