• 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 /**
22  *
23  *
24  * <pre>
25  * Represents a Google Cloud Armor security policy resource. Only external backend services that use load balancers can reference a security policy. For more information, see Google Cloud Armor security policy overview.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.compute.v1.SecurityPolicy}
29  */
30 public final class SecurityPolicy extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.SecurityPolicy)
33     SecurityPolicyOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use SecurityPolicy.newBuilder() to construct.
SecurityPolicy(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private SecurityPolicy(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
SecurityPolicy()40   private SecurityPolicy() {
41     creationTimestamp_ = "";
42     description_ = "";
43     fingerprint_ = "";
44     kind_ = "";
45     name_ = "";
46     region_ = "";
47     rules_ = java.util.Collections.emptyList();
48     selfLink_ = "";
49     type_ = "";
50   }
51 
52   @java.lang.Override
53   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)54   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
55     return new SecurityPolicy();
56   }
57 
58   @java.lang.Override
getUnknownFields()59   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
60     return this.unknownFields;
61   }
62 
getDescriptor()63   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
64     return com.google.cloud.compute.v1.Compute
65         .internal_static_google_cloud_compute_v1_SecurityPolicy_descriptor;
66   }
67 
68   @java.lang.Override
69   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()70       internalGetFieldAccessorTable() {
71     return com.google.cloud.compute.v1.Compute
72         .internal_static_google_cloud_compute_v1_SecurityPolicy_fieldAccessorTable
73         .ensureFieldAccessorsInitialized(
74             com.google.cloud.compute.v1.SecurityPolicy.class,
75             com.google.cloud.compute.v1.SecurityPolicy.Builder.class);
76   }
77 
78   /**
79    *
80    *
81    * <pre>
82    * The type indicates the intended use of the security policy. - CLOUD_ARMOR: Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers. - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache. - CLOUD_ARMOR_INTERNAL_SERVICE: Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application. - CLOUD_ARMOR_NETWORK: Cloud Armor network policies can be configured to filter packets targeting network load balancing resources such as backend services, target pools, target instances, and instances with external IPs. They filter requests before the request is served from the application. This field can be set only at resource creation time.
83    * </pre>
84    *
85    * Protobuf enum {@code google.cloud.compute.v1.SecurityPolicy.Type}
86    */
87   public enum Type implements com.google.protobuf.ProtocolMessageEnum {
88     /**
89      *
90      *
91      * <pre>
92      * A value indicating that the enum field is not set.
93      * </pre>
94      *
95      * <code>UNDEFINED_TYPE = 0;</code>
96      */
97     UNDEFINED_TYPE(0),
98     /** <code>CLOUD_ARMOR = 260640373;</code> */
99     CLOUD_ARMOR(260640373),
100     /** <code>CLOUD_ARMOR_EDGE = 250728775;</code> */
101     CLOUD_ARMOR_EDGE(250728775),
102     /** <code>CLOUD_ARMOR_NETWORK = 488527428;</code> */
103     CLOUD_ARMOR_NETWORK(488527428),
104     UNRECOGNIZED(-1),
105     ;
106 
107     /**
108      *
109      *
110      * <pre>
111      * A value indicating that the enum field is not set.
112      * </pre>
113      *
114      * <code>UNDEFINED_TYPE = 0;</code>
115      */
116     public static final int UNDEFINED_TYPE_VALUE = 0;
117     /** <code>CLOUD_ARMOR = 260640373;</code> */
118     public static final int CLOUD_ARMOR_VALUE = 260640373;
119     /** <code>CLOUD_ARMOR_EDGE = 250728775;</code> */
120     public static final int CLOUD_ARMOR_EDGE_VALUE = 250728775;
121     /** <code>CLOUD_ARMOR_NETWORK = 488527428;</code> */
122     public static final int CLOUD_ARMOR_NETWORK_VALUE = 488527428;
123 
getNumber()124     public final int getNumber() {
125       if (this == UNRECOGNIZED) {
126         throw new java.lang.IllegalArgumentException(
127             "Can't get the number of an unknown enum value.");
128       }
129       return value;
130     }
131 
132     /**
133      * @param value The numeric wire value of the corresponding enum entry.
134      * @return The enum associated with the given numeric wire value.
135      * @deprecated Use {@link #forNumber(int)} instead.
136      */
137     @java.lang.Deprecated
valueOf(int value)138     public static Type valueOf(int value) {
139       return forNumber(value);
140     }
141 
142     /**
143      * @param value The numeric wire value of the corresponding enum entry.
144      * @return The enum associated with the given numeric wire value.
145      */
forNumber(int value)146     public static Type forNumber(int value) {
147       switch (value) {
148         case 0:
149           return UNDEFINED_TYPE;
150         case 260640373:
151           return CLOUD_ARMOR;
152         case 250728775:
153           return CLOUD_ARMOR_EDGE;
154         case 488527428:
155           return CLOUD_ARMOR_NETWORK;
156         default:
157           return null;
158       }
159     }
160 
internalGetValueMap()161     public static com.google.protobuf.Internal.EnumLiteMap<Type> internalGetValueMap() {
162       return internalValueMap;
163     }
164 
165     private static final com.google.protobuf.Internal.EnumLiteMap<Type> internalValueMap =
166         new com.google.protobuf.Internal.EnumLiteMap<Type>() {
167           public Type findValueByNumber(int number) {
168             return Type.forNumber(number);
169           }
170         };
171 
getValueDescriptor()172     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
173       if (this == UNRECOGNIZED) {
174         throw new java.lang.IllegalStateException(
175             "Can't get the descriptor of an unrecognized enum value.");
176       }
177       return getDescriptor().getValues().get(ordinal());
178     }
179 
getDescriptorForType()180     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
181       return getDescriptor();
182     }
183 
getDescriptor()184     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
185       return com.google.cloud.compute.v1.SecurityPolicy.getDescriptor().getEnumTypes().get(0);
186     }
187 
188     private static final Type[] VALUES = values();
189 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)190     public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
191       if (desc.getType() != getDescriptor()) {
192         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
193       }
194       if (desc.getIndex() == -1) {
195         return UNRECOGNIZED;
196       }
197       return VALUES[desc.getIndex()];
198     }
199 
200     private final int value;
201 
Type(int value)202     private Type(int value) {
203       this.value = value;
204     }
205 
206     // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.SecurityPolicy.Type)
207   }
208 
209   private int bitField0_;
210   public static final int ADAPTIVE_PROTECTION_CONFIG_FIELD_NUMBER = 150240735;
211   private com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig
212       adaptiveProtectionConfig_;
213   /**
214    * <code>
215    * optional .google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig adaptive_protection_config = 150240735;
216    * </code>
217    *
218    * @return Whether the adaptiveProtectionConfig field is set.
219    */
220   @java.lang.Override
hasAdaptiveProtectionConfig()221   public boolean hasAdaptiveProtectionConfig() {
222     return ((bitField0_ & 0x00000001) != 0);
223   }
224   /**
225    * <code>
226    * optional .google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig adaptive_protection_config = 150240735;
227    * </code>
228    *
229    * @return The adaptiveProtectionConfig.
230    */
231   @java.lang.Override
232   public com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig
getAdaptiveProtectionConfig()233       getAdaptiveProtectionConfig() {
234     return adaptiveProtectionConfig_ == null
235         ? com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig.getDefaultInstance()
236         : adaptiveProtectionConfig_;
237   }
238   /**
239    * <code>
240    * optional .google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig adaptive_protection_config = 150240735;
241    * </code>
242    */
243   @java.lang.Override
244   public com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfigOrBuilder
getAdaptiveProtectionConfigOrBuilder()245       getAdaptiveProtectionConfigOrBuilder() {
246     return adaptiveProtectionConfig_ == null
247         ? com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig.getDefaultInstance()
248         : adaptiveProtectionConfig_;
249   }
250 
251   public static final int ADVANCED_OPTIONS_CONFIG_FIELD_NUMBER = 449276352;
252   private com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig advancedOptionsConfig_;
253   /**
254    * <code>
255    * optional .google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig advanced_options_config = 449276352;
256    * </code>
257    *
258    * @return Whether the advancedOptionsConfig field is set.
259    */
260   @java.lang.Override
hasAdvancedOptionsConfig()261   public boolean hasAdvancedOptionsConfig() {
262     return ((bitField0_ & 0x00000002) != 0);
263   }
264   /**
265    * <code>
266    * optional .google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig advanced_options_config = 449276352;
267    * </code>
268    *
269    * @return The advancedOptionsConfig.
270    */
271   @java.lang.Override
272   public com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig
getAdvancedOptionsConfig()273       getAdvancedOptionsConfig() {
274     return advancedOptionsConfig_ == null
275         ? com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig.getDefaultInstance()
276         : advancedOptionsConfig_;
277   }
278   /**
279    * <code>
280    * optional .google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig advanced_options_config = 449276352;
281    * </code>
282    */
283   @java.lang.Override
284   public com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfigOrBuilder
getAdvancedOptionsConfigOrBuilder()285       getAdvancedOptionsConfigOrBuilder() {
286     return advancedOptionsConfig_ == null
287         ? com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig.getDefaultInstance()
288         : advancedOptionsConfig_;
289   }
290 
291   public static final int CREATION_TIMESTAMP_FIELD_NUMBER = 30525366;
292 
293   @SuppressWarnings("serial")
294   private volatile java.lang.Object creationTimestamp_ = "";
295   /**
296    *
297    *
298    * <pre>
299    * [Output Only] Creation timestamp in RFC3339 text format.
300    * </pre>
301    *
302    * <code>optional string creation_timestamp = 30525366;</code>
303    *
304    * @return Whether the creationTimestamp field is set.
305    */
306   @java.lang.Override
hasCreationTimestamp()307   public boolean hasCreationTimestamp() {
308     return ((bitField0_ & 0x00000004) != 0);
309   }
310   /**
311    *
312    *
313    * <pre>
314    * [Output Only] Creation timestamp in RFC3339 text format.
315    * </pre>
316    *
317    * <code>optional string creation_timestamp = 30525366;</code>
318    *
319    * @return The creationTimestamp.
320    */
321   @java.lang.Override
getCreationTimestamp()322   public java.lang.String getCreationTimestamp() {
323     java.lang.Object ref = creationTimestamp_;
324     if (ref instanceof java.lang.String) {
325       return (java.lang.String) ref;
326     } else {
327       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
328       java.lang.String s = bs.toStringUtf8();
329       creationTimestamp_ = s;
330       return s;
331     }
332   }
333   /**
334    *
335    *
336    * <pre>
337    * [Output Only] Creation timestamp in RFC3339 text format.
338    * </pre>
339    *
340    * <code>optional string creation_timestamp = 30525366;</code>
341    *
342    * @return The bytes for creationTimestamp.
343    */
344   @java.lang.Override
getCreationTimestampBytes()345   public com.google.protobuf.ByteString getCreationTimestampBytes() {
346     java.lang.Object ref = creationTimestamp_;
347     if (ref instanceof java.lang.String) {
348       com.google.protobuf.ByteString b =
349           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
350       creationTimestamp_ = b;
351       return b;
352     } else {
353       return (com.google.protobuf.ByteString) ref;
354     }
355   }
356 
357   public static final int DDOS_PROTECTION_CONFIG_FIELD_NUMBER = 50315853;
358   private com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig ddosProtectionConfig_;
359   /**
360    * <code>
361    * optional .google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig ddos_protection_config = 50315853;
362    * </code>
363    *
364    * @return Whether the ddosProtectionConfig field is set.
365    */
366   @java.lang.Override
hasDdosProtectionConfig()367   public boolean hasDdosProtectionConfig() {
368     return ((bitField0_ & 0x00000008) != 0);
369   }
370   /**
371    * <code>
372    * optional .google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig ddos_protection_config = 50315853;
373    * </code>
374    *
375    * @return The ddosProtectionConfig.
376    */
377   @java.lang.Override
getDdosProtectionConfig()378   public com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig getDdosProtectionConfig() {
379     return ddosProtectionConfig_ == null
380         ? com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig.getDefaultInstance()
381         : ddosProtectionConfig_;
382   }
383   /**
384    * <code>
385    * optional .google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig ddos_protection_config = 50315853;
386    * </code>
387    */
388   @java.lang.Override
389   public com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfigOrBuilder
getDdosProtectionConfigOrBuilder()390       getDdosProtectionConfigOrBuilder() {
391     return ddosProtectionConfig_ == null
392         ? com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig.getDefaultInstance()
393         : ddosProtectionConfig_;
394   }
395 
396   public static final int DESCRIPTION_FIELD_NUMBER = 422937596;
397 
398   @SuppressWarnings("serial")
399   private volatile java.lang.Object description_ = "";
400   /**
401    *
402    *
403    * <pre>
404    * An optional description of this resource. Provide this property when you create the resource.
405    * </pre>
406    *
407    * <code>optional string description = 422937596;</code>
408    *
409    * @return Whether the description field is set.
410    */
411   @java.lang.Override
hasDescription()412   public boolean hasDescription() {
413     return ((bitField0_ & 0x00000010) != 0);
414   }
415   /**
416    *
417    *
418    * <pre>
419    * An optional description of this resource. Provide this property when you create the resource.
420    * </pre>
421    *
422    * <code>optional string description = 422937596;</code>
423    *
424    * @return The description.
425    */
426   @java.lang.Override
getDescription()427   public java.lang.String getDescription() {
428     java.lang.Object ref = description_;
429     if (ref instanceof java.lang.String) {
430       return (java.lang.String) ref;
431     } else {
432       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
433       java.lang.String s = bs.toStringUtf8();
434       description_ = s;
435       return s;
436     }
437   }
438   /**
439    *
440    *
441    * <pre>
442    * An optional description of this resource. Provide this property when you create the resource.
443    * </pre>
444    *
445    * <code>optional string description = 422937596;</code>
446    *
447    * @return The bytes for description.
448    */
449   @java.lang.Override
getDescriptionBytes()450   public com.google.protobuf.ByteString getDescriptionBytes() {
451     java.lang.Object ref = description_;
452     if (ref instanceof java.lang.String) {
453       com.google.protobuf.ByteString b =
454           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
455       description_ = b;
456       return b;
457     } else {
458       return (com.google.protobuf.ByteString) ref;
459     }
460   }
461 
462   public static final int FINGERPRINT_FIELD_NUMBER = 234678500;
463 
464   @SuppressWarnings("serial")
465   private volatile java.lang.Object fingerprint_ = "";
466   /**
467    *
468    *
469    * <pre>
470    * Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the security policy.
471    * </pre>
472    *
473    * <code>optional string fingerprint = 234678500;</code>
474    *
475    * @return Whether the fingerprint field is set.
476    */
477   @java.lang.Override
hasFingerprint()478   public boolean hasFingerprint() {
479     return ((bitField0_ & 0x00000020) != 0);
480   }
481   /**
482    *
483    *
484    * <pre>
485    * Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the security policy.
486    * </pre>
487    *
488    * <code>optional string fingerprint = 234678500;</code>
489    *
490    * @return The fingerprint.
491    */
492   @java.lang.Override
getFingerprint()493   public java.lang.String getFingerprint() {
494     java.lang.Object ref = fingerprint_;
495     if (ref instanceof java.lang.String) {
496       return (java.lang.String) ref;
497     } else {
498       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
499       java.lang.String s = bs.toStringUtf8();
500       fingerprint_ = s;
501       return s;
502     }
503   }
504   /**
505    *
506    *
507    * <pre>
508    * Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the security policy.
509    * </pre>
510    *
511    * <code>optional string fingerprint = 234678500;</code>
512    *
513    * @return The bytes for fingerprint.
514    */
515   @java.lang.Override
getFingerprintBytes()516   public com.google.protobuf.ByteString getFingerprintBytes() {
517     java.lang.Object ref = fingerprint_;
518     if (ref instanceof java.lang.String) {
519       com.google.protobuf.ByteString b =
520           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
521       fingerprint_ = b;
522       return b;
523     } else {
524       return (com.google.protobuf.ByteString) ref;
525     }
526   }
527 
528   public static final int ID_FIELD_NUMBER = 3355;
529   private long id_ = 0L;
530   /**
531    *
532    *
533    * <pre>
534    * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
535    * </pre>
536    *
537    * <code>optional uint64 id = 3355;</code>
538    *
539    * @return Whether the id field is set.
540    */
541   @java.lang.Override
hasId()542   public boolean hasId() {
543     return ((bitField0_ & 0x00000040) != 0);
544   }
545   /**
546    *
547    *
548    * <pre>
549    * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
550    * </pre>
551    *
552    * <code>optional uint64 id = 3355;</code>
553    *
554    * @return The id.
555    */
556   @java.lang.Override
getId()557   public long getId() {
558     return id_;
559   }
560 
561   public static final int KIND_FIELD_NUMBER = 3292052;
562 
563   @SuppressWarnings("serial")
564   private volatile java.lang.Object kind_ = "";
565   /**
566    *
567    *
568    * <pre>
569    * [Output only] Type of the resource. Always compute#securityPolicyfor security policies
570    * </pre>
571    *
572    * <code>optional string kind = 3292052;</code>
573    *
574    * @return Whether the kind field is set.
575    */
576   @java.lang.Override
hasKind()577   public boolean hasKind() {
578     return ((bitField0_ & 0x00000080) != 0);
579   }
580   /**
581    *
582    *
583    * <pre>
584    * [Output only] Type of the resource. Always compute#securityPolicyfor security policies
585    * </pre>
586    *
587    * <code>optional string kind = 3292052;</code>
588    *
589    * @return The kind.
590    */
591   @java.lang.Override
getKind()592   public java.lang.String getKind() {
593     java.lang.Object ref = kind_;
594     if (ref instanceof java.lang.String) {
595       return (java.lang.String) ref;
596     } else {
597       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
598       java.lang.String s = bs.toStringUtf8();
599       kind_ = s;
600       return s;
601     }
602   }
603   /**
604    *
605    *
606    * <pre>
607    * [Output only] Type of the resource. Always compute#securityPolicyfor security policies
608    * </pre>
609    *
610    * <code>optional string kind = 3292052;</code>
611    *
612    * @return The bytes for kind.
613    */
614   @java.lang.Override
getKindBytes()615   public com.google.protobuf.ByteString getKindBytes() {
616     java.lang.Object ref = kind_;
617     if (ref instanceof java.lang.String) {
618       com.google.protobuf.ByteString b =
619           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
620       kind_ = b;
621       return b;
622     } else {
623       return (com.google.protobuf.ByteString) ref;
624     }
625   }
626 
627   public static final int NAME_FIELD_NUMBER = 3373707;
628 
629   @SuppressWarnings("serial")
630   private volatile java.lang.Object name_ = "";
631   /**
632    *
633    *
634    * <pre>
635    * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
636    * </pre>
637    *
638    * <code>optional string name = 3373707;</code>
639    *
640    * @return Whether the name field is set.
641    */
642   @java.lang.Override
hasName()643   public boolean hasName() {
644     return ((bitField0_ & 0x00000100) != 0);
645   }
646   /**
647    *
648    *
649    * <pre>
650    * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
651    * </pre>
652    *
653    * <code>optional string name = 3373707;</code>
654    *
655    * @return The name.
656    */
657   @java.lang.Override
getName()658   public java.lang.String getName() {
659     java.lang.Object ref = name_;
660     if (ref instanceof java.lang.String) {
661       return (java.lang.String) ref;
662     } else {
663       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
664       java.lang.String s = bs.toStringUtf8();
665       name_ = s;
666       return s;
667     }
668   }
669   /**
670    *
671    *
672    * <pre>
673    * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
674    * </pre>
675    *
676    * <code>optional string name = 3373707;</code>
677    *
678    * @return The bytes for name.
679    */
680   @java.lang.Override
getNameBytes()681   public com.google.protobuf.ByteString getNameBytes() {
682     java.lang.Object ref = name_;
683     if (ref instanceof java.lang.String) {
684       com.google.protobuf.ByteString b =
685           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
686       name_ = b;
687       return b;
688     } else {
689       return (com.google.protobuf.ByteString) ref;
690     }
691   }
692 
693   public static final int RECAPTCHA_OPTIONS_CONFIG_FIELD_NUMBER = 519006811;
694   private com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig recaptchaOptionsConfig_;
695   /**
696    * <code>
697    * optional .google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig recaptcha_options_config = 519006811;
698    * </code>
699    *
700    * @return Whether the recaptchaOptionsConfig field is set.
701    */
702   @java.lang.Override
hasRecaptchaOptionsConfig()703   public boolean hasRecaptchaOptionsConfig() {
704     return ((bitField0_ & 0x00000200) != 0);
705   }
706   /**
707    * <code>
708    * optional .google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig recaptcha_options_config = 519006811;
709    * </code>
710    *
711    * @return The recaptchaOptionsConfig.
712    */
713   @java.lang.Override
714   public com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig
getRecaptchaOptionsConfig()715       getRecaptchaOptionsConfig() {
716     return recaptchaOptionsConfig_ == null
717         ? com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig.getDefaultInstance()
718         : recaptchaOptionsConfig_;
719   }
720   /**
721    * <code>
722    * optional .google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig recaptcha_options_config = 519006811;
723    * </code>
724    */
725   @java.lang.Override
726   public com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfigOrBuilder
getRecaptchaOptionsConfigOrBuilder()727       getRecaptchaOptionsConfigOrBuilder() {
728     return recaptchaOptionsConfig_ == null
729         ? com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig.getDefaultInstance()
730         : recaptchaOptionsConfig_;
731   }
732 
733   public static final int REGION_FIELD_NUMBER = 138946292;
734 
735   @SuppressWarnings("serial")
736   private volatile java.lang.Object region_ = "";
737   /**
738    *
739    *
740    * <pre>
741    * [Output Only] URL of the region where the regional security policy resides. This field is not applicable to global security policies.
742    * </pre>
743    *
744    * <code>optional string region = 138946292;</code>
745    *
746    * @return Whether the region field is set.
747    */
748   @java.lang.Override
hasRegion()749   public boolean hasRegion() {
750     return ((bitField0_ & 0x00000400) != 0);
751   }
752   /**
753    *
754    *
755    * <pre>
756    * [Output Only] URL of the region where the regional security policy resides. This field is not applicable to global security policies.
757    * </pre>
758    *
759    * <code>optional string region = 138946292;</code>
760    *
761    * @return The region.
762    */
763   @java.lang.Override
getRegion()764   public java.lang.String getRegion() {
765     java.lang.Object ref = region_;
766     if (ref instanceof java.lang.String) {
767       return (java.lang.String) ref;
768     } else {
769       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
770       java.lang.String s = bs.toStringUtf8();
771       region_ = s;
772       return s;
773     }
774   }
775   /**
776    *
777    *
778    * <pre>
779    * [Output Only] URL of the region where the regional security policy resides. This field is not applicable to global security policies.
780    * </pre>
781    *
782    * <code>optional string region = 138946292;</code>
783    *
784    * @return The bytes for region.
785    */
786   @java.lang.Override
getRegionBytes()787   public com.google.protobuf.ByteString getRegionBytes() {
788     java.lang.Object ref = region_;
789     if (ref instanceof java.lang.String) {
790       com.google.protobuf.ByteString b =
791           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
792       region_ = b;
793       return b;
794     } else {
795       return (com.google.protobuf.ByteString) ref;
796     }
797   }
798 
799   public static final int RULES_FIELD_NUMBER = 108873975;
800 
801   @SuppressWarnings("serial")
802   private java.util.List<com.google.cloud.compute.v1.SecurityPolicyRule> rules_;
803   /**
804    *
805    *
806    * <pre>
807    * A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition this means match "*" for srcIpRanges and for the networkMatch condition every field must be either match "*" or not set). If no rules are provided when creating a security policy, a default rule with action "allow" will be added.
808    * </pre>
809    *
810    * <code>repeated .google.cloud.compute.v1.SecurityPolicyRule rules = 108873975;</code>
811    */
812   @java.lang.Override
getRulesList()813   public java.util.List<com.google.cloud.compute.v1.SecurityPolicyRule> getRulesList() {
814     return rules_;
815   }
816   /**
817    *
818    *
819    * <pre>
820    * A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition this means match "*" for srcIpRanges and for the networkMatch condition every field must be either match "*" or not set). If no rules are provided when creating a security policy, a default rule with action "allow" will be added.
821    * </pre>
822    *
823    * <code>repeated .google.cloud.compute.v1.SecurityPolicyRule rules = 108873975;</code>
824    */
825   @java.lang.Override
826   public java.util.List<? extends com.google.cloud.compute.v1.SecurityPolicyRuleOrBuilder>
getRulesOrBuilderList()827       getRulesOrBuilderList() {
828     return rules_;
829   }
830   /**
831    *
832    *
833    * <pre>
834    * A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition this means match "*" for srcIpRanges and for the networkMatch condition every field must be either match "*" or not set). If no rules are provided when creating a security policy, a default rule with action "allow" will be added.
835    * </pre>
836    *
837    * <code>repeated .google.cloud.compute.v1.SecurityPolicyRule rules = 108873975;</code>
838    */
839   @java.lang.Override
getRulesCount()840   public int getRulesCount() {
841     return rules_.size();
842   }
843   /**
844    *
845    *
846    * <pre>
847    * A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition this means match "*" for srcIpRanges and for the networkMatch condition every field must be either match "*" or not set). If no rules are provided when creating a security policy, a default rule with action "allow" will be added.
848    * </pre>
849    *
850    * <code>repeated .google.cloud.compute.v1.SecurityPolicyRule rules = 108873975;</code>
851    */
852   @java.lang.Override
getRules(int index)853   public com.google.cloud.compute.v1.SecurityPolicyRule getRules(int index) {
854     return rules_.get(index);
855   }
856   /**
857    *
858    *
859    * <pre>
860    * A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition this means match "*" for srcIpRanges and for the networkMatch condition every field must be either match "*" or not set). If no rules are provided when creating a security policy, a default rule with action "allow" will be added.
861    * </pre>
862    *
863    * <code>repeated .google.cloud.compute.v1.SecurityPolicyRule rules = 108873975;</code>
864    */
865   @java.lang.Override
getRulesOrBuilder(int index)866   public com.google.cloud.compute.v1.SecurityPolicyRuleOrBuilder getRulesOrBuilder(int index) {
867     return rules_.get(index);
868   }
869 
870   public static final int SELF_LINK_FIELD_NUMBER = 456214797;
871 
872   @SuppressWarnings("serial")
873   private volatile java.lang.Object selfLink_ = "";
874   /**
875    *
876    *
877    * <pre>
878    * [Output Only] Server-defined URL for the resource.
879    * </pre>
880    *
881    * <code>optional string self_link = 456214797;</code>
882    *
883    * @return Whether the selfLink field is set.
884    */
885   @java.lang.Override
hasSelfLink()886   public boolean hasSelfLink() {
887     return ((bitField0_ & 0x00000800) != 0);
888   }
889   /**
890    *
891    *
892    * <pre>
893    * [Output Only] Server-defined URL for the resource.
894    * </pre>
895    *
896    * <code>optional string self_link = 456214797;</code>
897    *
898    * @return The selfLink.
899    */
900   @java.lang.Override
getSelfLink()901   public java.lang.String getSelfLink() {
902     java.lang.Object ref = selfLink_;
903     if (ref instanceof java.lang.String) {
904       return (java.lang.String) ref;
905     } else {
906       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
907       java.lang.String s = bs.toStringUtf8();
908       selfLink_ = s;
909       return s;
910     }
911   }
912   /**
913    *
914    *
915    * <pre>
916    * [Output Only] Server-defined URL for the resource.
917    * </pre>
918    *
919    * <code>optional string self_link = 456214797;</code>
920    *
921    * @return The bytes for selfLink.
922    */
923   @java.lang.Override
getSelfLinkBytes()924   public com.google.protobuf.ByteString getSelfLinkBytes() {
925     java.lang.Object ref = selfLink_;
926     if (ref instanceof java.lang.String) {
927       com.google.protobuf.ByteString b =
928           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
929       selfLink_ = b;
930       return b;
931     } else {
932       return (com.google.protobuf.ByteString) ref;
933     }
934   }
935 
936   public static final int TYPE_FIELD_NUMBER = 3575610;
937 
938   @SuppressWarnings("serial")
939   private volatile java.lang.Object type_ = "";
940   /**
941    *
942    *
943    * <pre>
944    * The type indicates the intended use of the security policy. - CLOUD_ARMOR: Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers. - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache. - CLOUD_ARMOR_INTERNAL_SERVICE: Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application. - CLOUD_ARMOR_NETWORK: Cloud Armor network policies can be configured to filter packets targeting network load balancing resources such as backend services, target pools, target instances, and instances with external IPs. They filter requests before the request is served from the application. This field can be set only at resource creation time.
945    * Check the Type enum for the list of possible values.
946    * </pre>
947    *
948    * <code>optional string type = 3575610;</code>
949    *
950    * @return Whether the type field is set.
951    */
952   @java.lang.Override
hasType()953   public boolean hasType() {
954     return ((bitField0_ & 0x00001000) != 0);
955   }
956   /**
957    *
958    *
959    * <pre>
960    * The type indicates the intended use of the security policy. - CLOUD_ARMOR: Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers. - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache. - CLOUD_ARMOR_INTERNAL_SERVICE: Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application. - CLOUD_ARMOR_NETWORK: Cloud Armor network policies can be configured to filter packets targeting network load balancing resources such as backend services, target pools, target instances, and instances with external IPs. They filter requests before the request is served from the application. This field can be set only at resource creation time.
961    * Check the Type enum for the list of possible values.
962    * </pre>
963    *
964    * <code>optional string type = 3575610;</code>
965    *
966    * @return The type.
967    */
968   @java.lang.Override
getType()969   public java.lang.String getType() {
970     java.lang.Object ref = type_;
971     if (ref instanceof java.lang.String) {
972       return (java.lang.String) ref;
973     } else {
974       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
975       java.lang.String s = bs.toStringUtf8();
976       type_ = s;
977       return s;
978     }
979   }
980   /**
981    *
982    *
983    * <pre>
984    * The type indicates the intended use of the security policy. - CLOUD_ARMOR: Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers. - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache. - CLOUD_ARMOR_INTERNAL_SERVICE: Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application. - CLOUD_ARMOR_NETWORK: Cloud Armor network policies can be configured to filter packets targeting network load balancing resources such as backend services, target pools, target instances, and instances with external IPs. They filter requests before the request is served from the application. This field can be set only at resource creation time.
985    * Check the Type enum for the list of possible values.
986    * </pre>
987    *
988    * <code>optional string type = 3575610;</code>
989    *
990    * @return The bytes for type.
991    */
992   @java.lang.Override
getTypeBytes()993   public com.google.protobuf.ByteString getTypeBytes() {
994     java.lang.Object ref = type_;
995     if (ref instanceof java.lang.String) {
996       com.google.protobuf.ByteString b =
997           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
998       type_ = b;
999       return b;
1000     } else {
1001       return (com.google.protobuf.ByteString) ref;
1002     }
1003   }
1004 
1005   private byte memoizedIsInitialized = -1;
1006 
1007   @java.lang.Override
isInitialized()1008   public final boolean isInitialized() {
1009     byte isInitialized = memoizedIsInitialized;
1010     if (isInitialized == 1) return true;
1011     if (isInitialized == 0) return false;
1012 
1013     memoizedIsInitialized = 1;
1014     return true;
1015   }
1016 
1017   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)1018   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
1019     if (((bitField0_ & 0x00000040) != 0)) {
1020       output.writeUInt64(3355, id_);
1021     }
1022     if (((bitField0_ & 0x00000080) != 0)) {
1023       com.google.protobuf.GeneratedMessageV3.writeString(output, 3292052, kind_);
1024     }
1025     if (((bitField0_ & 0x00000100) != 0)) {
1026       com.google.protobuf.GeneratedMessageV3.writeString(output, 3373707, name_);
1027     }
1028     if (((bitField0_ & 0x00001000) != 0)) {
1029       com.google.protobuf.GeneratedMessageV3.writeString(output, 3575610, type_);
1030     }
1031     if (((bitField0_ & 0x00000004) != 0)) {
1032       com.google.protobuf.GeneratedMessageV3.writeString(output, 30525366, creationTimestamp_);
1033     }
1034     if (((bitField0_ & 0x00000008) != 0)) {
1035       output.writeMessage(50315853, getDdosProtectionConfig());
1036     }
1037     for (int i = 0; i < rules_.size(); i++) {
1038       output.writeMessage(108873975, rules_.get(i));
1039     }
1040     if (((bitField0_ & 0x00000400) != 0)) {
1041       com.google.protobuf.GeneratedMessageV3.writeString(output, 138946292, region_);
1042     }
1043     if (((bitField0_ & 0x00000001) != 0)) {
1044       output.writeMessage(150240735, getAdaptiveProtectionConfig());
1045     }
1046     if (((bitField0_ & 0x00000020) != 0)) {
1047       com.google.protobuf.GeneratedMessageV3.writeString(output, 234678500, fingerprint_);
1048     }
1049     if (((bitField0_ & 0x00000010) != 0)) {
1050       com.google.protobuf.GeneratedMessageV3.writeString(output, 422937596, description_);
1051     }
1052     if (((bitField0_ & 0x00000002) != 0)) {
1053       output.writeMessage(449276352, getAdvancedOptionsConfig());
1054     }
1055     if (((bitField0_ & 0x00000800) != 0)) {
1056       com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_);
1057     }
1058     if (((bitField0_ & 0x00000200) != 0)) {
1059       output.writeMessage(519006811, getRecaptchaOptionsConfig());
1060     }
1061     getUnknownFields().writeTo(output);
1062   }
1063 
1064   @java.lang.Override
getSerializedSize()1065   public int getSerializedSize() {
1066     int size = memoizedSize;
1067     if (size != -1) return size;
1068 
1069     size = 0;
1070     if (((bitField0_ & 0x00000040) != 0)) {
1071       size += com.google.protobuf.CodedOutputStream.computeUInt64Size(3355, id_);
1072     }
1073     if (((bitField0_ & 0x00000080) != 0)) {
1074       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3292052, kind_);
1075     }
1076     if (((bitField0_ & 0x00000100) != 0)) {
1077       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3373707, name_);
1078     }
1079     if (((bitField0_ & 0x00001000) != 0)) {
1080       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3575610, type_);
1081     }
1082     if (((bitField0_ & 0x00000004) != 0)) {
1083       size +=
1084           com.google.protobuf.GeneratedMessageV3.computeStringSize(30525366, creationTimestamp_);
1085     }
1086     if (((bitField0_ & 0x00000008) != 0)) {
1087       size +=
1088           com.google.protobuf.CodedOutputStream.computeMessageSize(
1089               50315853, getDdosProtectionConfig());
1090     }
1091     for (int i = 0; i < rules_.size(); i++) {
1092       size += com.google.protobuf.CodedOutputStream.computeMessageSize(108873975, rules_.get(i));
1093     }
1094     if (((bitField0_ & 0x00000400) != 0)) {
1095       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(138946292, region_);
1096     }
1097     if (((bitField0_ & 0x00000001) != 0)) {
1098       size +=
1099           com.google.protobuf.CodedOutputStream.computeMessageSize(
1100               150240735, getAdaptiveProtectionConfig());
1101     }
1102     if (((bitField0_ & 0x00000020) != 0)) {
1103       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(234678500, fingerprint_);
1104     }
1105     if (((bitField0_ & 0x00000010) != 0)) {
1106       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(422937596, description_);
1107     }
1108     if (((bitField0_ & 0x00000002) != 0)) {
1109       size +=
1110           com.google.protobuf.CodedOutputStream.computeMessageSize(
1111               449276352, getAdvancedOptionsConfig());
1112     }
1113     if (((bitField0_ & 0x00000800) != 0)) {
1114       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_);
1115     }
1116     if (((bitField0_ & 0x00000200) != 0)) {
1117       size +=
1118           com.google.protobuf.CodedOutputStream.computeMessageSize(
1119               519006811, getRecaptchaOptionsConfig());
1120     }
1121     size += getUnknownFields().getSerializedSize();
1122     memoizedSize = size;
1123     return size;
1124   }
1125 
1126   @java.lang.Override
equals(final java.lang.Object obj)1127   public boolean equals(final java.lang.Object obj) {
1128     if (obj == this) {
1129       return true;
1130     }
1131     if (!(obj instanceof com.google.cloud.compute.v1.SecurityPolicy)) {
1132       return super.equals(obj);
1133     }
1134     com.google.cloud.compute.v1.SecurityPolicy other =
1135         (com.google.cloud.compute.v1.SecurityPolicy) obj;
1136 
1137     if (hasAdaptiveProtectionConfig() != other.hasAdaptiveProtectionConfig()) return false;
1138     if (hasAdaptiveProtectionConfig()) {
1139       if (!getAdaptiveProtectionConfig().equals(other.getAdaptiveProtectionConfig())) return false;
1140     }
1141     if (hasAdvancedOptionsConfig() != other.hasAdvancedOptionsConfig()) return false;
1142     if (hasAdvancedOptionsConfig()) {
1143       if (!getAdvancedOptionsConfig().equals(other.getAdvancedOptionsConfig())) return false;
1144     }
1145     if (hasCreationTimestamp() != other.hasCreationTimestamp()) return false;
1146     if (hasCreationTimestamp()) {
1147       if (!getCreationTimestamp().equals(other.getCreationTimestamp())) return false;
1148     }
1149     if (hasDdosProtectionConfig() != other.hasDdosProtectionConfig()) return false;
1150     if (hasDdosProtectionConfig()) {
1151       if (!getDdosProtectionConfig().equals(other.getDdosProtectionConfig())) return false;
1152     }
1153     if (hasDescription() != other.hasDescription()) return false;
1154     if (hasDescription()) {
1155       if (!getDescription().equals(other.getDescription())) return false;
1156     }
1157     if (hasFingerprint() != other.hasFingerprint()) return false;
1158     if (hasFingerprint()) {
1159       if (!getFingerprint().equals(other.getFingerprint())) return false;
1160     }
1161     if (hasId() != other.hasId()) return false;
1162     if (hasId()) {
1163       if (getId() != other.getId()) return false;
1164     }
1165     if (hasKind() != other.hasKind()) return false;
1166     if (hasKind()) {
1167       if (!getKind().equals(other.getKind())) return false;
1168     }
1169     if (hasName() != other.hasName()) return false;
1170     if (hasName()) {
1171       if (!getName().equals(other.getName())) return false;
1172     }
1173     if (hasRecaptchaOptionsConfig() != other.hasRecaptchaOptionsConfig()) return false;
1174     if (hasRecaptchaOptionsConfig()) {
1175       if (!getRecaptchaOptionsConfig().equals(other.getRecaptchaOptionsConfig())) return false;
1176     }
1177     if (hasRegion() != other.hasRegion()) return false;
1178     if (hasRegion()) {
1179       if (!getRegion().equals(other.getRegion())) return false;
1180     }
1181     if (!getRulesList().equals(other.getRulesList())) return false;
1182     if (hasSelfLink() != other.hasSelfLink()) return false;
1183     if (hasSelfLink()) {
1184       if (!getSelfLink().equals(other.getSelfLink())) return false;
1185     }
1186     if (hasType() != other.hasType()) return false;
1187     if (hasType()) {
1188       if (!getType().equals(other.getType())) return false;
1189     }
1190     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
1191     return true;
1192   }
1193 
1194   @java.lang.Override
hashCode()1195   public int hashCode() {
1196     if (memoizedHashCode != 0) {
1197       return memoizedHashCode;
1198     }
1199     int hash = 41;
1200     hash = (19 * hash) + getDescriptor().hashCode();
1201     if (hasAdaptiveProtectionConfig()) {
1202       hash = (37 * hash) + ADAPTIVE_PROTECTION_CONFIG_FIELD_NUMBER;
1203       hash = (53 * hash) + getAdaptiveProtectionConfig().hashCode();
1204     }
1205     if (hasAdvancedOptionsConfig()) {
1206       hash = (37 * hash) + ADVANCED_OPTIONS_CONFIG_FIELD_NUMBER;
1207       hash = (53 * hash) + getAdvancedOptionsConfig().hashCode();
1208     }
1209     if (hasCreationTimestamp()) {
1210       hash = (37 * hash) + CREATION_TIMESTAMP_FIELD_NUMBER;
1211       hash = (53 * hash) + getCreationTimestamp().hashCode();
1212     }
1213     if (hasDdosProtectionConfig()) {
1214       hash = (37 * hash) + DDOS_PROTECTION_CONFIG_FIELD_NUMBER;
1215       hash = (53 * hash) + getDdosProtectionConfig().hashCode();
1216     }
1217     if (hasDescription()) {
1218       hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
1219       hash = (53 * hash) + getDescription().hashCode();
1220     }
1221     if (hasFingerprint()) {
1222       hash = (37 * hash) + FINGERPRINT_FIELD_NUMBER;
1223       hash = (53 * hash) + getFingerprint().hashCode();
1224     }
1225     if (hasId()) {
1226       hash = (37 * hash) + ID_FIELD_NUMBER;
1227       hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getId());
1228     }
1229     if (hasKind()) {
1230       hash = (37 * hash) + KIND_FIELD_NUMBER;
1231       hash = (53 * hash) + getKind().hashCode();
1232     }
1233     if (hasName()) {
1234       hash = (37 * hash) + NAME_FIELD_NUMBER;
1235       hash = (53 * hash) + getName().hashCode();
1236     }
1237     if (hasRecaptchaOptionsConfig()) {
1238       hash = (37 * hash) + RECAPTCHA_OPTIONS_CONFIG_FIELD_NUMBER;
1239       hash = (53 * hash) + getRecaptchaOptionsConfig().hashCode();
1240     }
1241     if (hasRegion()) {
1242       hash = (37 * hash) + REGION_FIELD_NUMBER;
1243       hash = (53 * hash) + getRegion().hashCode();
1244     }
1245     if (getRulesCount() > 0) {
1246       hash = (37 * hash) + RULES_FIELD_NUMBER;
1247       hash = (53 * hash) + getRulesList().hashCode();
1248     }
1249     if (hasSelfLink()) {
1250       hash = (37 * hash) + SELF_LINK_FIELD_NUMBER;
1251       hash = (53 * hash) + getSelfLink().hashCode();
1252     }
1253     if (hasType()) {
1254       hash = (37 * hash) + TYPE_FIELD_NUMBER;
1255       hash = (53 * hash) + getType().hashCode();
1256     }
1257     hash = (29 * hash) + getUnknownFields().hashCode();
1258     memoizedHashCode = hash;
1259     return hash;
1260   }
1261 
parseFrom(java.nio.ByteBuffer data)1262   public static com.google.cloud.compute.v1.SecurityPolicy parseFrom(java.nio.ByteBuffer data)
1263       throws com.google.protobuf.InvalidProtocolBufferException {
1264     return PARSER.parseFrom(data);
1265   }
1266 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1267   public static com.google.cloud.compute.v1.SecurityPolicy parseFrom(
1268       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1269       throws com.google.protobuf.InvalidProtocolBufferException {
1270     return PARSER.parseFrom(data, extensionRegistry);
1271   }
1272 
parseFrom( com.google.protobuf.ByteString data)1273   public static com.google.cloud.compute.v1.SecurityPolicy parseFrom(
1274       com.google.protobuf.ByteString data)
1275       throws com.google.protobuf.InvalidProtocolBufferException {
1276     return PARSER.parseFrom(data);
1277   }
1278 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1279   public static com.google.cloud.compute.v1.SecurityPolicy parseFrom(
1280       com.google.protobuf.ByteString data,
1281       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1282       throws com.google.protobuf.InvalidProtocolBufferException {
1283     return PARSER.parseFrom(data, extensionRegistry);
1284   }
1285 
parseFrom(byte[] data)1286   public static com.google.cloud.compute.v1.SecurityPolicy parseFrom(byte[] data)
1287       throws com.google.protobuf.InvalidProtocolBufferException {
1288     return PARSER.parseFrom(data);
1289   }
1290 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1291   public static com.google.cloud.compute.v1.SecurityPolicy parseFrom(
1292       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1293       throws com.google.protobuf.InvalidProtocolBufferException {
1294     return PARSER.parseFrom(data, extensionRegistry);
1295   }
1296 
parseFrom(java.io.InputStream input)1297   public static com.google.cloud.compute.v1.SecurityPolicy parseFrom(java.io.InputStream input)
1298       throws java.io.IOException {
1299     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1300   }
1301 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1302   public static com.google.cloud.compute.v1.SecurityPolicy parseFrom(
1303       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1304       throws java.io.IOException {
1305     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1306         PARSER, input, extensionRegistry);
1307   }
1308 
parseDelimitedFrom( java.io.InputStream input)1309   public static com.google.cloud.compute.v1.SecurityPolicy parseDelimitedFrom(
1310       java.io.InputStream input) throws java.io.IOException {
1311     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
1312   }
1313 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1314   public static com.google.cloud.compute.v1.SecurityPolicy parseDelimitedFrom(
1315       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1316       throws java.io.IOException {
1317     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
1318         PARSER, input, extensionRegistry);
1319   }
1320 
parseFrom( com.google.protobuf.CodedInputStream input)1321   public static com.google.cloud.compute.v1.SecurityPolicy parseFrom(
1322       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
1323     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
1324   }
1325 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1326   public static com.google.cloud.compute.v1.SecurityPolicy parseFrom(
1327       com.google.protobuf.CodedInputStream input,
1328       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1329       throws java.io.IOException {
1330     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
1331         PARSER, input, extensionRegistry);
1332   }
1333 
1334   @java.lang.Override
newBuilderForType()1335   public Builder newBuilderForType() {
1336     return newBuilder();
1337   }
1338 
newBuilder()1339   public static Builder newBuilder() {
1340     return DEFAULT_INSTANCE.toBuilder();
1341   }
1342 
newBuilder(com.google.cloud.compute.v1.SecurityPolicy prototype)1343   public static Builder newBuilder(com.google.cloud.compute.v1.SecurityPolicy prototype) {
1344     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
1345   }
1346 
1347   @java.lang.Override
toBuilder()1348   public Builder toBuilder() {
1349     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
1350   }
1351 
1352   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1353   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1354     Builder builder = new Builder(parent);
1355     return builder;
1356   }
1357   /**
1358    *
1359    *
1360    * <pre>
1361    * Represents a Google Cloud Armor security policy resource. Only external backend services that use load balancers can reference a security policy. For more information, see Google Cloud Armor security policy overview.
1362    * </pre>
1363    *
1364    * Protobuf type {@code google.cloud.compute.v1.SecurityPolicy}
1365    */
1366   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
1367       implements
1368       // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.SecurityPolicy)
1369       com.google.cloud.compute.v1.SecurityPolicyOrBuilder {
getDescriptor()1370     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
1371       return com.google.cloud.compute.v1.Compute
1372           .internal_static_google_cloud_compute_v1_SecurityPolicy_descriptor;
1373     }
1374 
1375     @java.lang.Override
1376     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()1377         internalGetFieldAccessorTable() {
1378       return com.google.cloud.compute.v1.Compute
1379           .internal_static_google_cloud_compute_v1_SecurityPolicy_fieldAccessorTable
1380           .ensureFieldAccessorsInitialized(
1381               com.google.cloud.compute.v1.SecurityPolicy.class,
1382               com.google.cloud.compute.v1.SecurityPolicy.Builder.class);
1383     }
1384 
1385     // Construct using com.google.cloud.compute.v1.SecurityPolicy.newBuilder()
Builder()1386     private Builder() {
1387       maybeForceBuilderInitialization();
1388     }
1389 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1390     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
1391       super(parent);
1392       maybeForceBuilderInitialization();
1393     }
1394 
maybeForceBuilderInitialization()1395     private void maybeForceBuilderInitialization() {
1396       if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
1397         getAdaptiveProtectionConfigFieldBuilder();
1398         getAdvancedOptionsConfigFieldBuilder();
1399         getDdosProtectionConfigFieldBuilder();
1400         getRecaptchaOptionsConfigFieldBuilder();
1401         getRulesFieldBuilder();
1402       }
1403     }
1404 
1405     @java.lang.Override
clear()1406     public Builder clear() {
1407       super.clear();
1408       bitField0_ = 0;
1409       adaptiveProtectionConfig_ = null;
1410       if (adaptiveProtectionConfigBuilder_ != null) {
1411         adaptiveProtectionConfigBuilder_.dispose();
1412         adaptiveProtectionConfigBuilder_ = null;
1413       }
1414       advancedOptionsConfig_ = null;
1415       if (advancedOptionsConfigBuilder_ != null) {
1416         advancedOptionsConfigBuilder_.dispose();
1417         advancedOptionsConfigBuilder_ = null;
1418       }
1419       creationTimestamp_ = "";
1420       ddosProtectionConfig_ = null;
1421       if (ddosProtectionConfigBuilder_ != null) {
1422         ddosProtectionConfigBuilder_.dispose();
1423         ddosProtectionConfigBuilder_ = null;
1424       }
1425       description_ = "";
1426       fingerprint_ = "";
1427       id_ = 0L;
1428       kind_ = "";
1429       name_ = "";
1430       recaptchaOptionsConfig_ = null;
1431       if (recaptchaOptionsConfigBuilder_ != null) {
1432         recaptchaOptionsConfigBuilder_.dispose();
1433         recaptchaOptionsConfigBuilder_ = null;
1434       }
1435       region_ = "";
1436       if (rulesBuilder_ == null) {
1437         rules_ = java.util.Collections.emptyList();
1438       } else {
1439         rules_ = null;
1440         rulesBuilder_.clear();
1441       }
1442       bitField0_ = (bitField0_ & ~0x00000800);
1443       selfLink_ = "";
1444       type_ = "";
1445       return this;
1446     }
1447 
1448     @java.lang.Override
getDescriptorForType()1449     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
1450       return com.google.cloud.compute.v1.Compute
1451           .internal_static_google_cloud_compute_v1_SecurityPolicy_descriptor;
1452     }
1453 
1454     @java.lang.Override
getDefaultInstanceForType()1455     public com.google.cloud.compute.v1.SecurityPolicy getDefaultInstanceForType() {
1456       return com.google.cloud.compute.v1.SecurityPolicy.getDefaultInstance();
1457     }
1458 
1459     @java.lang.Override
build()1460     public com.google.cloud.compute.v1.SecurityPolicy build() {
1461       com.google.cloud.compute.v1.SecurityPolicy result = buildPartial();
1462       if (!result.isInitialized()) {
1463         throw newUninitializedMessageException(result);
1464       }
1465       return result;
1466     }
1467 
1468     @java.lang.Override
buildPartial()1469     public com.google.cloud.compute.v1.SecurityPolicy buildPartial() {
1470       com.google.cloud.compute.v1.SecurityPolicy result =
1471           new com.google.cloud.compute.v1.SecurityPolicy(this);
1472       buildPartialRepeatedFields(result);
1473       if (bitField0_ != 0) {
1474         buildPartial0(result);
1475       }
1476       onBuilt();
1477       return result;
1478     }
1479 
buildPartialRepeatedFields(com.google.cloud.compute.v1.SecurityPolicy result)1480     private void buildPartialRepeatedFields(com.google.cloud.compute.v1.SecurityPolicy result) {
1481       if (rulesBuilder_ == null) {
1482         if (((bitField0_ & 0x00000800) != 0)) {
1483           rules_ = java.util.Collections.unmodifiableList(rules_);
1484           bitField0_ = (bitField0_ & ~0x00000800);
1485         }
1486         result.rules_ = rules_;
1487       } else {
1488         result.rules_ = rulesBuilder_.build();
1489       }
1490     }
1491 
buildPartial0(com.google.cloud.compute.v1.SecurityPolicy result)1492     private void buildPartial0(com.google.cloud.compute.v1.SecurityPolicy result) {
1493       int from_bitField0_ = bitField0_;
1494       int to_bitField0_ = 0;
1495       if (((from_bitField0_ & 0x00000001) != 0)) {
1496         result.adaptiveProtectionConfig_ =
1497             adaptiveProtectionConfigBuilder_ == null
1498                 ? adaptiveProtectionConfig_
1499                 : adaptiveProtectionConfigBuilder_.build();
1500         to_bitField0_ |= 0x00000001;
1501       }
1502       if (((from_bitField0_ & 0x00000002) != 0)) {
1503         result.advancedOptionsConfig_ =
1504             advancedOptionsConfigBuilder_ == null
1505                 ? advancedOptionsConfig_
1506                 : advancedOptionsConfigBuilder_.build();
1507         to_bitField0_ |= 0x00000002;
1508       }
1509       if (((from_bitField0_ & 0x00000004) != 0)) {
1510         result.creationTimestamp_ = creationTimestamp_;
1511         to_bitField0_ |= 0x00000004;
1512       }
1513       if (((from_bitField0_ & 0x00000008) != 0)) {
1514         result.ddosProtectionConfig_ =
1515             ddosProtectionConfigBuilder_ == null
1516                 ? ddosProtectionConfig_
1517                 : ddosProtectionConfigBuilder_.build();
1518         to_bitField0_ |= 0x00000008;
1519       }
1520       if (((from_bitField0_ & 0x00000010) != 0)) {
1521         result.description_ = description_;
1522         to_bitField0_ |= 0x00000010;
1523       }
1524       if (((from_bitField0_ & 0x00000020) != 0)) {
1525         result.fingerprint_ = fingerprint_;
1526         to_bitField0_ |= 0x00000020;
1527       }
1528       if (((from_bitField0_ & 0x00000040) != 0)) {
1529         result.id_ = id_;
1530         to_bitField0_ |= 0x00000040;
1531       }
1532       if (((from_bitField0_ & 0x00000080) != 0)) {
1533         result.kind_ = kind_;
1534         to_bitField0_ |= 0x00000080;
1535       }
1536       if (((from_bitField0_ & 0x00000100) != 0)) {
1537         result.name_ = name_;
1538         to_bitField0_ |= 0x00000100;
1539       }
1540       if (((from_bitField0_ & 0x00000200) != 0)) {
1541         result.recaptchaOptionsConfig_ =
1542             recaptchaOptionsConfigBuilder_ == null
1543                 ? recaptchaOptionsConfig_
1544                 : recaptchaOptionsConfigBuilder_.build();
1545         to_bitField0_ |= 0x00000200;
1546       }
1547       if (((from_bitField0_ & 0x00000400) != 0)) {
1548         result.region_ = region_;
1549         to_bitField0_ |= 0x00000400;
1550       }
1551       if (((from_bitField0_ & 0x00001000) != 0)) {
1552         result.selfLink_ = selfLink_;
1553         to_bitField0_ |= 0x00000800;
1554       }
1555       if (((from_bitField0_ & 0x00002000) != 0)) {
1556         result.type_ = type_;
1557         to_bitField0_ |= 0x00001000;
1558       }
1559       result.bitField0_ |= to_bitField0_;
1560     }
1561 
1562     @java.lang.Override
clone()1563     public Builder clone() {
1564       return super.clone();
1565     }
1566 
1567     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1568     public Builder setField(
1569         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1570       return super.setField(field, value);
1571     }
1572 
1573     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1574     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
1575       return super.clearField(field);
1576     }
1577 
1578     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1579     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1580       return super.clearOneof(oneof);
1581     }
1582 
1583     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1584     public Builder setRepeatedField(
1585         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
1586       return super.setRepeatedField(field, index, value);
1587     }
1588 
1589     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1590     public Builder addRepeatedField(
1591         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1592       return super.addRepeatedField(field, value);
1593     }
1594 
1595     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)1596     public Builder mergeFrom(com.google.protobuf.Message other) {
1597       if (other instanceof com.google.cloud.compute.v1.SecurityPolicy) {
1598         return mergeFrom((com.google.cloud.compute.v1.SecurityPolicy) other);
1599       } else {
1600         super.mergeFrom(other);
1601         return this;
1602       }
1603     }
1604 
mergeFrom(com.google.cloud.compute.v1.SecurityPolicy other)1605     public Builder mergeFrom(com.google.cloud.compute.v1.SecurityPolicy other) {
1606       if (other == com.google.cloud.compute.v1.SecurityPolicy.getDefaultInstance()) return this;
1607       if (other.hasAdaptiveProtectionConfig()) {
1608         mergeAdaptiveProtectionConfig(other.getAdaptiveProtectionConfig());
1609       }
1610       if (other.hasAdvancedOptionsConfig()) {
1611         mergeAdvancedOptionsConfig(other.getAdvancedOptionsConfig());
1612       }
1613       if (other.hasCreationTimestamp()) {
1614         creationTimestamp_ = other.creationTimestamp_;
1615         bitField0_ |= 0x00000004;
1616         onChanged();
1617       }
1618       if (other.hasDdosProtectionConfig()) {
1619         mergeDdosProtectionConfig(other.getDdosProtectionConfig());
1620       }
1621       if (other.hasDescription()) {
1622         description_ = other.description_;
1623         bitField0_ |= 0x00000010;
1624         onChanged();
1625       }
1626       if (other.hasFingerprint()) {
1627         fingerprint_ = other.fingerprint_;
1628         bitField0_ |= 0x00000020;
1629         onChanged();
1630       }
1631       if (other.hasId()) {
1632         setId(other.getId());
1633       }
1634       if (other.hasKind()) {
1635         kind_ = other.kind_;
1636         bitField0_ |= 0x00000080;
1637         onChanged();
1638       }
1639       if (other.hasName()) {
1640         name_ = other.name_;
1641         bitField0_ |= 0x00000100;
1642         onChanged();
1643       }
1644       if (other.hasRecaptchaOptionsConfig()) {
1645         mergeRecaptchaOptionsConfig(other.getRecaptchaOptionsConfig());
1646       }
1647       if (other.hasRegion()) {
1648         region_ = other.region_;
1649         bitField0_ |= 0x00000400;
1650         onChanged();
1651       }
1652       if (rulesBuilder_ == null) {
1653         if (!other.rules_.isEmpty()) {
1654           if (rules_.isEmpty()) {
1655             rules_ = other.rules_;
1656             bitField0_ = (bitField0_ & ~0x00000800);
1657           } else {
1658             ensureRulesIsMutable();
1659             rules_.addAll(other.rules_);
1660           }
1661           onChanged();
1662         }
1663       } else {
1664         if (!other.rules_.isEmpty()) {
1665           if (rulesBuilder_.isEmpty()) {
1666             rulesBuilder_.dispose();
1667             rulesBuilder_ = null;
1668             rules_ = other.rules_;
1669             bitField0_ = (bitField0_ & ~0x00000800);
1670             rulesBuilder_ =
1671                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
1672                     ? getRulesFieldBuilder()
1673                     : null;
1674           } else {
1675             rulesBuilder_.addAllMessages(other.rules_);
1676           }
1677         }
1678       }
1679       if (other.hasSelfLink()) {
1680         selfLink_ = other.selfLink_;
1681         bitField0_ |= 0x00001000;
1682         onChanged();
1683       }
1684       if (other.hasType()) {
1685         type_ = other.type_;
1686         bitField0_ |= 0x00002000;
1687         onChanged();
1688       }
1689       this.mergeUnknownFields(other.getUnknownFields());
1690       onChanged();
1691       return this;
1692     }
1693 
1694     @java.lang.Override
isInitialized()1695     public final boolean isInitialized() {
1696       return true;
1697     }
1698 
1699     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1700     public Builder mergeFrom(
1701         com.google.protobuf.CodedInputStream input,
1702         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1703         throws java.io.IOException {
1704       if (extensionRegistry == null) {
1705         throw new java.lang.NullPointerException();
1706       }
1707       try {
1708         boolean done = false;
1709         while (!done) {
1710           int tag = input.readTag();
1711           switch (tag) {
1712             case 0:
1713               done = true;
1714               break;
1715             case 26840:
1716               {
1717                 id_ = input.readUInt64();
1718                 bitField0_ |= 0x00000040;
1719                 break;
1720               } // case 26840
1721             case 26336418:
1722               {
1723                 kind_ = input.readStringRequireUtf8();
1724                 bitField0_ |= 0x00000080;
1725                 break;
1726               } // case 26336418
1727             case 26989658:
1728               {
1729                 name_ = input.readStringRequireUtf8();
1730                 bitField0_ |= 0x00000100;
1731                 break;
1732               } // case 26989658
1733             case 28604882:
1734               {
1735                 type_ = input.readStringRequireUtf8();
1736                 bitField0_ |= 0x00002000;
1737                 break;
1738               } // case 28604882
1739             case 244202930:
1740               {
1741                 creationTimestamp_ = input.readStringRequireUtf8();
1742                 bitField0_ |= 0x00000004;
1743                 break;
1744               } // case 244202930
1745             case 402526826:
1746               {
1747                 input.readMessage(
1748                     getDdosProtectionConfigFieldBuilder().getBuilder(), extensionRegistry);
1749                 bitField0_ |= 0x00000008;
1750                 break;
1751               } // case 402526826
1752             case 870991802:
1753               {
1754                 com.google.cloud.compute.v1.SecurityPolicyRule m =
1755                     input.readMessage(
1756                         com.google.cloud.compute.v1.SecurityPolicyRule.parser(), extensionRegistry);
1757                 if (rulesBuilder_ == null) {
1758                   ensureRulesIsMutable();
1759                   rules_.add(m);
1760                 } else {
1761                   rulesBuilder_.addMessage(m);
1762                 }
1763                 break;
1764               } // case 870991802
1765             case 1111570338:
1766               {
1767                 region_ = input.readStringRequireUtf8();
1768                 bitField0_ |= 0x00000400;
1769                 break;
1770               } // case 1111570338
1771             case 1201925882:
1772               {
1773                 input.readMessage(
1774                     getAdaptiveProtectionConfigFieldBuilder().getBuilder(), extensionRegistry);
1775                 bitField0_ |= 0x00000001;
1776                 break;
1777               } // case 1201925882
1778             case 1877428002:
1779               {
1780                 fingerprint_ = input.readStringRequireUtf8();
1781                 bitField0_ |= 0x00000020;
1782                 break;
1783               } // case 1877428002
1784             case -911466526:
1785               {
1786                 description_ = input.readStringRequireUtf8();
1787                 bitField0_ |= 0x00000010;
1788                 break;
1789               } // case -911466526
1790             case -700756478:
1791               {
1792                 input.readMessage(
1793                     getAdvancedOptionsConfigFieldBuilder().getBuilder(), extensionRegistry);
1794                 bitField0_ |= 0x00000002;
1795                 break;
1796               } // case -700756478
1797             case -645248918:
1798               {
1799                 selfLink_ = input.readStringRequireUtf8();
1800                 bitField0_ |= 0x00001000;
1801                 break;
1802               } // case -645248918
1803             case -142912806:
1804               {
1805                 input.readMessage(
1806                     getRecaptchaOptionsConfigFieldBuilder().getBuilder(), extensionRegistry);
1807                 bitField0_ |= 0x00000200;
1808                 break;
1809               } // case -142912806
1810             default:
1811               {
1812                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1813                   done = true; // was an endgroup tag
1814                 }
1815                 break;
1816               } // default:
1817           } // switch (tag)
1818         } // while (!done)
1819       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1820         throw e.unwrapIOException();
1821       } finally {
1822         onChanged();
1823       } // finally
1824       return this;
1825     }
1826 
1827     private int bitField0_;
1828 
1829     private com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig
1830         adaptiveProtectionConfig_;
1831     private com.google.protobuf.SingleFieldBuilderV3<
1832             com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig,
1833             com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig.Builder,
1834             com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfigOrBuilder>
1835         adaptiveProtectionConfigBuilder_;
1836     /**
1837      * <code>
1838      * optional .google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig adaptive_protection_config = 150240735;
1839      * </code>
1840      *
1841      * @return Whether the adaptiveProtectionConfig field is set.
1842      */
hasAdaptiveProtectionConfig()1843     public boolean hasAdaptiveProtectionConfig() {
1844       return ((bitField0_ & 0x00000001) != 0);
1845     }
1846     /**
1847      * <code>
1848      * optional .google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig adaptive_protection_config = 150240735;
1849      * </code>
1850      *
1851      * @return The adaptiveProtectionConfig.
1852      */
1853     public com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig
getAdaptiveProtectionConfig()1854         getAdaptiveProtectionConfig() {
1855       if (adaptiveProtectionConfigBuilder_ == null) {
1856         return adaptiveProtectionConfig_ == null
1857             ? com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig
1858                 .getDefaultInstance()
1859             : adaptiveProtectionConfig_;
1860       } else {
1861         return adaptiveProtectionConfigBuilder_.getMessage();
1862       }
1863     }
1864     /**
1865      * <code>
1866      * optional .google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig adaptive_protection_config = 150240735;
1867      * </code>
1868      */
setAdaptiveProtectionConfig( com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig value)1869     public Builder setAdaptiveProtectionConfig(
1870         com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig value) {
1871       if (adaptiveProtectionConfigBuilder_ == null) {
1872         if (value == null) {
1873           throw new NullPointerException();
1874         }
1875         adaptiveProtectionConfig_ = value;
1876       } else {
1877         adaptiveProtectionConfigBuilder_.setMessage(value);
1878       }
1879       bitField0_ |= 0x00000001;
1880       onChanged();
1881       return this;
1882     }
1883     /**
1884      * <code>
1885      * optional .google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig adaptive_protection_config = 150240735;
1886      * </code>
1887      */
setAdaptiveProtectionConfig( com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig.Builder builderForValue)1888     public Builder setAdaptiveProtectionConfig(
1889         com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig.Builder
1890             builderForValue) {
1891       if (adaptiveProtectionConfigBuilder_ == null) {
1892         adaptiveProtectionConfig_ = builderForValue.build();
1893       } else {
1894         adaptiveProtectionConfigBuilder_.setMessage(builderForValue.build());
1895       }
1896       bitField0_ |= 0x00000001;
1897       onChanged();
1898       return this;
1899     }
1900     /**
1901      * <code>
1902      * optional .google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig adaptive_protection_config = 150240735;
1903      * </code>
1904      */
mergeAdaptiveProtectionConfig( com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig value)1905     public Builder mergeAdaptiveProtectionConfig(
1906         com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig value) {
1907       if (adaptiveProtectionConfigBuilder_ == null) {
1908         if (((bitField0_ & 0x00000001) != 0)
1909             && adaptiveProtectionConfig_ != null
1910             && adaptiveProtectionConfig_
1911                 != com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig
1912                     .getDefaultInstance()) {
1913           getAdaptiveProtectionConfigBuilder().mergeFrom(value);
1914         } else {
1915           adaptiveProtectionConfig_ = value;
1916         }
1917       } else {
1918         adaptiveProtectionConfigBuilder_.mergeFrom(value);
1919       }
1920       bitField0_ |= 0x00000001;
1921       onChanged();
1922       return this;
1923     }
1924     /**
1925      * <code>
1926      * optional .google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig adaptive_protection_config = 150240735;
1927      * </code>
1928      */
clearAdaptiveProtectionConfig()1929     public Builder clearAdaptiveProtectionConfig() {
1930       bitField0_ = (bitField0_ & ~0x00000001);
1931       adaptiveProtectionConfig_ = null;
1932       if (adaptiveProtectionConfigBuilder_ != null) {
1933         adaptiveProtectionConfigBuilder_.dispose();
1934         adaptiveProtectionConfigBuilder_ = null;
1935       }
1936       onChanged();
1937       return this;
1938     }
1939     /**
1940      * <code>
1941      * optional .google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig adaptive_protection_config = 150240735;
1942      * </code>
1943      */
1944     public com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig.Builder
getAdaptiveProtectionConfigBuilder()1945         getAdaptiveProtectionConfigBuilder() {
1946       bitField0_ |= 0x00000001;
1947       onChanged();
1948       return getAdaptiveProtectionConfigFieldBuilder().getBuilder();
1949     }
1950     /**
1951      * <code>
1952      * optional .google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig adaptive_protection_config = 150240735;
1953      * </code>
1954      */
1955     public com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfigOrBuilder
getAdaptiveProtectionConfigOrBuilder()1956         getAdaptiveProtectionConfigOrBuilder() {
1957       if (adaptiveProtectionConfigBuilder_ != null) {
1958         return adaptiveProtectionConfigBuilder_.getMessageOrBuilder();
1959       } else {
1960         return adaptiveProtectionConfig_ == null
1961             ? com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig
1962                 .getDefaultInstance()
1963             : adaptiveProtectionConfig_;
1964       }
1965     }
1966     /**
1967      * <code>
1968      * optional .google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig adaptive_protection_config = 150240735;
1969      * </code>
1970      */
1971     private com.google.protobuf.SingleFieldBuilderV3<
1972             com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig,
1973             com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig.Builder,
1974             com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfigOrBuilder>
getAdaptiveProtectionConfigFieldBuilder()1975         getAdaptiveProtectionConfigFieldBuilder() {
1976       if (adaptiveProtectionConfigBuilder_ == null) {
1977         adaptiveProtectionConfigBuilder_ =
1978             new com.google.protobuf.SingleFieldBuilderV3<
1979                 com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig,
1980                 com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfig.Builder,
1981                 com.google.cloud.compute.v1.SecurityPolicyAdaptiveProtectionConfigOrBuilder>(
1982                 getAdaptiveProtectionConfig(), getParentForChildren(), isClean());
1983         adaptiveProtectionConfig_ = null;
1984       }
1985       return adaptiveProtectionConfigBuilder_;
1986     }
1987 
1988     private com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig advancedOptionsConfig_;
1989     private com.google.protobuf.SingleFieldBuilderV3<
1990             com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig,
1991             com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig.Builder,
1992             com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfigOrBuilder>
1993         advancedOptionsConfigBuilder_;
1994     /**
1995      * <code>
1996      * optional .google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig advanced_options_config = 449276352;
1997      * </code>
1998      *
1999      * @return Whether the advancedOptionsConfig field is set.
2000      */
hasAdvancedOptionsConfig()2001     public boolean hasAdvancedOptionsConfig() {
2002       return ((bitField0_ & 0x00000002) != 0);
2003     }
2004     /**
2005      * <code>
2006      * optional .google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig advanced_options_config = 449276352;
2007      * </code>
2008      *
2009      * @return The advancedOptionsConfig.
2010      */
2011     public com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig
getAdvancedOptionsConfig()2012         getAdvancedOptionsConfig() {
2013       if (advancedOptionsConfigBuilder_ == null) {
2014         return advancedOptionsConfig_ == null
2015             ? com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig.getDefaultInstance()
2016             : advancedOptionsConfig_;
2017       } else {
2018         return advancedOptionsConfigBuilder_.getMessage();
2019       }
2020     }
2021     /**
2022      * <code>
2023      * optional .google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig advanced_options_config = 449276352;
2024      * </code>
2025      */
setAdvancedOptionsConfig( com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig value)2026     public Builder setAdvancedOptionsConfig(
2027         com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig value) {
2028       if (advancedOptionsConfigBuilder_ == null) {
2029         if (value == null) {
2030           throw new NullPointerException();
2031         }
2032         advancedOptionsConfig_ = value;
2033       } else {
2034         advancedOptionsConfigBuilder_.setMessage(value);
2035       }
2036       bitField0_ |= 0x00000002;
2037       onChanged();
2038       return this;
2039     }
2040     /**
2041      * <code>
2042      * optional .google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig advanced_options_config = 449276352;
2043      * </code>
2044      */
setAdvancedOptionsConfig( com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig.Builder builderForValue)2045     public Builder setAdvancedOptionsConfig(
2046         com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig.Builder builderForValue) {
2047       if (advancedOptionsConfigBuilder_ == null) {
2048         advancedOptionsConfig_ = builderForValue.build();
2049       } else {
2050         advancedOptionsConfigBuilder_.setMessage(builderForValue.build());
2051       }
2052       bitField0_ |= 0x00000002;
2053       onChanged();
2054       return this;
2055     }
2056     /**
2057      * <code>
2058      * optional .google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig advanced_options_config = 449276352;
2059      * </code>
2060      */
mergeAdvancedOptionsConfig( com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig value)2061     public Builder mergeAdvancedOptionsConfig(
2062         com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig value) {
2063       if (advancedOptionsConfigBuilder_ == null) {
2064         if (((bitField0_ & 0x00000002) != 0)
2065             && advancedOptionsConfig_ != null
2066             && advancedOptionsConfig_
2067                 != com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig
2068                     .getDefaultInstance()) {
2069           getAdvancedOptionsConfigBuilder().mergeFrom(value);
2070         } else {
2071           advancedOptionsConfig_ = value;
2072         }
2073       } else {
2074         advancedOptionsConfigBuilder_.mergeFrom(value);
2075       }
2076       bitField0_ |= 0x00000002;
2077       onChanged();
2078       return this;
2079     }
2080     /**
2081      * <code>
2082      * optional .google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig advanced_options_config = 449276352;
2083      * </code>
2084      */
clearAdvancedOptionsConfig()2085     public Builder clearAdvancedOptionsConfig() {
2086       bitField0_ = (bitField0_ & ~0x00000002);
2087       advancedOptionsConfig_ = null;
2088       if (advancedOptionsConfigBuilder_ != null) {
2089         advancedOptionsConfigBuilder_.dispose();
2090         advancedOptionsConfigBuilder_ = null;
2091       }
2092       onChanged();
2093       return this;
2094     }
2095     /**
2096      * <code>
2097      * optional .google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig advanced_options_config = 449276352;
2098      * </code>
2099      */
2100     public com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig.Builder
getAdvancedOptionsConfigBuilder()2101         getAdvancedOptionsConfigBuilder() {
2102       bitField0_ |= 0x00000002;
2103       onChanged();
2104       return getAdvancedOptionsConfigFieldBuilder().getBuilder();
2105     }
2106     /**
2107      * <code>
2108      * optional .google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig advanced_options_config = 449276352;
2109      * </code>
2110      */
2111     public com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfigOrBuilder
getAdvancedOptionsConfigOrBuilder()2112         getAdvancedOptionsConfigOrBuilder() {
2113       if (advancedOptionsConfigBuilder_ != null) {
2114         return advancedOptionsConfigBuilder_.getMessageOrBuilder();
2115       } else {
2116         return advancedOptionsConfig_ == null
2117             ? com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig.getDefaultInstance()
2118             : advancedOptionsConfig_;
2119       }
2120     }
2121     /**
2122      * <code>
2123      * optional .google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig advanced_options_config = 449276352;
2124      * </code>
2125      */
2126     private com.google.protobuf.SingleFieldBuilderV3<
2127             com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig,
2128             com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig.Builder,
2129             com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfigOrBuilder>
getAdvancedOptionsConfigFieldBuilder()2130         getAdvancedOptionsConfigFieldBuilder() {
2131       if (advancedOptionsConfigBuilder_ == null) {
2132         advancedOptionsConfigBuilder_ =
2133             new com.google.protobuf.SingleFieldBuilderV3<
2134                 com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig,
2135                 com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfig.Builder,
2136                 com.google.cloud.compute.v1.SecurityPolicyAdvancedOptionsConfigOrBuilder>(
2137                 getAdvancedOptionsConfig(), getParentForChildren(), isClean());
2138         advancedOptionsConfig_ = null;
2139       }
2140       return advancedOptionsConfigBuilder_;
2141     }
2142 
2143     private java.lang.Object creationTimestamp_ = "";
2144     /**
2145      *
2146      *
2147      * <pre>
2148      * [Output Only] Creation timestamp in RFC3339 text format.
2149      * </pre>
2150      *
2151      * <code>optional string creation_timestamp = 30525366;</code>
2152      *
2153      * @return Whether the creationTimestamp field is set.
2154      */
hasCreationTimestamp()2155     public boolean hasCreationTimestamp() {
2156       return ((bitField0_ & 0x00000004) != 0);
2157     }
2158     /**
2159      *
2160      *
2161      * <pre>
2162      * [Output Only] Creation timestamp in RFC3339 text format.
2163      * </pre>
2164      *
2165      * <code>optional string creation_timestamp = 30525366;</code>
2166      *
2167      * @return The creationTimestamp.
2168      */
getCreationTimestamp()2169     public java.lang.String getCreationTimestamp() {
2170       java.lang.Object ref = creationTimestamp_;
2171       if (!(ref instanceof java.lang.String)) {
2172         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2173         java.lang.String s = bs.toStringUtf8();
2174         creationTimestamp_ = s;
2175         return s;
2176       } else {
2177         return (java.lang.String) ref;
2178       }
2179     }
2180     /**
2181      *
2182      *
2183      * <pre>
2184      * [Output Only] Creation timestamp in RFC3339 text format.
2185      * </pre>
2186      *
2187      * <code>optional string creation_timestamp = 30525366;</code>
2188      *
2189      * @return The bytes for creationTimestamp.
2190      */
getCreationTimestampBytes()2191     public com.google.protobuf.ByteString getCreationTimestampBytes() {
2192       java.lang.Object ref = creationTimestamp_;
2193       if (ref instanceof String) {
2194         com.google.protobuf.ByteString b =
2195             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2196         creationTimestamp_ = b;
2197         return b;
2198       } else {
2199         return (com.google.protobuf.ByteString) ref;
2200       }
2201     }
2202     /**
2203      *
2204      *
2205      * <pre>
2206      * [Output Only] Creation timestamp in RFC3339 text format.
2207      * </pre>
2208      *
2209      * <code>optional string creation_timestamp = 30525366;</code>
2210      *
2211      * @param value The creationTimestamp to set.
2212      * @return This builder for chaining.
2213      */
setCreationTimestamp(java.lang.String value)2214     public Builder setCreationTimestamp(java.lang.String value) {
2215       if (value == null) {
2216         throw new NullPointerException();
2217       }
2218       creationTimestamp_ = value;
2219       bitField0_ |= 0x00000004;
2220       onChanged();
2221       return this;
2222     }
2223     /**
2224      *
2225      *
2226      * <pre>
2227      * [Output Only] Creation timestamp in RFC3339 text format.
2228      * </pre>
2229      *
2230      * <code>optional string creation_timestamp = 30525366;</code>
2231      *
2232      * @return This builder for chaining.
2233      */
clearCreationTimestamp()2234     public Builder clearCreationTimestamp() {
2235       creationTimestamp_ = getDefaultInstance().getCreationTimestamp();
2236       bitField0_ = (bitField0_ & ~0x00000004);
2237       onChanged();
2238       return this;
2239     }
2240     /**
2241      *
2242      *
2243      * <pre>
2244      * [Output Only] Creation timestamp in RFC3339 text format.
2245      * </pre>
2246      *
2247      * <code>optional string creation_timestamp = 30525366;</code>
2248      *
2249      * @param value The bytes for creationTimestamp to set.
2250      * @return This builder for chaining.
2251      */
setCreationTimestampBytes(com.google.protobuf.ByteString value)2252     public Builder setCreationTimestampBytes(com.google.protobuf.ByteString value) {
2253       if (value == null) {
2254         throw new NullPointerException();
2255       }
2256       checkByteStringIsUtf8(value);
2257       creationTimestamp_ = value;
2258       bitField0_ |= 0x00000004;
2259       onChanged();
2260       return this;
2261     }
2262 
2263     private com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig ddosProtectionConfig_;
2264     private com.google.protobuf.SingleFieldBuilderV3<
2265             com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig,
2266             com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig.Builder,
2267             com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfigOrBuilder>
2268         ddosProtectionConfigBuilder_;
2269     /**
2270      * <code>
2271      * optional .google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig ddos_protection_config = 50315853;
2272      * </code>
2273      *
2274      * @return Whether the ddosProtectionConfig field is set.
2275      */
hasDdosProtectionConfig()2276     public boolean hasDdosProtectionConfig() {
2277       return ((bitField0_ & 0x00000008) != 0);
2278     }
2279     /**
2280      * <code>
2281      * optional .google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig ddos_protection_config = 50315853;
2282      * </code>
2283      *
2284      * @return The ddosProtectionConfig.
2285      */
2286     public com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig
getDdosProtectionConfig()2287         getDdosProtectionConfig() {
2288       if (ddosProtectionConfigBuilder_ == null) {
2289         return ddosProtectionConfig_ == null
2290             ? com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig.getDefaultInstance()
2291             : ddosProtectionConfig_;
2292       } else {
2293         return ddosProtectionConfigBuilder_.getMessage();
2294       }
2295     }
2296     /**
2297      * <code>
2298      * optional .google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig ddos_protection_config = 50315853;
2299      * </code>
2300      */
setDdosProtectionConfig( com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig value)2301     public Builder setDdosProtectionConfig(
2302         com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig value) {
2303       if (ddosProtectionConfigBuilder_ == null) {
2304         if (value == null) {
2305           throw new NullPointerException();
2306         }
2307         ddosProtectionConfig_ = value;
2308       } else {
2309         ddosProtectionConfigBuilder_.setMessage(value);
2310       }
2311       bitField0_ |= 0x00000008;
2312       onChanged();
2313       return this;
2314     }
2315     /**
2316      * <code>
2317      * optional .google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig ddos_protection_config = 50315853;
2318      * </code>
2319      */
setDdosProtectionConfig( com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig.Builder builderForValue)2320     public Builder setDdosProtectionConfig(
2321         com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig.Builder builderForValue) {
2322       if (ddosProtectionConfigBuilder_ == null) {
2323         ddosProtectionConfig_ = builderForValue.build();
2324       } else {
2325         ddosProtectionConfigBuilder_.setMessage(builderForValue.build());
2326       }
2327       bitField0_ |= 0x00000008;
2328       onChanged();
2329       return this;
2330     }
2331     /**
2332      * <code>
2333      * optional .google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig ddos_protection_config = 50315853;
2334      * </code>
2335      */
mergeDdosProtectionConfig( com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig value)2336     public Builder mergeDdosProtectionConfig(
2337         com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig value) {
2338       if (ddosProtectionConfigBuilder_ == null) {
2339         if (((bitField0_ & 0x00000008) != 0)
2340             && ddosProtectionConfig_ != null
2341             && ddosProtectionConfig_
2342                 != com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig
2343                     .getDefaultInstance()) {
2344           getDdosProtectionConfigBuilder().mergeFrom(value);
2345         } else {
2346           ddosProtectionConfig_ = value;
2347         }
2348       } else {
2349         ddosProtectionConfigBuilder_.mergeFrom(value);
2350       }
2351       bitField0_ |= 0x00000008;
2352       onChanged();
2353       return this;
2354     }
2355     /**
2356      * <code>
2357      * optional .google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig ddos_protection_config = 50315853;
2358      * </code>
2359      */
clearDdosProtectionConfig()2360     public Builder clearDdosProtectionConfig() {
2361       bitField0_ = (bitField0_ & ~0x00000008);
2362       ddosProtectionConfig_ = null;
2363       if (ddosProtectionConfigBuilder_ != null) {
2364         ddosProtectionConfigBuilder_.dispose();
2365         ddosProtectionConfigBuilder_ = null;
2366       }
2367       onChanged();
2368       return this;
2369     }
2370     /**
2371      * <code>
2372      * optional .google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig ddos_protection_config = 50315853;
2373      * </code>
2374      */
2375     public com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig.Builder
getDdosProtectionConfigBuilder()2376         getDdosProtectionConfigBuilder() {
2377       bitField0_ |= 0x00000008;
2378       onChanged();
2379       return getDdosProtectionConfigFieldBuilder().getBuilder();
2380     }
2381     /**
2382      * <code>
2383      * optional .google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig ddos_protection_config = 50315853;
2384      * </code>
2385      */
2386     public com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfigOrBuilder
getDdosProtectionConfigOrBuilder()2387         getDdosProtectionConfigOrBuilder() {
2388       if (ddosProtectionConfigBuilder_ != null) {
2389         return ddosProtectionConfigBuilder_.getMessageOrBuilder();
2390       } else {
2391         return ddosProtectionConfig_ == null
2392             ? com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig.getDefaultInstance()
2393             : ddosProtectionConfig_;
2394       }
2395     }
2396     /**
2397      * <code>
2398      * optional .google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig ddos_protection_config = 50315853;
2399      * </code>
2400      */
2401     private com.google.protobuf.SingleFieldBuilderV3<
2402             com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig,
2403             com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig.Builder,
2404             com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfigOrBuilder>
getDdosProtectionConfigFieldBuilder()2405         getDdosProtectionConfigFieldBuilder() {
2406       if (ddosProtectionConfigBuilder_ == null) {
2407         ddosProtectionConfigBuilder_ =
2408             new com.google.protobuf.SingleFieldBuilderV3<
2409                 com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig,
2410                 com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfig.Builder,
2411                 com.google.cloud.compute.v1.SecurityPolicyDdosProtectionConfigOrBuilder>(
2412                 getDdosProtectionConfig(), getParentForChildren(), isClean());
2413         ddosProtectionConfig_ = null;
2414       }
2415       return ddosProtectionConfigBuilder_;
2416     }
2417 
2418     private java.lang.Object description_ = "";
2419     /**
2420      *
2421      *
2422      * <pre>
2423      * An optional description of this resource. Provide this property when you create the resource.
2424      * </pre>
2425      *
2426      * <code>optional string description = 422937596;</code>
2427      *
2428      * @return Whether the description field is set.
2429      */
hasDescription()2430     public boolean hasDescription() {
2431       return ((bitField0_ & 0x00000010) != 0);
2432     }
2433     /**
2434      *
2435      *
2436      * <pre>
2437      * An optional description of this resource. Provide this property when you create the resource.
2438      * </pre>
2439      *
2440      * <code>optional string description = 422937596;</code>
2441      *
2442      * @return The description.
2443      */
getDescription()2444     public java.lang.String getDescription() {
2445       java.lang.Object ref = description_;
2446       if (!(ref instanceof java.lang.String)) {
2447         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2448         java.lang.String s = bs.toStringUtf8();
2449         description_ = s;
2450         return s;
2451       } else {
2452         return (java.lang.String) ref;
2453       }
2454     }
2455     /**
2456      *
2457      *
2458      * <pre>
2459      * An optional description of this resource. Provide this property when you create the resource.
2460      * </pre>
2461      *
2462      * <code>optional string description = 422937596;</code>
2463      *
2464      * @return The bytes for description.
2465      */
getDescriptionBytes()2466     public com.google.protobuf.ByteString getDescriptionBytes() {
2467       java.lang.Object ref = description_;
2468       if (ref instanceof String) {
2469         com.google.protobuf.ByteString b =
2470             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2471         description_ = b;
2472         return b;
2473       } else {
2474         return (com.google.protobuf.ByteString) ref;
2475       }
2476     }
2477     /**
2478      *
2479      *
2480      * <pre>
2481      * An optional description of this resource. Provide this property when you create the resource.
2482      * </pre>
2483      *
2484      * <code>optional string description = 422937596;</code>
2485      *
2486      * @param value The description to set.
2487      * @return This builder for chaining.
2488      */
setDescription(java.lang.String value)2489     public Builder setDescription(java.lang.String value) {
2490       if (value == null) {
2491         throw new NullPointerException();
2492       }
2493       description_ = value;
2494       bitField0_ |= 0x00000010;
2495       onChanged();
2496       return this;
2497     }
2498     /**
2499      *
2500      *
2501      * <pre>
2502      * An optional description of this resource. Provide this property when you create the resource.
2503      * </pre>
2504      *
2505      * <code>optional string description = 422937596;</code>
2506      *
2507      * @return This builder for chaining.
2508      */
clearDescription()2509     public Builder clearDescription() {
2510       description_ = getDefaultInstance().getDescription();
2511       bitField0_ = (bitField0_ & ~0x00000010);
2512       onChanged();
2513       return this;
2514     }
2515     /**
2516      *
2517      *
2518      * <pre>
2519      * An optional description of this resource. Provide this property when you create the resource.
2520      * </pre>
2521      *
2522      * <code>optional string description = 422937596;</code>
2523      *
2524      * @param value The bytes for description to set.
2525      * @return This builder for chaining.
2526      */
setDescriptionBytes(com.google.protobuf.ByteString value)2527     public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
2528       if (value == null) {
2529         throw new NullPointerException();
2530       }
2531       checkByteStringIsUtf8(value);
2532       description_ = value;
2533       bitField0_ |= 0x00000010;
2534       onChanged();
2535       return this;
2536     }
2537 
2538     private java.lang.Object fingerprint_ = "";
2539     /**
2540      *
2541      *
2542      * <pre>
2543      * Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the security policy.
2544      * </pre>
2545      *
2546      * <code>optional string fingerprint = 234678500;</code>
2547      *
2548      * @return Whether the fingerprint field is set.
2549      */
hasFingerprint()2550     public boolean hasFingerprint() {
2551       return ((bitField0_ & 0x00000020) != 0);
2552     }
2553     /**
2554      *
2555      *
2556      * <pre>
2557      * Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the security policy.
2558      * </pre>
2559      *
2560      * <code>optional string fingerprint = 234678500;</code>
2561      *
2562      * @return The fingerprint.
2563      */
getFingerprint()2564     public java.lang.String getFingerprint() {
2565       java.lang.Object ref = fingerprint_;
2566       if (!(ref instanceof java.lang.String)) {
2567         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2568         java.lang.String s = bs.toStringUtf8();
2569         fingerprint_ = s;
2570         return s;
2571       } else {
2572         return (java.lang.String) ref;
2573       }
2574     }
2575     /**
2576      *
2577      *
2578      * <pre>
2579      * Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the security policy.
2580      * </pre>
2581      *
2582      * <code>optional string fingerprint = 234678500;</code>
2583      *
2584      * @return The bytes for fingerprint.
2585      */
getFingerprintBytes()2586     public com.google.protobuf.ByteString getFingerprintBytes() {
2587       java.lang.Object ref = fingerprint_;
2588       if (ref instanceof String) {
2589         com.google.protobuf.ByteString b =
2590             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2591         fingerprint_ = b;
2592         return b;
2593       } else {
2594         return (com.google.protobuf.ByteString) ref;
2595       }
2596     }
2597     /**
2598      *
2599      *
2600      * <pre>
2601      * Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the security policy.
2602      * </pre>
2603      *
2604      * <code>optional string fingerprint = 234678500;</code>
2605      *
2606      * @param value The fingerprint to set.
2607      * @return This builder for chaining.
2608      */
setFingerprint(java.lang.String value)2609     public Builder setFingerprint(java.lang.String value) {
2610       if (value == null) {
2611         throw new NullPointerException();
2612       }
2613       fingerprint_ = value;
2614       bitField0_ |= 0x00000020;
2615       onChanged();
2616       return this;
2617     }
2618     /**
2619      *
2620      *
2621      * <pre>
2622      * Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the security policy.
2623      * </pre>
2624      *
2625      * <code>optional string fingerprint = 234678500;</code>
2626      *
2627      * @return This builder for chaining.
2628      */
clearFingerprint()2629     public Builder clearFingerprint() {
2630       fingerprint_ = getDefaultInstance().getFingerprint();
2631       bitField0_ = (bitField0_ & ~0x00000020);
2632       onChanged();
2633       return this;
2634     }
2635     /**
2636      *
2637      *
2638      * <pre>
2639      * Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the security policy.
2640      * </pre>
2641      *
2642      * <code>optional string fingerprint = 234678500;</code>
2643      *
2644      * @param value The bytes for fingerprint to set.
2645      * @return This builder for chaining.
2646      */
setFingerprintBytes(com.google.protobuf.ByteString value)2647     public Builder setFingerprintBytes(com.google.protobuf.ByteString value) {
2648       if (value == null) {
2649         throw new NullPointerException();
2650       }
2651       checkByteStringIsUtf8(value);
2652       fingerprint_ = value;
2653       bitField0_ |= 0x00000020;
2654       onChanged();
2655       return this;
2656     }
2657 
2658     private long id_;
2659     /**
2660      *
2661      *
2662      * <pre>
2663      * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2664      * </pre>
2665      *
2666      * <code>optional uint64 id = 3355;</code>
2667      *
2668      * @return Whether the id field is set.
2669      */
2670     @java.lang.Override
hasId()2671     public boolean hasId() {
2672       return ((bitField0_ & 0x00000040) != 0);
2673     }
2674     /**
2675      *
2676      *
2677      * <pre>
2678      * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2679      * </pre>
2680      *
2681      * <code>optional uint64 id = 3355;</code>
2682      *
2683      * @return The id.
2684      */
2685     @java.lang.Override
getId()2686     public long getId() {
2687       return id_;
2688     }
2689     /**
2690      *
2691      *
2692      * <pre>
2693      * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2694      * </pre>
2695      *
2696      * <code>optional uint64 id = 3355;</code>
2697      *
2698      * @param value The id to set.
2699      * @return This builder for chaining.
2700      */
setId(long value)2701     public Builder setId(long value) {
2702 
2703       id_ = value;
2704       bitField0_ |= 0x00000040;
2705       onChanged();
2706       return this;
2707     }
2708     /**
2709      *
2710      *
2711      * <pre>
2712      * [Output Only] The unique identifier for the resource. This identifier is defined by the server.
2713      * </pre>
2714      *
2715      * <code>optional uint64 id = 3355;</code>
2716      *
2717      * @return This builder for chaining.
2718      */
clearId()2719     public Builder clearId() {
2720       bitField0_ = (bitField0_ & ~0x00000040);
2721       id_ = 0L;
2722       onChanged();
2723       return this;
2724     }
2725 
2726     private java.lang.Object kind_ = "";
2727     /**
2728      *
2729      *
2730      * <pre>
2731      * [Output only] Type of the resource. Always compute#securityPolicyfor security policies
2732      * </pre>
2733      *
2734      * <code>optional string kind = 3292052;</code>
2735      *
2736      * @return Whether the kind field is set.
2737      */
hasKind()2738     public boolean hasKind() {
2739       return ((bitField0_ & 0x00000080) != 0);
2740     }
2741     /**
2742      *
2743      *
2744      * <pre>
2745      * [Output only] Type of the resource. Always compute#securityPolicyfor security policies
2746      * </pre>
2747      *
2748      * <code>optional string kind = 3292052;</code>
2749      *
2750      * @return The kind.
2751      */
getKind()2752     public java.lang.String getKind() {
2753       java.lang.Object ref = kind_;
2754       if (!(ref instanceof java.lang.String)) {
2755         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2756         java.lang.String s = bs.toStringUtf8();
2757         kind_ = s;
2758         return s;
2759       } else {
2760         return (java.lang.String) ref;
2761       }
2762     }
2763     /**
2764      *
2765      *
2766      * <pre>
2767      * [Output only] Type of the resource. Always compute#securityPolicyfor security policies
2768      * </pre>
2769      *
2770      * <code>optional string kind = 3292052;</code>
2771      *
2772      * @return The bytes for kind.
2773      */
getKindBytes()2774     public com.google.protobuf.ByteString getKindBytes() {
2775       java.lang.Object ref = kind_;
2776       if (ref instanceof String) {
2777         com.google.protobuf.ByteString b =
2778             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2779         kind_ = b;
2780         return b;
2781       } else {
2782         return (com.google.protobuf.ByteString) ref;
2783       }
2784     }
2785     /**
2786      *
2787      *
2788      * <pre>
2789      * [Output only] Type of the resource. Always compute#securityPolicyfor security policies
2790      * </pre>
2791      *
2792      * <code>optional string kind = 3292052;</code>
2793      *
2794      * @param value The kind to set.
2795      * @return This builder for chaining.
2796      */
setKind(java.lang.String value)2797     public Builder setKind(java.lang.String value) {
2798       if (value == null) {
2799         throw new NullPointerException();
2800       }
2801       kind_ = value;
2802       bitField0_ |= 0x00000080;
2803       onChanged();
2804       return this;
2805     }
2806     /**
2807      *
2808      *
2809      * <pre>
2810      * [Output only] Type of the resource. Always compute#securityPolicyfor security policies
2811      * </pre>
2812      *
2813      * <code>optional string kind = 3292052;</code>
2814      *
2815      * @return This builder for chaining.
2816      */
clearKind()2817     public Builder clearKind() {
2818       kind_ = getDefaultInstance().getKind();
2819       bitField0_ = (bitField0_ & ~0x00000080);
2820       onChanged();
2821       return this;
2822     }
2823     /**
2824      *
2825      *
2826      * <pre>
2827      * [Output only] Type of the resource. Always compute#securityPolicyfor security policies
2828      * </pre>
2829      *
2830      * <code>optional string kind = 3292052;</code>
2831      *
2832      * @param value The bytes for kind to set.
2833      * @return This builder for chaining.
2834      */
setKindBytes(com.google.protobuf.ByteString value)2835     public Builder setKindBytes(com.google.protobuf.ByteString value) {
2836       if (value == null) {
2837         throw new NullPointerException();
2838       }
2839       checkByteStringIsUtf8(value);
2840       kind_ = value;
2841       bitField0_ |= 0x00000080;
2842       onChanged();
2843       return this;
2844     }
2845 
2846     private java.lang.Object name_ = "";
2847     /**
2848      *
2849      *
2850      * <pre>
2851      * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
2852      * </pre>
2853      *
2854      * <code>optional string name = 3373707;</code>
2855      *
2856      * @return Whether the name field is set.
2857      */
hasName()2858     public boolean hasName() {
2859       return ((bitField0_ & 0x00000100) != 0);
2860     }
2861     /**
2862      *
2863      *
2864      * <pre>
2865      * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
2866      * </pre>
2867      *
2868      * <code>optional string name = 3373707;</code>
2869      *
2870      * @return The name.
2871      */
getName()2872     public java.lang.String getName() {
2873       java.lang.Object ref = name_;
2874       if (!(ref instanceof java.lang.String)) {
2875         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2876         java.lang.String s = bs.toStringUtf8();
2877         name_ = s;
2878         return s;
2879       } else {
2880         return (java.lang.String) ref;
2881       }
2882     }
2883     /**
2884      *
2885      *
2886      * <pre>
2887      * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
2888      * </pre>
2889      *
2890      * <code>optional string name = 3373707;</code>
2891      *
2892      * @return The bytes for name.
2893      */
getNameBytes()2894     public com.google.protobuf.ByteString getNameBytes() {
2895       java.lang.Object ref = name_;
2896       if (ref instanceof String) {
2897         com.google.protobuf.ByteString b =
2898             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2899         name_ = b;
2900         return b;
2901       } else {
2902         return (com.google.protobuf.ByteString) ref;
2903       }
2904     }
2905     /**
2906      *
2907      *
2908      * <pre>
2909      * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
2910      * </pre>
2911      *
2912      * <code>optional string name = 3373707;</code>
2913      *
2914      * @param value The name to set.
2915      * @return This builder for chaining.
2916      */
setName(java.lang.String value)2917     public Builder setName(java.lang.String value) {
2918       if (value == null) {
2919         throw new NullPointerException();
2920       }
2921       name_ = value;
2922       bitField0_ |= 0x00000100;
2923       onChanged();
2924       return this;
2925     }
2926     /**
2927      *
2928      *
2929      * <pre>
2930      * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
2931      * </pre>
2932      *
2933      * <code>optional string name = 3373707;</code>
2934      *
2935      * @return This builder for chaining.
2936      */
clearName()2937     public Builder clearName() {
2938       name_ = getDefaultInstance().getName();
2939       bitField0_ = (bitField0_ & ~0x00000100);
2940       onChanged();
2941       return this;
2942     }
2943     /**
2944      *
2945      *
2946      * <pre>
2947      * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
2948      * </pre>
2949      *
2950      * <code>optional string name = 3373707;</code>
2951      *
2952      * @param value The bytes for name to set.
2953      * @return This builder for chaining.
2954      */
setNameBytes(com.google.protobuf.ByteString value)2955     public Builder setNameBytes(com.google.protobuf.ByteString value) {
2956       if (value == null) {
2957         throw new NullPointerException();
2958       }
2959       checkByteStringIsUtf8(value);
2960       name_ = value;
2961       bitField0_ |= 0x00000100;
2962       onChanged();
2963       return this;
2964     }
2965 
2966     private com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig
2967         recaptchaOptionsConfig_;
2968     private com.google.protobuf.SingleFieldBuilderV3<
2969             com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig,
2970             com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig.Builder,
2971             com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfigOrBuilder>
2972         recaptchaOptionsConfigBuilder_;
2973     /**
2974      * <code>
2975      * optional .google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig recaptcha_options_config = 519006811;
2976      * </code>
2977      *
2978      * @return Whether the recaptchaOptionsConfig field is set.
2979      */
hasRecaptchaOptionsConfig()2980     public boolean hasRecaptchaOptionsConfig() {
2981       return ((bitField0_ & 0x00000200) != 0);
2982     }
2983     /**
2984      * <code>
2985      * optional .google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig recaptcha_options_config = 519006811;
2986      * </code>
2987      *
2988      * @return The recaptchaOptionsConfig.
2989      */
2990     public com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig
getRecaptchaOptionsConfig()2991         getRecaptchaOptionsConfig() {
2992       if (recaptchaOptionsConfigBuilder_ == null) {
2993         return recaptchaOptionsConfig_ == null
2994             ? com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig.getDefaultInstance()
2995             : recaptchaOptionsConfig_;
2996       } else {
2997         return recaptchaOptionsConfigBuilder_.getMessage();
2998       }
2999     }
3000     /**
3001      * <code>
3002      * optional .google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig recaptcha_options_config = 519006811;
3003      * </code>
3004      */
setRecaptchaOptionsConfig( com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig value)3005     public Builder setRecaptchaOptionsConfig(
3006         com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig value) {
3007       if (recaptchaOptionsConfigBuilder_ == null) {
3008         if (value == null) {
3009           throw new NullPointerException();
3010         }
3011         recaptchaOptionsConfig_ = value;
3012       } else {
3013         recaptchaOptionsConfigBuilder_.setMessage(value);
3014       }
3015       bitField0_ |= 0x00000200;
3016       onChanged();
3017       return this;
3018     }
3019     /**
3020      * <code>
3021      * optional .google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig recaptcha_options_config = 519006811;
3022      * </code>
3023      */
setRecaptchaOptionsConfig( com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig.Builder builderForValue)3024     public Builder setRecaptchaOptionsConfig(
3025         com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig.Builder builderForValue) {
3026       if (recaptchaOptionsConfigBuilder_ == null) {
3027         recaptchaOptionsConfig_ = builderForValue.build();
3028       } else {
3029         recaptchaOptionsConfigBuilder_.setMessage(builderForValue.build());
3030       }
3031       bitField0_ |= 0x00000200;
3032       onChanged();
3033       return this;
3034     }
3035     /**
3036      * <code>
3037      * optional .google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig recaptcha_options_config = 519006811;
3038      * </code>
3039      */
mergeRecaptchaOptionsConfig( com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig value)3040     public Builder mergeRecaptchaOptionsConfig(
3041         com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig value) {
3042       if (recaptchaOptionsConfigBuilder_ == null) {
3043         if (((bitField0_ & 0x00000200) != 0)
3044             && recaptchaOptionsConfig_ != null
3045             && recaptchaOptionsConfig_
3046                 != com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig
3047                     .getDefaultInstance()) {
3048           getRecaptchaOptionsConfigBuilder().mergeFrom(value);
3049         } else {
3050           recaptchaOptionsConfig_ = value;
3051         }
3052       } else {
3053         recaptchaOptionsConfigBuilder_.mergeFrom(value);
3054       }
3055       bitField0_ |= 0x00000200;
3056       onChanged();
3057       return this;
3058     }
3059     /**
3060      * <code>
3061      * optional .google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig recaptcha_options_config = 519006811;
3062      * </code>
3063      */
clearRecaptchaOptionsConfig()3064     public Builder clearRecaptchaOptionsConfig() {
3065       bitField0_ = (bitField0_ & ~0x00000200);
3066       recaptchaOptionsConfig_ = null;
3067       if (recaptchaOptionsConfigBuilder_ != null) {
3068         recaptchaOptionsConfigBuilder_.dispose();
3069         recaptchaOptionsConfigBuilder_ = null;
3070       }
3071       onChanged();
3072       return this;
3073     }
3074     /**
3075      * <code>
3076      * optional .google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig recaptcha_options_config = 519006811;
3077      * </code>
3078      */
3079     public com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig.Builder
getRecaptchaOptionsConfigBuilder()3080         getRecaptchaOptionsConfigBuilder() {
3081       bitField0_ |= 0x00000200;
3082       onChanged();
3083       return getRecaptchaOptionsConfigFieldBuilder().getBuilder();
3084     }
3085     /**
3086      * <code>
3087      * optional .google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig recaptcha_options_config = 519006811;
3088      * </code>
3089      */
3090     public com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfigOrBuilder
getRecaptchaOptionsConfigOrBuilder()3091         getRecaptchaOptionsConfigOrBuilder() {
3092       if (recaptchaOptionsConfigBuilder_ != null) {
3093         return recaptchaOptionsConfigBuilder_.getMessageOrBuilder();
3094       } else {
3095         return recaptchaOptionsConfig_ == null
3096             ? com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig.getDefaultInstance()
3097             : recaptchaOptionsConfig_;
3098       }
3099     }
3100     /**
3101      * <code>
3102      * optional .google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig recaptcha_options_config = 519006811;
3103      * </code>
3104      */
3105     private com.google.protobuf.SingleFieldBuilderV3<
3106             com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig,
3107             com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig.Builder,
3108             com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfigOrBuilder>
getRecaptchaOptionsConfigFieldBuilder()3109         getRecaptchaOptionsConfigFieldBuilder() {
3110       if (recaptchaOptionsConfigBuilder_ == null) {
3111         recaptchaOptionsConfigBuilder_ =
3112             new com.google.protobuf.SingleFieldBuilderV3<
3113                 com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig,
3114                 com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfig.Builder,
3115                 com.google.cloud.compute.v1.SecurityPolicyRecaptchaOptionsConfigOrBuilder>(
3116                 getRecaptchaOptionsConfig(), getParentForChildren(), isClean());
3117         recaptchaOptionsConfig_ = null;
3118       }
3119       return recaptchaOptionsConfigBuilder_;
3120     }
3121 
3122     private java.lang.Object region_ = "";
3123     /**
3124      *
3125      *
3126      * <pre>
3127      * [Output Only] URL of the region where the regional security policy resides. This field is not applicable to global security policies.
3128      * </pre>
3129      *
3130      * <code>optional string region = 138946292;</code>
3131      *
3132      * @return Whether the region field is set.
3133      */
hasRegion()3134     public boolean hasRegion() {
3135       return ((bitField0_ & 0x00000400) != 0);
3136     }
3137     /**
3138      *
3139      *
3140      * <pre>
3141      * [Output Only] URL of the region where the regional security policy resides. This field is not applicable to global security policies.
3142      * </pre>
3143      *
3144      * <code>optional string region = 138946292;</code>
3145      *
3146      * @return The region.
3147      */
getRegion()3148     public java.lang.String getRegion() {
3149       java.lang.Object ref = region_;
3150       if (!(ref instanceof java.lang.String)) {
3151         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
3152         java.lang.String s = bs.toStringUtf8();
3153         region_ = s;
3154         return s;
3155       } else {
3156         return (java.lang.String) ref;
3157       }
3158     }
3159     /**
3160      *
3161      *
3162      * <pre>
3163      * [Output Only] URL of the region where the regional security policy resides. This field is not applicable to global security policies.
3164      * </pre>
3165      *
3166      * <code>optional string region = 138946292;</code>
3167      *
3168      * @return The bytes for region.
3169      */
getRegionBytes()3170     public com.google.protobuf.ByteString getRegionBytes() {
3171       java.lang.Object ref = region_;
3172       if (ref instanceof String) {
3173         com.google.protobuf.ByteString b =
3174             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
3175         region_ = b;
3176         return b;
3177       } else {
3178         return (com.google.protobuf.ByteString) ref;
3179       }
3180     }
3181     /**
3182      *
3183      *
3184      * <pre>
3185      * [Output Only] URL of the region where the regional security policy resides. This field is not applicable to global security policies.
3186      * </pre>
3187      *
3188      * <code>optional string region = 138946292;</code>
3189      *
3190      * @param value The region to set.
3191      * @return This builder for chaining.
3192      */
setRegion(java.lang.String value)3193     public Builder setRegion(java.lang.String value) {
3194       if (value == null) {
3195         throw new NullPointerException();
3196       }
3197       region_ = value;
3198       bitField0_ |= 0x00000400;
3199       onChanged();
3200       return this;
3201     }
3202     /**
3203      *
3204      *
3205      * <pre>
3206      * [Output Only] URL of the region where the regional security policy resides. This field is not applicable to global security policies.
3207      * </pre>
3208      *
3209      * <code>optional string region = 138946292;</code>
3210      *
3211      * @return This builder for chaining.
3212      */
clearRegion()3213     public Builder clearRegion() {
3214       region_ = getDefaultInstance().getRegion();
3215       bitField0_ = (bitField0_ & ~0x00000400);
3216       onChanged();
3217       return this;
3218     }
3219     /**
3220      *
3221      *
3222      * <pre>
3223      * [Output Only] URL of the region where the regional security policy resides. This field is not applicable to global security policies.
3224      * </pre>
3225      *
3226      * <code>optional string region = 138946292;</code>
3227      *
3228      * @param value The bytes for region to set.
3229      * @return This builder for chaining.
3230      */
setRegionBytes(com.google.protobuf.ByteString value)3231     public Builder setRegionBytes(com.google.protobuf.ByteString value) {
3232       if (value == null) {
3233         throw new NullPointerException();
3234       }
3235       checkByteStringIsUtf8(value);
3236       region_ = value;
3237       bitField0_ |= 0x00000400;
3238       onChanged();
3239       return this;
3240     }
3241 
3242     private java.util.List<com.google.cloud.compute.v1.SecurityPolicyRule> rules_ =
3243         java.util.Collections.emptyList();
3244 
ensureRulesIsMutable()3245     private void ensureRulesIsMutable() {
3246       if (!((bitField0_ & 0x00000800) != 0)) {
3247         rules_ = new java.util.ArrayList<com.google.cloud.compute.v1.SecurityPolicyRule>(rules_);
3248         bitField0_ |= 0x00000800;
3249       }
3250     }
3251 
3252     private com.google.protobuf.RepeatedFieldBuilderV3<
3253             com.google.cloud.compute.v1.SecurityPolicyRule,
3254             com.google.cloud.compute.v1.SecurityPolicyRule.Builder,
3255             com.google.cloud.compute.v1.SecurityPolicyRuleOrBuilder>
3256         rulesBuilder_;
3257 
3258     /**
3259      *
3260      *
3261      * <pre>
3262      * A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition this means match "*" for srcIpRanges and for the networkMatch condition every field must be either match "*" or not set). If no rules are provided when creating a security policy, a default rule with action "allow" will be added.
3263      * </pre>
3264      *
3265      * <code>repeated .google.cloud.compute.v1.SecurityPolicyRule rules = 108873975;</code>
3266      */
getRulesList()3267     public java.util.List<com.google.cloud.compute.v1.SecurityPolicyRule> getRulesList() {
3268       if (rulesBuilder_ == null) {
3269         return java.util.Collections.unmodifiableList(rules_);
3270       } else {
3271         return rulesBuilder_.getMessageList();
3272       }
3273     }
3274     /**
3275      *
3276      *
3277      * <pre>
3278      * A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition this means match "*" for srcIpRanges and for the networkMatch condition every field must be either match "*" or not set). If no rules are provided when creating a security policy, a default rule with action "allow" will be added.
3279      * </pre>
3280      *
3281      * <code>repeated .google.cloud.compute.v1.SecurityPolicyRule rules = 108873975;</code>
3282      */
getRulesCount()3283     public int getRulesCount() {
3284       if (rulesBuilder_ == null) {
3285         return rules_.size();
3286       } else {
3287         return rulesBuilder_.getCount();
3288       }
3289     }
3290     /**
3291      *
3292      *
3293      * <pre>
3294      * A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition this means match "*" for srcIpRanges and for the networkMatch condition every field must be either match "*" or not set). If no rules are provided when creating a security policy, a default rule with action "allow" will be added.
3295      * </pre>
3296      *
3297      * <code>repeated .google.cloud.compute.v1.SecurityPolicyRule rules = 108873975;</code>
3298      */
getRules(int index)3299     public com.google.cloud.compute.v1.SecurityPolicyRule getRules(int index) {
3300       if (rulesBuilder_ == null) {
3301         return rules_.get(index);
3302       } else {
3303         return rulesBuilder_.getMessage(index);
3304       }
3305     }
3306     /**
3307      *
3308      *
3309      * <pre>
3310      * A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition this means match "*" for srcIpRanges and for the networkMatch condition every field must be either match "*" or not set). If no rules are provided when creating a security policy, a default rule with action "allow" will be added.
3311      * </pre>
3312      *
3313      * <code>repeated .google.cloud.compute.v1.SecurityPolicyRule rules = 108873975;</code>
3314      */
setRules(int index, com.google.cloud.compute.v1.SecurityPolicyRule value)3315     public Builder setRules(int index, com.google.cloud.compute.v1.SecurityPolicyRule value) {
3316       if (rulesBuilder_ == null) {
3317         if (value == null) {
3318           throw new NullPointerException();
3319         }
3320         ensureRulesIsMutable();
3321         rules_.set(index, value);
3322         onChanged();
3323       } else {
3324         rulesBuilder_.setMessage(index, value);
3325       }
3326       return this;
3327     }
3328     /**
3329      *
3330      *
3331      * <pre>
3332      * A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition this means match "*" for srcIpRanges and for the networkMatch condition every field must be either match "*" or not set). If no rules are provided when creating a security policy, a default rule with action "allow" will be added.
3333      * </pre>
3334      *
3335      * <code>repeated .google.cloud.compute.v1.SecurityPolicyRule rules = 108873975;</code>
3336      */
setRules( int index, com.google.cloud.compute.v1.SecurityPolicyRule.Builder builderForValue)3337     public Builder setRules(
3338         int index, com.google.cloud.compute.v1.SecurityPolicyRule.Builder builderForValue) {
3339       if (rulesBuilder_ == null) {
3340         ensureRulesIsMutable();
3341         rules_.set(index, builderForValue.build());
3342         onChanged();
3343       } else {
3344         rulesBuilder_.setMessage(index, builderForValue.build());
3345       }
3346       return this;
3347     }
3348     /**
3349      *
3350      *
3351      * <pre>
3352      * A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition this means match "*" for srcIpRanges and for the networkMatch condition every field must be either match "*" or not set). If no rules are provided when creating a security policy, a default rule with action "allow" will be added.
3353      * </pre>
3354      *
3355      * <code>repeated .google.cloud.compute.v1.SecurityPolicyRule rules = 108873975;</code>
3356      */
addRules(com.google.cloud.compute.v1.SecurityPolicyRule value)3357     public Builder addRules(com.google.cloud.compute.v1.SecurityPolicyRule value) {
3358       if (rulesBuilder_ == null) {
3359         if (value == null) {
3360           throw new NullPointerException();
3361         }
3362         ensureRulesIsMutable();
3363         rules_.add(value);
3364         onChanged();
3365       } else {
3366         rulesBuilder_.addMessage(value);
3367       }
3368       return this;
3369     }
3370     /**
3371      *
3372      *
3373      * <pre>
3374      * A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition this means match "*" for srcIpRanges and for the networkMatch condition every field must be either match "*" or not set). If no rules are provided when creating a security policy, a default rule with action "allow" will be added.
3375      * </pre>
3376      *
3377      * <code>repeated .google.cloud.compute.v1.SecurityPolicyRule rules = 108873975;</code>
3378      */
addRules(int index, com.google.cloud.compute.v1.SecurityPolicyRule value)3379     public Builder addRules(int index, com.google.cloud.compute.v1.SecurityPolicyRule value) {
3380       if (rulesBuilder_ == null) {
3381         if (value == null) {
3382           throw new NullPointerException();
3383         }
3384         ensureRulesIsMutable();
3385         rules_.add(index, value);
3386         onChanged();
3387       } else {
3388         rulesBuilder_.addMessage(index, value);
3389       }
3390       return this;
3391     }
3392     /**
3393      *
3394      *
3395      * <pre>
3396      * A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition this means match "*" for srcIpRanges and for the networkMatch condition every field must be either match "*" or not set). If no rules are provided when creating a security policy, a default rule with action "allow" will be added.
3397      * </pre>
3398      *
3399      * <code>repeated .google.cloud.compute.v1.SecurityPolicyRule rules = 108873975;</code>
3400      */
addRules( com.google.cloud.compute.v1.SecurityPolicyRule.Builder builderForValue)3401     public Builder addRules(
3402         com.google.cloud.compute.v1.SecurityPolicyRule.Builder builderForValue) {
3403       if (rulesBuilder_ == null) {
3404         ensureRulesIsMutable();
3405         rules_.add(builderForValue.build());
3406         onChanged();
3407       } else {
3408         rulesBuilder_.addMessage(builderForValue.build());
3409       }
3410       return this;
3411     }
3412     /**
3413      *
3414      *
3415      * <pre>
3416      * A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition this means match "*" for srcIpRanges and for the networkMatch condition every field must be either match "*" or not set). If no rules are provided when creating a security policy, a default rule with action "allow" will be added.
3417      * </pre>
3418      *
3419      * <code>repeated .google.cloud.compute.v1.SecurityPolicyRule rules = 108873975;</code>
3420      */
addRules( int index, com.google.cloud.compute.v1.SecurityPolicyRule.Builder builderForValue)3421     public Builder addRules(
3422         int index, com.google.cloud.compute.v1.SecurityPolicyRule.Builder builderForValue) {
3423       if (rulesBuilder_ == null) {
3424         ensureRulesIsMutable();
3425         rules_.add(index, builderForValue.build());
3426         onChanged();
3427       } else {
3428         rulesBuilder_.addMessage(index, builderForValue.build());
3429       }
3430       return this;
3431     }
3432     /**
3433      *
3434      *
3435      * <pre>
3436      * A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition this means match "*" for srcIpRanges and for the networkMatch condition every field must be either match "*" or not set). If no rules are provided when creating a security policy, a default rule with action "allow" will be added.
3437      * </pre>
3438      *
3439      * <code>repeated .google.cloud.compute.v1.SecurityPolicyRule rules = 108873975;</code>
3440      */
addAllRules( java.lang.Iterable<? extends com.google.cloud.compute.v1.SecurityPolicyRule> values)3441     public Builder addAllRules(
3442         java.lang.Iterable<? extends com.google.cloud.compute.v1.SecurityPolicyRule> values) {
3443       if (rulesBuilder_ == null) {
3444         ensureRulesIsMutable();
3445         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rules_);
3446         onChanged();
3447       } else {
3448         rulesBuilder_.addAllMessages(values);
3449       }
3450       return this;
3451     }
3452     /**
3453      *
3454      *
3455      * <pre>
3456      * A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition this means match "*" for srcIpRanges and for the networkMatch condition every field must be either match "*" or not set). If no rules are provided when creating a security policy, a default rule with action "allow" will be added.
3457      * </pre>
3458      *
3459      * <code>repeated .google.cloud.compute.v1.SecurityPolicyRule rules = 108873975;</code>
3460      */
clearRules()3461     public Builder clearRules() {
3462       if (rulesBuilder_ == null) {
3463         rules_ = java.util.Collections.emptyList();
3464         bitField0_ = (bitField0_ & ~0x00000800);
3465         onChanged();
3466       } else {
3467         rulesBuilder_.clear();
3468       }
3469       return this;
3470     }
3471     /**
3472      *
3473      *
3474      * <pre>
3475      * A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition this means match "*" for srcIpRanges and for the networkMatch condition every field must be either match "*" or not set). If no rules are provided when creating a security policy, a default rule with action "allow" will be added.
3476      * </pre>
3477      *
3478      * <code>repeated .google.cloud.compute.v1.SecurityPolicyRule rules = 108873975;</code>
3479      */
removeRules(int index)3480     public Builder removeRules(int index) {
3481       if (rulesBuilder_ == null) {
3482         ensureRulesIsMutable();
3483         rules_.remove(index);
3484         onChanged();
3485       } else {
3486         rulesBuilder_.remove(index);
3487       }
3488       return this;
3489     }
3490     /**
3491      *
3492      *
3493      * <pre>
3494      * A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition this means match "*" for srcIpRanges and for the networkMatch condition every field must be either match "*" or not set). If no rules are provided when creating a security policy, a default rule with action "allow" will be added.
3495      * </pre>
3496      *
3497      * <code>repeated .google.cloud.compute.v1.SecurityPolicyRule rules = 108873975;</code>
3498      */
getRulesBuilder(int index)3499     public com.google.cloud.compute.v1.SecurityPolicyRule.Builder getRulesBuilder(int index) {
3500       return getRulesFieldBuilder().getBuilder(index);
3501     }
3502     /**
3503      *
3504      *
3505      * <pre>
3506      * A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition this means match "*" for srcIpRanges and for the networkMatch condition every field must be either match "*" or not set). If no rules are provided when creating a security policy, a default rule with action "allow" will be added.
3507      * </pre>
3508      *
3509      * <code>repeated .google.cloud.compute.v1.SecurityPolicyRule rules = 108873975;</code>
3510      */
getRulesOrBuilder(int index)3511     public com.google.cloud.compute.v1.SecurityPolicyRuleOrBuilder getRulesOrBuilder(int index) {
3512       if (rulesBuilder_ == null) {
3513         return rules_.get(index);
3514       } else {
3515         return rulesBuilder_.getMessageOrBuilder(index);
3516       }
3517     }
3518     /**
3519      *
3520      *
3521      * <pre>
3522      * A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition this means match "*" for srcIpRanges and for the networkMatch condition every field must be either match "*" or not set). If no rules are provided when creating a security policy, a default rule with action "allow" will be added.
3523      * </pre>
3524      *
3525      * <code>repeated .google.cloud.compute.v1.SecurityPolicyRule rules = 108873975;</code>
3526      */
3527     public java.util.List<? extends com.google.cloud.compute.v1.SecurityPolicyRuleOrBuilder>
getRulesOrBuilderList()3528         getRulesOrBuilderList() {
3529       if (rulesBuilder_ != null) {
3530         return rulesBuilder_.getMessageOrBuilderList();
3531       } else {
3532         return java.util.Collections.unmodifiableList(rules_);
3533       }
3534     }
3535     /**
3536      *
3537      *
3538      * <pre>
3539      * A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition this means match "*" for srcIpRanges and for the networkMatch condition every field must be either match "*" or not set). If no rules are provided when creating a security policy, a default rule with action "allow" will be added.
3540      * </pre>
3541      *
3542      * <code>repeated .google.cloud.compute.v1.SecurityPolicyRule rules = 108873975;</code>
3543      */
addRulesBuilder()3544     public com.google.cloud.compute.v1.SecurityPolicyRule.Builder addRulesBuilder() {
3545       return getRulesFieldBuilder()
3546           .addBuilder(com.google.cloud.compute.v1.SecurityPolicyRule.getDefaultInstance());
3547     }
3548     /**
3549      *
3550      *
3551      * <pre>
3552      * A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition this means match "*" for srcIpRanges and for the networkMatch condition every field must be either match "*" or not set). If no rules are provided when creating a security policy, a default rule with action "allow" will be added.
3553      * </pre>
3554      *
3555      * <code>repeated .google.cloud.compute.v1.SecurityPolicyRule rules = 108873975;</code>
3556      */
addRulesBuilder(int index)3557     public com.google.cloud.compute.v1.SecurityPolicyRule.Builder addRulesBuilder(int index) {
3558       return getRulesFieldBuilder()
3559           .addBuilder(index, com.google.cloud.compute.v1.SecurityPolicyRule.getDefaultInstance());
3560     }
3561     /**
3562      *
3563      *
3564      * <pre>
3565      * A list of rules that belong to this policy. There must always be a default rule which is a rule with priority 2147483647 and match all condition (for the match condition this means match "*" for srcIpRanges and for the networkMatch condition every field must be either match "*" or not set). If no rules are provided when creating a security policy, a default rule with action "allow" will be added.
3566      * </pre>
3567      *
3568      * <code>repeated .google.cloud.compute.v1.SecurityPolicyRule rules = 108873975;</code>
3569      */
3570     public java.util.List<com.google.cloud.compute.v1.SecurityPolicyRule.Builder>
getRulesBuilderList()3571         getRulesBuilderList() {
3572       return getRulesFieldBuilder().getBuilderList();
3573     }
3574 
3575     private com.google.protobuf.RepeatedFieldBuilderV3<
3576             com.google.cloud.compute.v1.SecurityPolicyRule,
3577             com.google.cloud.compute.v1.SecurityPolicyRule.Builder,
3578             com.google.cloud.compute.v1.SecurityPolicyRuleOrBuilder>
getRulesFieldBuilder()3579         getRulesFieldBuilder() {
3580       if (rulesBuilder_ == null) {
3581         rulesBuilder_ =
3582             new com.google.protobuf.RepeatedFieldBuilderV3<
3583                 com.google.cloud.compute.v1.SecurityPolicyRule,
3584                 com.google.cloud.compute.v1.SecurityPolicyRule.Builder,
3585                 com.google.cloud.compute.v1.SecurityPolicyRuleOrBuilder>(
3586                 rules_, ((bitField0_ & 0x00000800) != 0), getParentForChildren(), isClean());
3587         rules_ = null;
3588       }
3589       return rulesBuilder_;
3590     }
3591 
3592     private java.lang.Object selfLink_ = "";
3593     /**
3594      *
3595      *
3596      * <pre>
3597      * [Output Only] Server-defined URL for the resource.
3598      * </pre>
3599      *
3600      * <code>optional string self_link = 456214797;</code>
3601      *
3602      * @return Whether the selfLink field is set.
3603      */
hasSelfLink()3604     public boolean hasSelfLink() {
3605       return ((bitField0_ & 0x00001000) != 0);
3606     }
3607     /**
3608      *
3609      *
3610      * <pre>
3611      * [Output Only] Server-defined URL for the resource.
3612      * </pre>
3613      *
3614      * <code>optional string self_link = 456214797;</code>
3615      *
3616      * @return The selfLink.
3617      */
getSelfLink()3618     public java.lang.String getSelfLink() {
3619       java.lang.Object ref = selfLink_;
3620       if (!(ref instanceof java.lang.String)) {
3621         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
3622         java.lang.String s = bs.toStringUtf8();
3623         selfLink_ = s;
3624         return s;
3625       } else {
3626         return (java.lang.String) ref;
3627       }
3628     }
3629     /**
3630      *
3631      *
3632      * <pre>
3633      * [Output Only] Server-defined URL for the resource.
3634      * </pre>
3635      *
3636      * <code>optional string self_link = 456214797;</code>
3637      *
3638      * @return The bytes for selfLink.
3639      */
getSelfLinkBytes()3640     public com.google.protobuf.ByteString getSelfLinkBytes() {
3641       java.lang.Object ref = selfLink_;
3642       if (ref instanceof String) {
3643         com.google.protobuf.ByteString b =
3644             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
3645         selfLink_ = b;
3646         return b;
3647       } else {
3648         return (com.google.protobuf.ByteString) ref;
3649       }
3650     }
3651     /**
3652      *
3653      *
3654      * <pre>
3655      * [Output Only] Server-defined URL for the resource.
3656      * </pre>
3657      *
3658      * <code>optional string self_link = 456214797;</code>
3659      *
3660      * @param value The selfLink to set.
3661      * @return This builder for chaining.
3662      */
setSelfLink(java.lang.String value)3663     public Builder setSelfLink(java.lang.String value) {
3664       if (value == null) {
3665         throw new NullPointerException();
3666       }
3667       selfLink_ = value;
3668       bitField0_ |= 0x00001000;
3669       onChanged();
3670       return this;
3671     }
3672     /**
3673      *
3674      *
3675      * <pre>
3676      * [Output Only] Server-defined URL for the resource.
3677      * </pre>
3678      *
3679      * <code>optional string self_link = 456214797;</code>
3680      *
3681      * @return This builder for chaining.
3682      */
clearSelfLink()3683     public Builder clearSelfLink() {
3684       selfLink_ = getDefaultInstance().getSelfLink();
3685       bitField0_ = (bitField0_ & ~0x00001000);
3686       onChanged();
3687       return this;
3688     }
3689     /**
3690      *
3691      *
3692      * <pre>
3693      * [Output Only] Server-defined URL for the resource.
3694      * </pre>
3695      *
3696      * <code>optional string self_link = 456214797;</code>
3697      *
3698      * @param value The bytes for selfLink to set.
3699      * @return This builder for chaining.
3700      */
setSelfLinkBytes(com.google.protobuf.ByteString value)3701     public Builder setSelfLinkBytes(com.google.protobuf.ByteString value) {
3702       if (value == null) {
3703         throw new NullPointerException();
3704       }
3705       checkByteStringIsUtf8(value);
3706       selfLink_ = value;
3707       bitField0_ |= 0x00001000;
3708       onChanged();
3709       return this;
3710     }
3711 
3712     private java.lang.Object type_ = "";
3713     /**
3714      *
3715      *
3716      * <pre>
3717      * The type indicates the intended use of the security policy. - CLOUD_ARMOR: Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers. - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache. - CLOUD_ARMOR_INTERNAL_SERVICE: Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application. - CLOUD_ARMOR_NETWORK: Cloud Armor network policies can be configured to filter packets targeting network load balancing resources such as backend services, target pools, target instances, and instances with external IPs. They filter requests before the request is served from the application. This field can be set only at resource creation time.
3718      * Check the Type enum for the list of possible values.
3719      * </pre>
3720      *
3721      * <code>optional string type = 3575610;</code>
3722      *
3723      * @return Whether the type field is set.
3724      */
hasType()3725     public boolean hasType() {
3726       return ((bitField0_ & 0x00002000) != 0);
3727     }
3728     /**
3729      *
3730      *
3731      * <pre>
3732      * The type indicates the intended use of the security policy. - CLOUD_ARMOR: Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers. - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache. - CLOUD_ARMOR_INTERNAL_SERVICE: Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application. - CLOUD_ARMOR_NETWORK: Cloud Armor network policies can be configured to filter packets targeting network load balancing resources such as backend services, target pools, target instances, and instances with external IPs. They filter requests before the request is served from the application. This field can be set only at resource creation time.
3733      * Check the Type enum for the list of possible values.
3734      * </pre>
3735      *
3736      * <code>optional string type = 3575610;</code>
3737      *
3738      * @return The type.
3739      */
getType()3740     public java.lang.String getType() {
3741       java.lang.Object ref = type_;
3742       if (!(ref instanceof java.lang.String)) {
3743         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
3744         java.lang.String s = bs.toStringUtf8();
3745         type_ = s;
3746         return s;
3747       } else {
3748         return (java.lang.String) ref;
3749       }
3750     }
3751     /**
3752      *
3753      *
3754      * <pre>
3755      * The type indicates the intended use of the security policy. - CLOUD_ARMOR: Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers. - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache. - CLOUD_ARMOR_INTERNAL_SERVICE: Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application. - CLOUD_ARMOR_NETWORK: Cloud Armor network policies can be configured to filter packets targeting network load balancing resources such as backend services, target pools, target instances, and instances with external IPs. They filter requests before the request is served from the application. This field can be set only at resource creation time.
3756      * Check the Type enum for the list of possible values.
3757      * </pre>
3758      *
3759      * <code>optional string type = 3575610;</code>
3760      *
3761      * @return The bytes for type.
3762      */
getTypeBytes()3763     public com.google.protobuf.ByteString getTypeBytes() {
3764       java.lang.Object ref = type_;
3765       if (ref instanceof String) {
3766         com.google.protobuf.ByteString b =
3767             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
3768         type_ = b;
3769         return b;
3770       } else {
3771         return (com.google.protobuf.ByteString) ref;
3772       }
3773     }
3774     /**
3775      *
3776      *
3777      * <pre>
3778      * The type indicates the intended use of the security policy. - CLOUD_ARMOR: Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers. - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache. - CLOUD_ARMOR_INTERNAL_SERVICE: Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application. - CLOUD_ARMOR_NETWORK: Cloud Armor network policies can be configured to filter packets targeting network load balancing resources such as backend services, target pools, target instances, and instances with external IPs. They filter requests before the request is served from the application. This field can be set only at resource creation time.
3779      * Check the Type enum for the list of possible values.
3780      * </pre>
3781      *
3782      * <code>optional string type = 3575610;</code>
3783      *
3784      * @param value The type to set.
3785      * @return This builder for chaining.
3786      */
setType(java.lang.String value)3787     public Builder setType(java.lang.String value) {
3788       if (value == null) {
3789         throw new NullPointerException();
3790       }
3791       type_ = value;
3792       bitField0_ |= 0x00002000;
3793       onChanged();
3794       return this;
3795     }
3796     /**
3797      *
3798      *
3799      * <pre>
3800      * The type indicates the intended use of the security policy. - CLOUD_ARMOR: Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers. - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache. - CLOUD_ARMOR_INTERNAL_SERVICE: Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application. - CLOUD_ARMOR_NETWORK: Cloud Armor network policies can be configured to filter packets targeting network load balancing resources such as backend services, target pools, target instances, and instances with external IPs. They filter requests before the request is served from the application. This field can be set only at resource creation time.
3801      * Check the Type enum for the list of possible values.
3802      * </pre>
3803      *
3804      * <code>optional string type = 3575610;</code>
3805      *
3806      * @return This builder for chaining.
3807      */
clearType()3808     public Builder clearType() {
3809       type_ = getDefaultInstance().getType();
3810       bitField0_ = (bitField0_ & ~0x00002000);
3811       onChanged();
3812       return this;
3813     }
3814     /**
3815      *
3816      *
3817      * <pre>
3818      * The type indicates the intended use of the security policy. - CLOUD_ARMOR: Cloud Armor backend security policies can be configured to filter incoming HTTP requests targeting backend services. They filter requests before they hit the origin servers. - CLOUD_ARMOR_EDGE: Cloud Armor edge security policies can be configured to filter incoming HTTP requests targeting backend services (including Cloud CDN-enabled) as well as backend buckets (Cloud Storage). They filter requests before the request is served from Google's cache. - CLOUD_ARMOR_INTERNAL_SERVICE: Cloud Armor internal service policies can be configured to filter HTTP requests targeting services managed by Traffic Director in a service mesh. They filter requests before the request is served from the application. - CLOUD_ARMOR_NETWORK: Cloud Armor network policies can be configured to filter packets targeting network load balancing resources such as backend services, target pools, target instances, and instances with external IPs. They filter requests before the request is served from the application. This field can be set only at resource creation time.
3819      * Check the Type enum for the list of possible values.
3820      * </pre>
3821      *
3822      * <code>optional string type = 3575610;</code>
3823      *
3824      * @param value The bytes for type to set.
3825      * @return This builder for chaining.
3826      */
setTypeBytes(com.google.protobuf.ByteString value)3827     public Builder setTypeBytes(com.google.protobuf.ByteString value) {
3828       if (value == null) {
3829         throw new NullPointerException();
3830       }
3831       checkByteStringIsUtf8(value);
3832       type_ = value;
3833       bitField0_ |= 0x00002000;
3834       onChanged();
3835       return this;
3836     }
3837 
3838     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)3839     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
3840       return super.setUnknownFields(unknownFields);
3841     }
3842 
3843     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)3844     public final Builder mergeUnknownFields(
3845         final com.google.protobuf.UnknownFieldSet unknownFields) {
3846       return super.mergeUnknownFields(unknownFields);
3847     }
3848 
3849     // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.SecurityPolicy)
3850   }
3851 
3852   // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.SecurityPolicy)
3853   private static final com.google.cloud.compute.v1.SecurityPolicy DEFAULT_INSTANCE;
3854 
3855   static {
3856     DEFAULT_INSTANCE = new com.google.cloud.compute.v1.SecurityPolicy();
3857   }
3858 
getDefaultInstance()3859   public static com.google.cloud.compute.v1.SecurityPolicy getDefaultInstance() {
3860     return DEFAULT_INSTANCE;
3861   }
3862 
3863   private static final com.google.protobuf.Parser<SecurityPolicy> PARSER =
3864       new com.google.protobuf.AbstractParser<SecurityPolicy>() {
3865         @java.lang.Override
3866         public SecurityPolicy parsePartialFrom(
3867             com.google.protobuf.CodedInputStream input,
3868             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
3869             throws com.google.protobuf.InvalidProtocolBufferException {
3870           Builder builder = newBuilder();
3871           try {
3872             builder.mergeFrom(input, extensionRegistry);
3873           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
3874             throw e.setUnfinishedMessage(builder.buildPartial());
3875           } catch (com.google.protobuf.UninitializedMessageException e) {
3876             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
3877           } catch (java.io.IOException e) {
3878             throw new com.google.protobuf.InvalidProtocolBufferException(e)
3879                 .setUnfinishedMessage(builder.buildPartial());
3880           }
3881           return builder.buildPartial();
3882         }
3883       };
3884 
parser()3885   public static com.google.protobuf.Parser<SecurityPolicy> parser() {
3886     return PARSER;
3887   }
3888 
3889   @java.lang.Override
getParserForType()3890   public com.google.protobuf.Parser<SecurityPolicy> getParserForType() {
3891     return PARSER;
3892   }
3893 
3894   @java.lang.Override
getDefaultInstanceForType()3895   public com.google.cloud.compute.v1.SecurityPolicy getDefaultInstanceForType() {
3896     return DEFAULT_INSTANCE;
3897   }
3898 }
3899