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