• 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  * Status of a NAT contained in this router.
26  * </pre>
27  *
28  * Protobuf type {@code google.cloud.compute.v1.RouterStatusNatStatus}
29  */
30 public final class RouterStatusNatStatus extends com.google.protobuf.GeneratedMessageV3
31     implements
32     // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.RouterStatusNatStatus)
33     RouterStatusNatStatusOrBuilder {
34   private static final long serialVersionUID = 0L;
35   // Use RouterStatusNatStatus.newBuilder() to construct.
RouterStatusNatStatus(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36   private RouterStatusNatStatus(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
37     super(builder);
38   }
39 
RouterStatusNatStatus()40   private RouterStatusNatStatus() {
41     autoAllocatedNatIps_ = com.google.protobuf.LazyStringArrayList.EMPTY;
42     drainAutoAllocatedNatIps_ = com.google.protobuf.LazyStringArrayList.EMPTY;
43     drainUserAllocatedNatIps_ = com.google.protobuf.LazyStringArrayList.EMPTY;
44     name_ = "";
45     ruleStatus_ = java.util.Collections.emptyList();
46     userAllocatedNatIpResources_ = com.google.protobuf.LazyStringArrayList.EMPTY;
47     userAllocatedNatIps_ = com.google.protobuf.LazyStringArrayList.EMPTY;
48   }
49 
50   @java.lang.Override
51   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)52   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
53     return new RouterStatusNatStatus();
54   }
55 
56   @java.lang.Override
getUnknownFields()57   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
58     return this.unknownFields;
59   }
60 
getDescriptor()61   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
62     return com.google.cloud.compute.v1.Compute
63         .internal_static_google_cloud_compute_v1_RouterStatusNatStatus_descriptor;
64   }
65 
66   @java.lang.Override
67   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()68       internalGetFieldAccessorTable() {
69     return com.google.cloud.compute.v1.Compute
70         .internal_static_google_cloud_compute_v1_RouterStatusNatStatus_fieldAccessorTable
71         .ensureFieldAccessorsInitialized(
72             com.google.cloud.compute.v1.RouterStatusNatStatus.class,
73             com.google.cloud.compute.v1.RouterStatusNatStatus.Builder.class);
74   }
75 
76   private int bitField0_;
77   public static final int AUTO_ALLOCATED_NAT_IPS_FIELD_NUMBER = 510794246;
78 
79   @SuppressWarnings("serial")
80   private com.google.protobuf.LazyStringList autoAllocatedNatIps_;
81   /**
82    *
83    *
84    * <pre>
85    * A list of IPs auto-allocated for NAT. Example: ["1.1.1.1", "129.2.16.89"]
86    * </pre>
87    *
88    * <code>repeated string auto_allocated_nat_ips = 510794246;</code>
89    *
90    * @return A list containing the autoAllocatedNatIps.
91    */
getAutoAllocatedNatIpsList()92   public com.google.protobuf.ProtocolStringList getAutoAllocatedNatIpsList() {
93     return autoAllocatedNatIps_;
94   }
95   /**
96    *
97    *
98    * <pre>
99    * A list of IPs auto-allocated for NAT. Example: ["1.1.1.1", "129.2.16.89"]
100    * </pre>
101    *
102    * <code>repeated string auto_allocated_nat_ips = 510794246;</code>
103    *
104    * @return The count of autoAllocatedNatIps.
105    */
getAutoAllocatedNatIpsCount()106   public int getAutoAllocatedNatIpsCount() {
107     return autoAllocatedNatIps_.size();
108   }
109   /**
110    *
111    *
112    * <pre>
113    * A list of IPs auto-allocated for NAT. Example: ["1.1.1.1", "129.2.16.89"]
114    * </pre>
115    *
116    * <code>repeated string auto_allocated_nat_ips = 510794246;</code>
117    *
118    * @param index The index of the element to return.
119    * @return The autoAllocatedNatIps at the given index.
120    */
getAutoAllocatedNatIps(int index)121   public java.lang.String getAutoAllocatedNatIps(int index) {
122     return autoAllocatedNatIps_.get(index);
123   }
124   /**
125    *
126    *
127    * <pre>
128    * A list of IPs auto-allocated for NAT. Example: ["1.1.1.1", "129.2.16.89"]
129    * </pre>
130    *
131    * <code>repeated string auto_allocated_nat_ips = 510794246;</code>
132    *
133    * @param index The index of the value to return.
134    * @return The bytes of the autoAllocatedNatIps at the given index.
135    */
getAutoAllocatedNatIpsBytes(int index)136   public com.google.protobuf.ByteString getAutoAllocatedNatIpsBytes(int index) {
137     return autoAllocatedNatIps_.getByteString(index);
138   }
139 
140   public static final int DRAIN_AUTO_ALLOCATED_NAT_IPS_FIELD_NUMBER = 309184557;
141 
142   @SuppressWarnings("serial")
143   private com.google.protobuf.LazyStringList drainAutoAllocatedNatIps_;
144   /**
145    *
146    *
147    * <pre>
148    * A list of IPs auto-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
149    * </pre>
150    *
151    * <code>repeated string drain_auto_allocated_nat_ips = 309184557;</code>
152    *
153    * @return A list containing the drainAutoAllocatedNatIps.
154    */
getDrainAutoAllocatedNatIpsList()155   public com.google.protobuf.ProtocolStringList getDrainAutoAllocatedNatIpsList() {
156     return drainAutoAllocatedNatIps_;
157   }
158   /**
159    *
160    *
161    * <pre>
162    * A list of IPs auto-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
163    * </pre>
164    *
165    * <code>repeated string drain_auto_allocated_nat_ips = 309184557;</code>
166    *
167    * @return The count of drainAutoAllocatedNatIps.
168    */
getDrainAutoAllocatedNatIpsCount()169   public int getDrainAutoAllocatedNatIpsCount() {
170     return drainAutoAllocatedNatIps_.size();
171   }
172   /**
173    *
174    *
175    * <pre>
176    * A list of IPs auto-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
177    * </pre>
178    *
179    * <code>repeated string drain_auto_allocated_nat_ips = 309184557;</code>
180    *
181    * @param index The index of the element to return.
182    * @return The drainAutoAllocatedNatIps at the given index.
183    */
getDrainAutoAllocatedNatIps(int index)184   public java.lang.String getDrainAutoAllocatedNatIps(int index) {
185     return drainAutoAllocatedNatIps_.get(index);
186   }
187   /**
188    *
189    *
190    * <pre>
191    * A list of IPs auto-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
192    * </pre>
193    *
194    * <code>repeated string drain_auto_allocated_nat_ips = 309184557;</code>
195    *
196    * @param index The index of the value to return.
197    * @return The bytes of the drainAutoAllocatedNatIps at the given index.
198    */
getDrainAutoAllocatedNatIpsBytes(int index)199   public com.google.protobuf.ByteString getDrainAutoAllocatedNatIpsBytes(int index) {
200     return drainAutoAllocatedNatIps_.getByteString(index);
201   }
202 
203   public static final int DRAIN_USER_ALLOCATED_NAT_IPS_FIELD_NUMBER = 305268553;
204 
205   @SuppressWarnings("serial")
206   private com.google.protobuf.LazyStringList drainUserAllocatedNatIps_;
207   /**
208    *
209    *
210    * <pre>
211    * A list of IPs user-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
212    * </pre>
213    *
214    * <code>repeated string drain_user_allocated_nat_ips = 305268553;</code>
215    *
216    * @return A list containing the drainUserAllocatedNatIps.
217    */
getDrainUserAllocatedNatIpsList()218   public com.google.protobuf.ProtocolStringList getDrainUserAllocatedNatIpsList() {
219     return drainUserAllocatedNatIps_;
220   }
221   /**
222    *
223    *
224    * <pre>
225    * A list of IPs user-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
226    * </pre>
227    *
228    * <code>repeated string drain_user_allocated_nat_ips = 305268553;</code>
229    *
230    * @return The count of drainUserAllocatedNatIps.
231    */
getDrainUserAllocatedNatIpsCount()232   public int getDrainUserAllocatedNatIpsCount() {
233     return drainUserAllocatedNatIps_.size();
234   }
235   /**
236    *
237    *
238    * <pre>
239    * A list of IPs user-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
240    * </pre>
241    *
242    * <code>repeated string drain_user_allocated_nat_ips = 305268553;</code>
243    *
244    * @param index The index of the element to return.
245    * @return The drainUserAllocatedNatIps at the given index.
246    */
getDrainUserAllocatedNatIps(int index)247   public java.lang.String getDrainUserAllocatedNatIps(int index) {
248     return drainUserAllocatedNatIps_.get(index);
249   }
250   /**
251    *
252    *
253    * <pre>
254    * A list of IPs user-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
255    * </pre>
256    *
257    * <code>repeated string drain_user_allocated_nat_ips = 305268553;</code>
258    *
259    * @param index The index of the value to return.
260    * @return The bytes of the drainUserAllocatedNatIps at the given index.
261    */
getDrainUserAllocatedNatIpsBytes(int index)262   public com.google.protobuf.ByteString getDrainUserAllocatedNatIpsBytes(int index) {
263     return drainUserAllocatedNatIps_.getByteString(index);
264   }
265 
266   public static final int MIN_EXTRA_NAT_IPS_NEEDED_FIELD_NUMBER = 365786338;
267   private int minExtraNatIpsNeeded_ = 0;
268   /**
269    *
270    *
271    * <pre>
272    * The number of extra IPs to allocate. This will be greater than 0 only if user-specified IPs are NOT enough to allow all configured VMs to use NAT. This value is meaningful only when auto-allocation of NAT IPs is *not* used.
273    * </pre>
274    *
275    * <code>optional int32 min_extra_nat_ips_needed = 365786338;</code>
276    *
277    * @return Whether the minExtraNatIpsNeeded field is set.
278    */
279   @java.lang.Override
hasMinExtraNatIpsNeeded()280   public boolean hasMinExtraNatIpsNeeded() {
281     return ((bitField0_ & 0x00000001) != 0);
282   }
283   /**
284    *
285    *
286    * <pre>
287    * The number of extra IPs to allocate. This will be greater than 0 only if user-specified IPs are NOT enough to allow all configured VMs to use NAT. This value is meaningful only when auto-allocation of NAT IPs is *not* used.
288    * </pre>
289    *
290    * <code>optional int32 min_extra_nat_ips_needed = 365786338;</code>
291    *
292    * @return The minExtraNatIpsNeeded.
293    */
294   @java.lang.Override
getMinExtraNatIpsNeeded()295   public int getMinExtraNatIpsNeeded() {
296     return minExtraNatIpsNeeded_;
297   }
298 
299   public static final int NAME_FIELD_NUMBER = 3373707;
300 
301   @SuppressWarnings("serial")
302   private volatile java.lang.Object name_ = "";
303   /**
304    *
305    *
306    * <pre>
307    * Unique name of this NAT.
308    * </pre>
309    *
310    * <code>optional string name = 3373707;</code>
311    *
312    * @return Whether the name field is set.
313    */
314   @java.lang.Override
hasName()315   public boolean hasName() {
316     return ((bitField0_ & 0x00000002) != 0);
317   }
318   /**
319    *
320    *
321    * <pre>
322    * Unique name of this NAT.
323    * </pre>
324    *
325    * <code>optional string name = 3373707;</code>
326    *
327    * @return The name.
328    */
329   @java.lang.Override
getName()330   public java.lang.String getName() {
331     java.lang.Object ref = name_;
332     if (ref instanceof java.lang.String) {
333       return (java.lang.String) ref;
334     } else {
335       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
336       java.lang.String s = bs.toStringUtf8();
337       name_ = s;
338       return s;
339     }
340   }
341   /**
342    *
343    *
344    * <pre>
345    * Unique name of this NAT.
346    * </pre>
347    *
348    * <code>optional string name = 3373707;</code>
349    *
350    * @return The bytes for name.
351    */
352   @java.lang.Override
getNameBytes()353   public com.google.protobuf.ByteString getNameBytes() {
354     java.lang.Object ref = name_;
355     if (ref instanceof java.lang.String) {
356       com.google.protobuf.ByteString b =
357           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
358       name_ = b;
359       return b;
360     } else {
361       return (com.google.protobuf.ByteString) ref;
362     }
363   }
364 
365   public static final int NUM_VM_ENDPOINTS_WITH_NAT_MAPPINGS_FIELD_NUMBER = 512367468;
366   private int numVmEndpointsWithNatMappings_ = 0;
367   /**
368    *
369    *
370    * <pre>
371    * Number of VM endpoints (i.e., Nics) that can use NAT.
372    * </pre>
373    *
374    * <code>optional int32 num_vm_endpoints_with_nat_mappings = 512367468;</code>
375    *
376    * @return Whether the numVmEndpointsWithNatMappings field is set.
377    */
378   @java.lang.Override
hasNumVmEndpointsWithNatMappings()379   public boolean hasNumVmEndpointsWithNatMappings() {
380     return ((bitField0_ & 0x00000004) != 0);
381   }
382   /**
383    *
384    *
385    * <pre>
386    * Number of VM endpoints (i.e., Nics) that can use NAT.
387    * </pre>
388    *
389    * <code>optional int32 num_vm_endpoints_with_nat_mappings = 512367468;</code>
390    *
391    * @return The numVmEndpointsWithNatMappings.
392    */
393   @java.lang.Override
getNumVmEndpointsWithNatMappings()394   public int getNumVmEndpointsWithNatMappings() {
395     return numVmEndpointsWithNatMappings_;
396   }
397 
398   public static final int RULE_STATUS_FIELD_NUMBER = 140223125;
399 
400   @SuppressWarnings("serial")
401   private java.util.List<com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus>
402       ruleStatus_;
403   /**
404    *
405    *
406    * <pre>
407    * Status of rules in this NAT.
408    * </pre>
409    *
410    * <code>
411    * repeated .google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus rule_status = 140223125;
412    * </code>
413    */
414   @java.lang.Override
415   public java.util.List<com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus>
getRuleStatusList()416       getRuleStatusList() {
417     return ruleStatus_;
418   }
419   /**
420    *
421    *
422    * <pre>
423    * Status of rules in this NAT.
424    * </pre>
425    *
426    * <code>
427    * repeated .google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus rule_status = 140223125;
428    * </code>
429    */
430   @java.lang.Override
431   public java.util.List<
432           ? extends com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatusOrBuilder>
getRuleStatusOrBuilderList()433       getRuleStatusOrBuilderList() {
434     return ruleStatus_;
435   }
436   /**
437    *
438    *
439    * <pre>
440    * Status of rules in this NAT.
441    * </pre>
442    *
443    * <code>
444    * repeated .google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus rule_status = 140223125;
445    * </code>
446    */
447   @java.lang.Override
getRuleStatusCount()448   public int getRuleStatusCount() {
449     return ruleStatus_.size();
450   }
451   /**
452    *
453    *
454    * <pre>
455    * Status of rules in this NAT.
456    * </pre>
457    *
458    * <code>
459    * repeated .google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus rule_status = 140223125;
460    * </code>
461    */
462   @java.lang.Override
getRuleStatus(int index)463   public com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus getRuleStatus(int index) {
464     return ruleStatus_.get(index);
465   }
466   /**
467    *
468    *
469    * <pre>
470    * Status of rules in this NAT.
471    * </pre>
472    *
473    * <code>
474    * repeated .google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus rule_status = 140223125;
475    * </code>
476    */
477   @java.lang.Override
478   public com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatusOrBuilder
getRuleStatusOrBuilder(int index)479       getRuleStatusOrBuilder(int index) {
480     return ruleStatus_.get(index);
481   }
482 
483   public static final int USER_ALLOCATED_NAT_IP_RESOURCES_FIELD_NUMBER = 212776151;
484 
485   @SuppressWarnings("serial")
486   private com.google.protobuf.LazyStringList userAllocatedNatIpResources_;
487   /**
488    *
489    *
490    * <pre>
491    * A list of fully qualified URLs of reserved IP address resources.
492    * </pre>
493    *
494    * <code>repeated string user_allocated_nat_ip_resources = 212776151;</code>
495    *
496    * @return A list containing the userAllocatedNatIpResources.
497    */
getUserAllocatedNatIpResourcesList()498   public com.google.protobuf.ProtocolStringList getUserAllocatedNatIpResourcesList() {
499     return userAllocatedNatIpResources_;
500   }
501   /**
502    *
503    *
504    * <pre>
505    * A list of fully qualified URLs of reserved IP address resources.
506    * </pre>
507    *
508    * <code>repeated string user_allocated_nat_ip_resources = 212776151;</code>
509    *
510    * @return The count of userAllocatedNatIpResources.
511    */
getUserAllocatedNatIpResourcesCount()512   public int getUserAllocatedNatIpResourcesCount() {
513     return userAllocatedNatIpResources_.size();
514   }
515   /**
516    *
517    *
518    * <pre>
519    * A list of fully qualified URLs of reserved IP address resources.
520    * </pre>
521    *
522    * <code>repeated string user_allocated_nat_ip_resources = 212776151;</code>
523    *
524    * @param index The index of the element to return.
525    * @return The userAllocatedNatIpResources at the given index.
526    */
getUserAllocatedNatIpResources(int index)527   public java.lang.String getUserAllocatedNatIpResources(int index) {
528     return userAllocatedNatIpResources_.get(index);
529   }
530   /**
531    *
532    *
533    * <pre>
534    * A list of fully qualified URLs of reserved IP address resources.
535    * </pre>
536    *
537    * <code>repeated string user_allocated_nat_ip_resources = 212776151;</code>
538    *
539    * @param index The index of the value to return.
540    * @return The bytes of the userAllocatedNatIpResources at the given index.
541    */
getUserAllocatedNatIpResourcesBytes(int index)542   public com.google.protobuf.ByteString getUserAllocatedNatIpResourcesBytes(int index) {
543     return userAllocatedNatIpResources_.getByteString(index);
544   }
545 
546   public static final int USER_ALLOCATED_NAT_IPS_FIELD_NUMBER = 506878242;
547 
548   @SuppressWarnings("serial")
549   private com.google.protobuf.LazyStringList userAllocatedNatIps_;
550   /**
551    *
552    *
553    * <pre>
554    * A list of IPs user-allocated for NAT. They will be raw IP strings like "179.12.26.133".
555    * </pre>
556    *
557    * <code>repeated string user_allocated_nat_ips = 506878242;</code>
558    *
559    * @return A list containing the userAllocatedNatIps.
560    */
getUserAllocatedNatIpsList()561   public com.google.protobuf.ProtocolStringList getUserAllocatedNatIpsList() {
562     return userAllocatedNatIps_;
563   }
564   /**
565    *
566    *
567    * <pre>
568    * A list of IPs user-allocated for NAT. They will be raw IP strings like "179.12.26.133".
569    * </pre>
570    *
571    * <code>repeated string user_allocated_nat_ips = 506878242;</code>
572    *
573    * @return The count of userAllocatedNatIps.
574    */
getUserAllocatedNatIpsCount()575   public int getUserAllocatedNatIpsCount() {
576     return userAllocatedNatIps_.size();
577   }
578   /**
579    *
580    *
581    * <pre>
582    * A list of IPs user-allocated for NAT. They will be raw IP strings like "179.12.26.133".
583    * </pre>
584    *
585    * <code>repeated string user_allocated_nat_ips = 506878242;</code>
586    *
587    * @param index The index of the element to return.
588    * @return The userAllocatedNatIps at the given index.
589    */
getUserAllocatedNatIps(int index)590   public java.lang.String getUserAllocatedNatIps(int index) {
591     return userAllocatedNatIps_.get(index);
592   }
593   /**
594    *
595    *
596    * <pre>
597    * A list of IPs user-allocated for NAT. They will be raw IP strings like "179.12.26.133".
598    * </pre>
599    *
600    * <code>repeated string user_allocated_nat_ips = 506878242;</code>
601    *
602    * @param index The index of the value to return.
603    * @return The bytes of the userAllocatedNatIps at the given index.
604    */
getUserAllocatedNatIpsBytes(int index)605   public com.google.protobuf.ByteString getUserAllocatedNatIpsBytes(int index) {
606     return userAllocatedNatIps_.getByteString(index);
607   }
608 
609   private byte memoizedIsInitialized = -1;
610 
611   @java.lang.Override
isInitialized()612   public final boolean isInitialized() {
613     byte isInitialized = memoizedIsInitialized;
614     if (isInitialized == 1) return true;
615     if (isInitialized == 0) return false;
616 
617     memoizedIsInitialized = 1;
618     return true;
619   }
620 
621   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)622   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
623     if (((bitField0_ & 0x00000002) != 0)) {
624       com.google.protobuf.GeneratedMessageV3.writeString(output, 3373707, name_);
625     }
626     for (int i = 0; i < ruleStatus_.size(); i++) {
627       output.writeMessage(140223125, ruleStatus_.get(i));
628     }
629     for (int i = 0; i < userAllocatedNatIpResources_.size(); i++) {
630       com.google.protobuf.GeneratedMessageV3.writeString(
631           output, 212776151, userAllocatedNatIpResources_.getRaw(i));
632     }
633     for (int i = 0; i < drainUserAllocatedNatIps_.size(); i++) {
634       com.google.protobuf.GeneratedMessageV3.writeString(
635           output, 305268553, drainUserAllocatedNatIps_.getRaw(i));
636     }
637     for (int i = 0; i < drainAutoAllocatedNatIps_.size(); i++) {
638       com.google.protobuf.GeneratedMessageV3.writeString(
639           output, 309184557, drainAutoAllocatedNatIps_.getRaw(i));
640     }
641     if (((bitField0_ & 0x00000001) != 0)) {
642       output.writeInt32(365786338, minExtraNatIpsNeeded_);
643     }
644     for (int i = 0; i < userAllocatedNatIps_.size(); i++) {
645       com.google.protobuf.GeneratedMessageV3.writeString(
646           output, 506878242, userAllocatedNatIps_.getRaw(i));
647     }
648     for (int i = 0; i < autoAllocatedNatIps_.size(); i++) {
649       com.google.protobuf.GeneratedMessageV3.writeString(
650           output, 510794246, autoAllocatedNatIps_.getRaw(i));
651     }
652     if (((bitField0_ & 0x00000004) != 0)) {
653       output.writeInt32(512367468, numVmEndpointsWithNatMappings_);
654     }
655     getUnknownFields().writeTo(output);
656   }
657 
658   @java.lang.Override
getSerializedSize()659   public int getSerializedSize() {
660     int size = memoizedSize;
661     if (size != -1) return size;
662 
663     size = 0;
664     if (((bitField0_ & 0x00000002) != 0)) {
665       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3373707, name_);
666     }
667     for (int i = 0; i < ruleStatus_.size(); i++) {
668       size +=
669           com.google.protobuf.CodedOutputStream.computeMessageSize(140223125, ruleStatus_.get(i));
670     }
671     {
672       int dataSize = 0;
673       for (int i = 0; i < userAllocatedNatIpResources_.size(); i++) {
674         dataSize += computeStringSizeNoTag(userAllocatedNatIpResources_.getRaw(i));
675       }
676       size += dataSize;
677       size += 5 * getUserAllocatedNatIpResourcesList().size();
678     }
679     {
680       int dataSize = 0;
681       for (int i = 0; i < drainUserAllocatedNatIps_.size(); i++) {
682         dataSize += computeStringSizeNoTag(drainUserAllocatedNatIps_.getRaw(i));
683       }
684       size += dataSize;
685       size += 5 * getDrainUserAllocatedNatIpsList().size();
686     }
687     {
688       int dataSize = 0;
689       for (int i = 0; i < drainAutoAllocatedNatIps_.size(); i++) {
690         dataSize += computeStringSizeNoTag(drainAutoAllocatedNatIps_.getRaw(i));
691       }
692       size += dataSize;
693       size += 5 * getDrainAutoAllocatedNatIpsList().size();
694     }
695     if (((bitField0_ & 0x00000001) != 0)) {
696       size +=
697           com.google.protobuf.CodedOutputStream.computeInt32Size(365786338, minExtraNatIpsNeeded_);
698     }
699     {
700       int dataSize = 0;
701       for (int i = 0; i < userAllocatedNatIps_.size(); i++) {
702         dataSize += computeStringSizeNoTag(userAllocatedNatIps_.getRaw(i));
703       }
704       size += dataSize;
705       size += 5 * getUserAllocatedNatIpsList().size();
706     }
707     {
708       int dataSize = 0;
709       for (int i = 0; i < autoAllocatedNatIps_.size(); i++) {
710         dataSize += computeStringSizeNoTag(autoAllocatedNatIps_.getRaw(i));
711       }
712       size += dataSize;
713       size += 5 * getAutoAllocatedNatIpsList().size();
714     }
715     if (((bitField0_ & 0x00000004) != 0)) {
716       size +=
717           com.google.protobuf.CodedOutputStream.computeInt32Size(
718               512367468, numVmEndpointsWithNatMappings_);
719     }
720     size += getUnknownFields().getSerializedSize();
721     memoizedSize = size;
722     return size;
723   }
724 
725   @java.lang.Override
equals(final java.lang.Object obj)726   public boolean equals(final java.lang.Object obj) {
727     if (obj == this) {
728       return true;
729     }
730     if (!(obj instanceof com.google.cloud.compute.v1.RouterStatusNatStatus)) {
731       return super.equals(obj);
732     }
733     com.google.cloud.compute.v1.RouterStatusNatStatus other =
734         (com.google.cloud.compute.v1.RouterStatusNatStatus) obj;
735 
736     if (!getAutoAllocatedNatIpsList().equals(other.getAutoAllocatedNatIpsList())) return false;
737     if (!getDrainAutoAllocatedNatIpsList().equals(other.getDrainAutoAllocatedNatIpsList()))
738       return false;
739     if (!getDrainUserAllocatedNatIpsList().equals(other.getDrainUserAllocatedNatIpsList()))
740       return false;
741     if (hasMinExtraNatIpsNeeded() != other.hasMinExtraNatIpsNeeded()) return false;
742     if (hasMinExtraNatIpsNeeded()) {
743       if (getMinExtraNatIpsNeeded() != other.getMinExtraNatIpsNeeded()) return false;
744     }
745     if (hasName() != other.hasName()) return false;
746     if (hasName()) {
747       if (!getName().equals(other.getName())) return false;
748     }
749     if (hasNumVmEndpointsWithNatMappings() != other.hasNumVmEndpointsWithNatMappings())
750       return false;
751     if (hasNumVmEndpointsWithNatMappings()) {
752       if (getNumVmEndpointsWithNatMappings() != other.getNumVmEndpointsWithNatMappings())
753         return false;
754     }
755     if (!getRuleStatusList().equals(other.getRuleStatusList())) return false;
756     if (!getUserAllocatedNatIpResourcesList().equals(other.getUserAllocatedNatIpResourcesList()))
757       return false;
758     if (!getUserAllocatedNatIpsList().equals(other.getUserAllocatedNatIpsList())) return false;
759     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
760     return true;
761   }
762 
763   @java.lang.Override
hashCode()764   public int hashCode() {
765     if (memoizedHashCode != 0) {
766       return memoizedHashCode;
767     }
768     int hash = 41;
769     hash = (19 * hash) + getDescriptor().hashCode();
770     if (getAutoAllocatedNatIpsCount() > 0) {
771       hash = (37 * hash) + AUTO_ALLOCATED_NAT_IPS_FIELD_NUMBER;
772       hash = (53 * hash) + getAutoAllocatedNatIpsList().hashCode();
773     }
774     if (getDrainAutoAllocatedNatIpsCount() > 0) {
775       hash = (37 * hash) + DRAIN_AUTO_ALLOCATED_NAT_IPS_FIELD_NUMBER;
776       hash = (53 * hash) + getDrainAutoAllocatedNatIpsList().hashCode();
777     }
778     if (getDrainUserAllocatedNatIpsCount() > 0) {
779       hash = (37 * hash) + DRAIN_USER_ALLOCATED_NAT_IPS_FIELD_NUMBER;
780       hash = (53 * hash) + getDrainUserAllocatedNatIpsList().hashCode();
781     }
782     if (hasMinExtraNatIpsNeeded()) {
783       hash = (37 * hash) + MIN_EXTRA_NAT_IPS_NEEDED_FIELD_NUMBER;
784       hash = (53 * hash) + getMinExtraNatIpsNeeded();
785     }
786     if (hasName()) {
787       hash = (37 * hash) + NAME_FIELD_NUMBER;
788       hash = (53 * hash) + getName().hashCode();
789     }
790     if (hasNumVmEndpointsWithNatMappings()) {
791       hash = (37 * hash) + NUM_VM_ENDPOINTS_WITH_NAT_MAPPINGS_FIELD_NUMBER;
792       hash = (53 * hash) + getNumVmEndpointsWithNatMappings();
793     }
794     if (getRuleStatusCount() > 0) {
795       hash = (37 * hash) + RULE_STATUS_FIELD_NUMBER;
796       hash = (53 * hash) + getRuleStatusList().hashCode();
797     }
798     if (getUserAllocatedNatIpResourcesCount() > 0) {
799       hash = (37 * hash) + USER_ALLOCATED_NAT_IP_RESOURCES_FIELD_NUMBER;
800       hash = (53 * hash) + getUserAllocatedNatIpResourcesList().hashCode();
801     }
802     if (getUserAllocatedNatIpsCount() > 0) {
803       hash = (37 * hash) + USER_ALLOCATED_NAT_IPS_FIELD_NUMBER;
804       hash = (53 * hash) + getUserAllocatedNatIpsList().hashCode();
805     }
806     hash = (29 * hash) + getUnknownFields().hashCode();
807     memoizedHashCode = hash;
808     return hash;
809   }
810 
parseFrom( java.nio.ByteBuffer data)811   public static com.google.cloud.compute.v1.RouterStatusNatStatus parseFrom(
812       java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
813     return PARSER.parseFrom(data);
814   }
815 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)816   public static com.google.cloud.compute.v1.RouterStatusNatStatus parseFrom(
817       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
818       throws com.google.protobuf.InvalidProtocolBufferException {
819     return PARSER.parseFrom(data, extensionRegistry);
820   }
821 
parseFrom( com.google.protobuf.ByteString data)822   public static com.google.cloud.compute.v1.RouterStatusNatStatus parseFrom(
823       com.google.protobuf.ByteString data)
824       throws com.google.protobuf.InvalidProtocolBufferException {
825     return PARSER.parseFrom(data);
826   }
827 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)828   public static com.google.cloud.compute.v1.RouterStatusNatStatus parseFrom(
829       com.google.protobuf.ByteString data,
830       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
831       throws com.google.protobuf.InvalidProtocolBufferException {
832     return PARSER.parseFrom(data, extensionRegistry);
833   }
834 
parseFrom(byte[] data)835   public static com.google.cloud.compute.v1.RouterStatusNatStatus parseFrom(byte[] data)
836       throws com.google.protobuf.InvalidProtocolBufferException {
837     return PARSER.parseFrom(data);
838   }
839 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)840   public static com.google.cloud.compute.v1.RouterStatusNatStatus parseFrom(
841       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
842       throws com.google.protobuf.InvalidProtocolBufferException {
843     return PARSER.parseFrom(data, extensionRegistry);
844   }
845 
parseFrom( java.io.InputStream input)846   public static com.google.cloud.compute.v1.RouterStatusNatStatus parseFrom(
847       java.io.InputStream input) throws java.io.IOException {
848     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
849   }
850 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)851   public static com.google.cloud.compute.v1.RouterStatusNatStatus parseFrom(
852       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
853       throws java.io.IOException {
854     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
855         PARSER, input, extensionRegistry);
856   }
857 
parseDelimitedFrom( java.io.InputStream input)858   public static com.google.cloud.compute.v1.RouterStatusNatStatus parseDelimitedFrom(
859       java.io.InputStream input) throws java.io.IOException {
860     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
861   }
862 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)863   public static com.google.cloud.compute.v1.RouterStatusNatStatus parseDelimitedFrom(
864       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
865       throws java.io.IOException {
866     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
867         PARSER, input, extensionRegistry);
868   }
869 
parseFrom( com.google.protobuf.CodedInputStream input)870   public static com.google.cloud.compute.v1.RouterStatusNatStatus parseFrom(
871       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
872     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
873   }
874 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)875   public static com.google.cloud.compute.v1.RouterStatusNatStatus parseFrom(
876       com.google.protobuf.CodedInputStream input,
877       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
878       throws java.io.IOException {
879     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
880         PARSER, input, extensionRegistry);
881   }
882 
883   @java.lang.Override
newBuilderForType()884   public Builder newBuilderForType() {
885     return newBuilder();
886   }
887 
newBuilder()888   public static Builder newBuilder() {
889     return DEFAULT_INSTANCE.toBuilder();
890   }
891 
newBuilder(com.google.cloud.compute.v1.RouterStatusNatStatus prototype)892   public static Builder newBuilder(com.google.cloud.compute.v1.RouterStatusNatStatus prototype) {
893     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
894   }
895 
896   @java.lang.Override
toBuilder()897   public Builder toBuilder() {
898     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
899   }
900 
901   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)902   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
903     Builder builder = new Builder(parent);
904     return builder;
905   }
906   /**
907    *
908    *
909    * <pre>
910    * Status of a NAT contained in this router.
911    * </pre>
912    *
913    * Protobuf type {@code google.cloud.compute.v1.RouterStatusNatStatus}
914    */
915   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
916       implements
917       // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.RouterStatusNatStatus)
918       com.google.cloud.compute.v1.RouterStatusNatStatusOrBuilder {
getDescriptor()919     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
920       return com.google.cloud.compute.v1.Compute
921           .internal_static_google_cloud_compute_v1_RouterStatusNatStatus_descriptor;
922     }
923 
924     @java.lang.Override
925     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()926         internalGetFieldAccessorTable() {
927       return com.google.cloud.compute.v1.Compute
928           .internal_static_google_cloud_compute_v1_RouterStatusNatStatus_fieldAccessorTable
929           .ensureFieldAccessorsInitialized(
930               com.google.cloud.compute.v1.RouterStatusNatStatus.class,
931               com.google.cloud.compute.v1.RouterStatusNatStatus.Builder.class);
932     }
933 
934     // Construct using com.google.cloud.compute.v1.RouterStatusNatStatus.newBuilder()
Builder()935     private Builder() {}
936 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)937     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
938       super(parent);
939     }
940 
941     @java.lang.Override
clear()942     public Builder clear() {
943       super.clear();
944       bitField0_ = 0;
945       autoAllocatedNatIps_ = com.google.protobuf.LazyStringArrayList.EMPTY;
946       bitField0_ = (bitField0_ & ~0x00000001);
947       drainAutoAllocatedNatIps_ = com.google.protobuf.LazyStringArrayList.EMPTY;
948       bitField0_ = (bitField0_ & ~0x00000002);
949       drainUserAllocatedNatIps_ = com.google.protobuf.LazyStringArrayList.EMPTY;
950       bitField0_ = (bitField0_ & ~0x00000004);
951       minExtraNatIpsNeeded_ = 0;
952       name_ = "";
953       numVmEndpointsWithNatMappings_ = 0;
954       if (ruleStatusBuilder_ == null) {
955         ruleStatus_ = java.util.Collections.emptyList();
956       } else {
957         ruleStatus_ = null;
958         ruleStatusBuilder_.clear();
959       }
960       bitField0_ = (bitField0_ & ~0x00000040);
961       userAllocatedNatIpResources_ = com.google.protobuf.LazyStringArrayList.EMPTY;
962       bitField0_ = (bitField0_ & ~0x00000080);
963       userAllocatedNatIps_ = com.google.protobuf.LazyStringArrayList.EMPTY;
964       bitField0_ = (bitField0_ & ~0x00000100);
965       return this;
966     }
967 
968     @java.lang.Override
getDescriptorForType()969     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
970       return com.google.cloud.compute.v1.Compute
971           .internal_static_google_cloud_compute_v1_RouterStatusNatStatus_descriptor;
972     }
973 
974     @java.lang.Override
getDefaultInstanceForType()975     public com.google.cloud.compute.v1.RouterStatusNatStatus getDefaultInstanceForType() {
976       return com.google.cloud.compute.v1.RouterStatusNatStatus.getDefaultInstance();
977     }
978 
979     @java.lang.Override
build()980     public com.google.cloud.compute.v1.RouterStatusNatStatus build() {
981       com.google.cloud.compute.v1.RouterStatusNatStatus result = buildPartial();
982       if (!result.isInitialized()) {
983         throw newUninitializedMessageException(result);
984       }
985       return result;
986     }
987 
988     @java.lang.Override
buildPartial()989     public com.google.cloud.compute.v1.RouterStatusNatStatus buildPartial() {
990       com.google.cloud.compute.v1.RouterStatusNatStatus result =
991           new com.google.cloud.compute.v1.RouterStatusNatStatus(this);
992       buildPartialRepeatedFields(result);
993       if (bitField0_ != 0) {
994         buildPartial0(result);
995       }
996       onBuilt();
997       return result;
998     }
999 
buildPartialRepeatedFields( com.google.cloud.compute.v1.RouterStatusNatStatus result)1000     private void buildPartialRepeatedFields(
1001         com.google.cloud.compute.v1.RouterStatusNatStatus result) {
1002       if (((bitField0_ & 0x00000001) != 0)) {
1003         autoAllocatedNatIps_ = autoAllocatedNatIps_.getUnmodifiableView();
1004         bitField0_ = (bitField0_ & ~0x00000001);
1005       }
1006       result.autoAllocatedNatIps_ = autoAllocatedNatIps_;
1007       if (((bitField0_ & 0x00000002) != 0)) {
1008         drainAutoAllocatedNatIps_ = drainAutoAllocatedNatIps_.getUnmodifiableView();
1009         bitField0_ = (bitField0_ & ~0x00000002);
1010       }
1011       result.drainAutoAllocatedNatIps_ = drainAutoAllocatedNatIps_;
1012       if (((bitField0_ & 0x00000004) != 0)) {
1013         drainUserAllocatedNatIps_ = drainUserAllocatedNatIps_.getUnmodifiableView();
1014         bitField0_ = (bitField0_ & ~0x00000004);
1015       }
1016       result.drainUserAllocatedNatIps_ = drainUserAllocatedNatIps_;
1017       if (ruleStatusBuilder_ == null) {
1018         if (((bitField0_ & 0x00000040) != 0)) {
1019           ruleStatus_ = java.util.Collections.unmodifiableList(ruleStatus_);
1020           bitField0_ = (bitField0_ & ~0x00000040);
1021         }
1022         result.ruleStatus_ = ruleStatus_;
1023       } else {
1024         result.ruleStatus_ = ruleStatusBuilder_.build();
1025       }
1026       if (((bitField0_ & 0x00000080) != 0)) {
1027         userAllocatedNatIpResources_ = userAllocatedNatIpResources_.getUnmodifiableView();
1028         bitField0_ = (bitField0_ & ~0x00000080);
1029       }
1030       result.userAllocatedNatIpResources_ = userAllocatedNatIpResources_;
1031       if (((bitField0_ & 0x00000100) != 0)) {
1032         userAllocatedNatIps_ = userAllocatedNatIps_.getUnmodifiableView();
1033         bitField0_ = (bitField0_ & ~0x00000100);
1034       }
1035       result.userAllocatedNatIps_ = userAllocatedNatIps_;
1036     }
1037 
buildPartial0(com.google.cloud.compute.v1.RouterStatusNatStatus result)1038     private void buildPartial0(com.google.cloud.compute.v1.RouterStatusNatStatus result) {
1039       int from_bitField0_ = bitField0_;
1040       int to_bitField0_ = 0;
1041       if (((from_bitField0_ & 0x00000008) != 0)) {
1042         result.minExtraNatIpsNeeded_ = minExtraNatIpsNeeded_;
1043         to_bitField0_ |= 0x00000001;
1044       }
1045       if (((from_bitField0_ & 0x00000010) != 0)) {
1046         result.name_ = name_;
1047         to_bitField0_ |= 0x00000002;
1048       }
1049       if (((from_bitField0_ & 0x00000020) != 0)) {
1050         result.numVmEndpointsWithNatMappings_ = numVmEndpointsWithNatMappings_;
1051         to_bitField0_ |= 0x00000004;
1052       }
1053       result.bitField0_ |= to_bitField0_;
1054     }
1055 
1056     @java.lang.Override
clone()1057     public Builder clone() {
1058       return super.clone();
1059     }
1060 
1061     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1062     public Builder setField(
1063         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1064       return super.setField(field, value);
1065     }
1066 
1067     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1068     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
1069       return super.clearField(field);
1070     }
1071 
1072     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1073     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
1074       return super.clearOneof(oneof);
1075     }
1076 
1077     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1078     public Builder setRepeatedField(
1079         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
1080       return super.setRepeatedField(field, index, value);
1081     }
1082 
1083     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1084     public Builder addRepeatedField(
1085         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
1086       return super.addRepeatedField(field, value);
1087     }
1088 
1089     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)1090     public Builder mergeFrom(com.google.protobuf.Message other) {
1091       if (other instanceof com.google.cloud.compute.v1.RouterStatusNatStatus) {
1092         return mergeFrom((com.google.cloud.compute.v1.RouterStatusNatStatus) other);
1093       } else {
1094         super.mergeFrom(other);
1095         return this;
1096       }
1097     }
1098 
mergeFrom(com.google.cloud.compute.v1.RouterStatusNatStatus other)1099     public Builder mergeFrom(com.google.cloud.compute.v1.RouterStatusNatStatus other) {
1100       if (other == com.google.cloud.compute.v1.RouterStatusNatStatus.getDefaultInstance())
1101         return this;
1102       if (!other.autoAllocatedNatIps_.isEmpty()) {
1103         if (autoAllocatedNatIps_.isEmpty()) {
1104           autoAllocatedNatIps_ = other.autoAllocatedNatIps_;
1105           bitField0_ = (bitField0_ & ~0x00000001);
1106         } else {
1107           ensureAutoAllocatedNatIpsIsMutable();
1108           autoAllocatedNatIps_.addAll(other.autoAllocatedNatIps_);
1109         }
1110         onChanged();
1111       }
1112       if (!other.drainAutoAllocatedNatIps_.isEmpty()) {
1113         if (drainAutoAllocatedNatIps_.isEmpty()) {
1114           drainAutoAllocatedNatIps_ = other.drainAutoAllocatedNatIps_;
1115           bitField0_ = (bitField0_ & ~0x00000002);
1116         } else {
1117           ensureDrainAutoAllocatedNatIpsIsMutable();
1118           drainAutoAllocatedNatIps_.addAll(other.drainAutoAllocatedNatIps_);
1119         }
1120         onChanged();
1121       }
1122       if (!other.drainUserAllocatedNatIps_.isEmpty()) {
1123         if (drainUserAllocatedNatIps_.isEmpty()) {
1124           drainUserAllocatedNatIps_ = other.drainUserAllocatedNatIps_;
1125           bitField0_ = (bitField0_ & ~0x00000004);
1126         } else {
1127           ensureDrainUserAllocatedNatIpsIsMutable();
1128           drainUserAllocatedNatIps_.addAll(other.drainUserAllocatedNatIps_);
1129         }
1130         onChanged();
1131       }
1132       if (other.hasMinExtraNatIpsNeeded()) {
1133         setMinExtraNatIpsNeeded(other.getMinExtraNatIpsNeeded());
1134       }
1135       if (other.hasName()) {
1136         name_ = other.name_;
1137         bitField0_ |= 0x00000010;
1138         onChanged();
1139       }
1140       if (other.hasNumVmEndpointsWithNatMappings()) {
1141         setNumVmEndpointsWithNatMappings(other.getNumVmEndpointsWithNatMappings());
1142       }
1143       if (ruleStatusBuilder_ == null) {
1144         if (!other.ruleStatus_.isEmpty()) {
1145           if (ruleStatus_.isEmpty()) {
1146             ruleStatus_ = other.ruleStatus_;
1147             bitField0_ = (bitField0_ & ~0x00000040);
1148           } else {
1149             ensureRuleStatusIsMutable();
1150             ruleStatus_.addAll(other.ruleStatus_);
1151           }
1152           onChanged();
1153         }
1154       } else {
1155         if (!other.ruleStatus_.isEmpty()) {
1156           if (ruleStatusBuilder_.isEmpty()) {
1157             ruleStatusBuilder_.dispose();
1158             ruleStatusBuilder_ = null;
1159             ruleStatus_ = other.ruleStatus_;
1160             bitField0_ = (bitField0_ & ~0x00000040);
1161             ruleStatusBuilder_ =
1162                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
1163                     ? getRuleStatusFieldBuilder()
1164                     : null;
1165           } else {
1166             ruleStatusBuilder_.addAllMessages(other.ruleStatus_);
1167           }
1168         }
1169       }
1170       if (!other.userAllocatedNatIpResources_.isEmpty()) {
1171         if (userAllocatedNatIpResources_.isEmpty()) {
1172           userAllocatedNatIpResources_ = other.userAllocatedNatIpResources_;
1173           bitField0_ = (bitField0_ & ~0x00000080);
1174         } else {
1175           ensureUserAllocatedNatIpResourcesIsMutable();
1176           userAllocatedNatIpResources_.addAll(other.userAllocatedNatIpResources_);
1177         }
1178         onChanged();
1179       }
1180       if (!other.userAllocatedNatIps_.isEmpty()) {
1181         if (userAllocatedNatIps_.isEmpty()) {
1182           userAllocatedNatIps_ = other.userAllocatedNatIps_;
1183           bitField0_ = (bitField0_ & ~0x00000100);
1184         } else {
1185           ensureUserAllocatedNatIpsIsMutable();
1186           userAllocatedNatIps_.addAll(other.userAllocatedNatIps_);
1187         }
1188         onChanged();
1189       }
1190       this.mergeUnknownFields(other.getUnknownFields());
1191       onChanged();
1192       return this;
1193     }
1194 
1195     @java.lang.Override
isInitialized()1196     public final boolean isInitialized() {
1197       return true;
1198     }
1199 
1200     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1201     public Builder mergeFrom(
1202         com.google.protobuf.CodedInputStream input,
1203         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1204         throws java.io.IOException {
1205       if (extensionRegistry == null) {
1206         throw new java.lang.NullPointerException();
1207       }
1208       try {
1209         boolean done = false;
1210         while (!done) {
1211           int tag = input.readTag();
1212           switch (tag) {
1213             case 0:
1214               done = true;
1215               break;
1216             case 26989658:
1217               {
1218                 name_ = input.readStringRequireUtf8();
1219                 bitField0_ |= 0x00000010;
1220                 break;
1221               } // case 26989658
1222             case 1121785002:
1223               {
1224                 com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus m =
1225                     input.readMessage(
1226                         com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus.parser(),
1227                         extensionRegistry);
1228                 if (ruleStatusBuilder_ == null) {
1229                   ensureRuleStatusIsMutable();
1230                   ruleStatus_.add(m);
1231                 } else {
1232                   ruleStatusBuilder_.addMessage(m);
1233                 }
1234                 break;
1235               } // case 1121785002
1236             case 1702209210:
1237               {
1238                 java.lang.String s = input.readStringRequireUtf8();
1239                 ensureUserAllocatedNatIpResourcesIsMutable();
1240                 userAllocatedNatIpResources_.add(s);
1241                 break;
1242               } // case 1702209210
1243             case -1852818870:
1244               {
1245                 java.lang.String s = input.readStringRequireUtf8();
1246                 ensureDrainUserAllocatedNatIpsIsMutable();
1247                 drainUserAllocatedNatIps_.add(s);
1248                 break;
1249               } // case -1852818870
1250             case -1821490838:
1251               {
1252                 java.lang.String s = input.readStringRequireUtf8();
1253                 ensureDrainAutoAllocatedNatIpsIsMutable();
1254                 drainAutoAllocatedNatIps_.add(s);
1255                 break;
1256               } // case -1821490838
1257             case -1368676592:
1258               {
1259                 minExtraNatIpsNeeded_ = input.readInt32();
1260                 bitField0_ |= 0x00000008;
1261                 break;
1262               } // case -1368676592
1263             case -239941358:
1264               {
1265                 java.lang.String s = input.readStringRequireUtf8();
1266                 ensureUserAllocatedNatIpsIsMutable();
1267                 userAllocatedNatIps_.add(s);
1268                 break;
1269               } // case -239941358
1270             case -208613326:
1271               {
1272                 java.lang.String s = input.readStringRequireUtf8();
1273                 ensureAutoAllocatedNatIpsIsMutable();
1274                 autoAllocatedNatIps_.add(s);
1275                 break;
1276               } // case -208613326
1277             case -196027552:
1278               {
1279                 numVmEndpointsWithNatMappings_ = input.readInt32();
1280                 bitField0_ |= 0x00000020;
1281                 break;
1282               } // case -196027552
1283             default:
1284               {
1285                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
1286                   done = true; // was an endgroup tag
1287                 }
1288                 break;
1289               } // default:
1290           } // switch (tag)
1291         } // while (!done)
1292       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
1293         throw e.unwrapIOException();
1294       } finally {
1295         onChanged();
1296       } // finally
1297       return this;
1298     }
1299 
1300     private int bitField0_;
1301 
1302     private com.google.protobuf.LazyStringList autoAllocatedNatIps_ =
1303         com.google.protobuf.LazyStringArrayList.EMPTY;
1304 
ensureAutoAllocatedNatIpsIsMutable()1305     private void ensureAutoAllocatedNatIpsIsMutable() {
1306       if (!((bitField0_ & 0x00000001) != 0)) {
1307         autoAllocatedNatIps_ = new com.google.protobuf.LazyStringArrayList(autoAllocatedNatIps_);
1308         bitField0_ |= 0x00000001;
1309       }
1310     }
1311     /**
1312      *
1313      *
1314      * <pre>
1315      * A list of IPs auto-allocated for NAT. Example: ["1.1.1.1", "129.2.16.89"]
1316      * </pre>
1317      *
1318      * <code>repeated string auto_allocated_nat_ips = 510794246;</code>
1319      *
1320      * @return A list containing the autoAllocatedNatIps.
1321      */
getAutoAllocatedNatIpsList()1322     public com.google.protobuf.ProtocolStringList getAutoAllocatedNatIpsList() {
1323       return autoAllocatedNatIps_.getUnmodifiableView();
1324     }
1325     /**
1326      *
1327      *
1328      * <pre>
1329      * A list of IPs auto-allocated for NAT. Example: ["1.1.1.1", "129.2.16.89"]
1330      * </pre>
1331      *
1332      * <code>repeated string auto_allocated_nat_ips = 510794246;</code>
1333      *
1334      * @return The count of autoAllocatedNatIps.
1335      */
getAutoAllocatedNatIpsCount()1336     public int getAutoAllocatedNatIpsCount() {
1337       return autoAllocatedNatIps_.size();
1338     }
1339     /**
1340      *
1341      *
1342      * <pre>
1343      * A list of IPs auto-allocated for NAT. Example: ["1.1.1.1", "129.2.16.89"]
1344      * </pre>
1345      *
1346      * <code>repeated string auto_allocated_nat_ips = 510794246;</code>
1347      *
1348      * @param index The index of the element to return.
1349      * @return The autoAllocatedNatIps at the given index.
1350      */
getAutoAllocatedNatIps(int index)1351     public java.lang.String getAutoAllocatedNatIps(int index) {
1352       return autoAllocatedNatIps_.get(index);
1353     }
1354     /**
1355      *
1356      *
1357      * <pre>
1358      * A list of IPs auto-allocated for NAT. Example: ["1.1.1.1", "129.2.16.89"]
1359      * </pre>
1360      *
1361      * <code>repeated string auto_allocated_nat_ips = 510794246;</code>
1362      *
1363      * @param index The index of the value to return.
1364      * @return The bytes of the autoAllocatedNatIps at the given index.
1365      */
getAutoAllocatedNatIpsBytes(int index)1366     public com.google.protobuf.ByteString getAutoAllocatedNatIpsBytes(int index) {
1367       return autoAllocatedNatIps_.getByteString(index);
1368     }
1369     /**
1370      *
1371      *
1372      * <pre>
1373      * A list of IPs auto-allocated for NAT. Example: ["1.1.1.1", "129.2.16.89"]
1374      * </pre>
1375      *
1376      * <code>repeated string auto_allocated_nat_ips = 510794246;</code>
1377      *
1378      * @param index The index to set the value at.
1379      * @param value The autoAllocatedNatIps to set.
1380      * @return This builder for chaining.
1381      */
setAutoAllocatedNatIps(int index, java.lang.String value)1382     public Builder setAutoAllocatedNatIps(int index, java.lang.String value) {
1383       if (value == null) {
1384         throw new NullPointerException();
1385       }
1386       ensureAutoAllocatedNatIpsIsMutable();
1387       autoAllocatedNatIps_.set(index, value);
1388       onChanged();
1389       return this;
1390     }
1391     /**
1392      *
1393      *
1394      * <pre>
1395      * A list of IPs auto-allocated for NAT. Example: ["1.1.1.1", "129.2.16.89"]
1396      * </pre>
1397      *
1398      * <code>repeated string auto_allocated_nat_ips = 510794246;</code>
1399      *
1400      * @param value The autoAllocatedNatIps to add.
1401      * @return This builder for chaining.
1402      */
addAutoAllocatedNatIps(java.lang.String value)1403     public Builder addAutoAllocatedNatIps(java.lang.String value) {
1404       if (value == null) {
1405         throw new NullPointerException();
1406       }
1407       ensureAutoAllocatedNatIpsIsMutable();
1408       autoAllocatedNatIps_.add(value);
1409       onChanged();
1410       return this;
1411     }
1412     /**
1413      *
1414      *
1415      * <pre>
1416      * A list of IPs auto-allocated for NAT. Example: ["1.1.1.1", "129.2.16.89"]
1417      * </pre>
1418      *
1419      * <code>repeated string auto_allocated_nat_ips = 510794246;</code>
1420      *
1421      * @param values The autoAllocatedNatIps to add.
1422      * @return This builder for chaining.
1423      */
addAllAutoAllocatedNatIps(java.lang.Iterable<java.lang.String> values)1424     public Builder addAllAutoAllocatedNatIps(java.lang.Iterable<java.lang.String> values) {
1425       ensureAutoAllocatedNatIpsIsMutable();
1426       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, autoAllocatedNatIps_);
1427       onChanged();
1428       return this;
1429     }
1430     /**
1431      *
1432      *
1433      * <pre>
1434      * A list of IPs auto-allocated for NAT. Example: ["1.1.1.1", "129.2.16.89"]
1435      * </pre>
1436      *
1437      * <code>repeated string auto_allocated_nat_ips = 510794246;</code>
1438      *
1439      * @return This builder for chaining.
1440      */
clearAutoAllocatedNatIps()1441     public Builder clearAutoAllocatedNatIps() {
1442       autoAllocatedNatIps_ = com.google.protobuf.LazyStringArrayList.EMPTY;
1443       bitField0_ = (bitField0_ & ~0x00000001);
1444       onChanged();
1445       return this;
1446     }
1447     /**
1448      *
1449      *
1450      * <pre>
1451      * A list of IPs auto-allocated for NAT. Example: ["1.1.1.1", "129.2.16.89"]
1452      * </pre>
1453      *
1454      * <code>repeated string auto_allocated_nat_ips = 510794246;</code>
1455      *
1456      * @param value The bytes of the autoAllocatedNatIps to add.
1457      * @return This builder for chaining.
1458      */
addAutoAllocatedNatIpsBytes(com.google.protobuf.ByteString value)1459     public Builder addAutoAllocatedNatIpsBytes(com.google.protobuf.ByteString value) {
1460       if (value == null) {
1461         throw new NullPointerException();
1462       }
1463       checkByteStringIsUtf8(value);
1464       ensureAutoAllocatedNatIpsIsMutable();
1465       autoAllocatedNatIps_.add(value);
1466       onChanged();
1467       return this;
1468     }
1469 
1470     private com.google.protobuf.LazyStringList drainAutoAllocatedNatIps_ =
1471         com.google.protobuf.LazyStringArrayList.EMPTY;
1472 
ensureDrainAutoAllocatedNatIpsIsMutable()1473     private void ensureDrainAutoAllocatedNatIpsIsMutable() {
1474       if (!((bitField0_ & 0x00000002) != 0)) {
1475         drainAutoAllocatedNatIps_ =
1476             new com.google.protobuf.LazyStringArrayList(drainAutoAllocatedNatIps_);
1477         bitField0_ |= 0x00000002;
1478       }
1479     }
1480     /**
1481      *
1482      *
1483      * <pre>
1484      * A list of IPs auto-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
1485      * </pre>
1486      *
1487      * <code>repeated string drain_auto_allocated_nat_ips = 309184557;</code>
1488      *
1489      * @return A list containing the drainAutoAllocatedNatIps.
1490      */
getDrainAutoAllocatedNatIpsList()1491     public com.google.protobuf.ProtocolStringList getDrainAutoAllocatedNatIpsList() {
1492       return drainAutoAllocatedNatIps_.getUnmodifiableView();
1493     }
1494     /**
1495      *
1496      *
1497      * <pre>
1498      * A list of IPs auto-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
1499      * </pre>
1500      *
1501      * <code>repeated string drain_auto_allocated_nat_ips = 309184557;</code>
1502      *
1503      * @return The count of drainAutoAllocatedNatIps.
1504      */
getDrainAutoAllocatedNatIpsCount()1505     public int getDrainAutoAllocatedNatIpsCount() {
1506       return drainAutoAllocatedNatIps_.size();
1507     }
1508     /**
1509      *
1510      *
1511      * <pre>
1512      * A list of IPs auto-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
1513      * </pre>
1514      *
1515      * <code>repeated string drain_auto_allocated_nat_ips = 309184557;</code>
1516      *
1517      * @param index The index of the element to return.
1518      * @return The drainAutoAllocatedNatIps at the given index.
1519      */
getDrainAutoAllocatedNatIps(int index)1520     public java.lang.String getDrainAutoAllocatedNatIps(int index) {
1521       return drainAutoAllocatedNatIps_.get(index);
1522     }
1523     /**
1524      *
1525      *
1526      * <pre>
1527      * A list of IPs auto-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
1528      * </pre>
1529      *
1530      * <code>repeated string drain_auto_allocated_nat_ips = 309184557;</code>
1531      *
1532      * @param index The index of the value to return.
1533      * @return The bytes of the drainAutoAllocatedNatIps at the given index.
1534      */
getDrainAutoAllocatedNatIpsBytes(int index)1535     public com.google.protobuf.ByteString getDrainAutoAllocatedNatIpsBytes(int index) {
1536       return drainAutoAllocatedNatIps_.getByteString(index);
1537     }
1538     /**
1539      *
1540      *
1541      * <pre>
1542      * A list of IPs auto-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
1543      * </pre>
1544      *
1545      * <code>repeated string drain_auto_allocated_nat_ips = 309184557;</code>
1546      *
1547      * @param index The index to set the value at.
1548      * @param value The drainAutoAllocatedNatIps to set.
1549      * @return This builder for chaining.
1550      */
setDrainAutoAllocatedNatIps(int index, java.lang.String value)1551     public Builder setDrainAutoAllocatedNatIps(int index, java.lang.String value) {
1552       if (value == null) {
1553         throw new NullPointerException();
1554       }
1555       ensureDrainAutoAllocatedNatIpsIsMutable();
1556       drainAutoAllocatedNatIps_.set(index, value);
1557       onChanged();
1558       return this;
1559     }
1560     /**
1561      *
1562      *
1563      * <pre>
1564      * A list of IPs auto-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
1565      * </pre>
1566      *
1567      * <code>repeated string drain_auto_allocated_nat_ips = 309184557;</code>
1568      *
1569      * @param value The drainAutoAllocatedNatIps to add.
1570      * @return This builder for chaining.
1571      */
addDrainAutoAllocatedNatIps(java.lang.String value)1572     public Builder addDrainAutoAllocatedNatIps(java.lang.String value) {
1573       if (value == null) {
1574         throw new NullPointerException();
1575       }
1576       ensureDrainAutoAllocatedNatIpsIsMutable();
1577       drainAutoAllocatedNatIps_.add(value);
1578       onChanged();
1579       return this;
1580     }
1581     /**
1582      *
1583      *
1584      * <pre>
1585      * A list of IPs auto-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
1586      * </pre>
1587      *
1588      * <code>repeated string drain_auto_allocated_nat_ips = 309184557;</code>
1589      *
1590      * @param values The drainAutoAllocatedNatIps to add.
1591      * @return This builder for chaining.
1592      */
addAllDrainAutoAllocatedNatIps(java.lang.Iterable<java.lang.String> values)1593     public Builder addAllDrainAutoAllocatedNatIps(java.lang.Iterable<java.lang.String> values) {
1594       ensureDrainAutoAllocatedNatIpsIsMutable();
1595       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, drainAutoAllocatedNatIps_);
1596       onChanged();
1597       return this;
1598     }
1599     /**
1600      *
1601      *
1602      * <pre>
1603      * A list of IPs auto-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
1604      * </pre>
1605      *
1606      * <code>repeated string drain_auto_allocated_nat_ips = 309184557;</code>
1607      *
1608      * @return This builder for chaining.
1609      */
clearDrainAutoAllocatedNatIps()1610     public Builder clearDrainAutoAllocatedNatIps() {
1611       drainAutoAllocatedNatIps_ = com.google.protobuf.LazyStringArrayList.EMPTY;
1612       bitField0_ = (bitField0_ & ~0x00000002);
1613       onChanged();
1614       return this;
1615     }
1616     /**
1617      *
1618      *
1619      * <pre>
1620      * A list of IPs auto-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
1621      * </pre>
1622      *
1623      * <code>repeated string drain_auto_allocated_nat_ips = 309184557;</code>
1624      *
1625      * @param value The bytes of the drainAutoAllocatedNatIps to add.
1626      * @return This builder for chaining.
1627      */
addDrainAutoAllocatedNatIpsBytes(com.google.protobuf.ByteString value)1628     public Builder addDrainAutoAllocatedNatIpsBytes(com.google.protobuf.ByteString value) {
1629       if (value == null) {
1630         throw new NullPointerException();
1631       }
1632       checkByteStringIsUtf8(value);
1633       ensureDrainAutoAllocatedNatIpsIsMutable();
1634       drainAutoAllocatedNatIps_.add(value);
1635       onChanged();
1636       return this;
1637     }
1638 
1639     private com.google.protobuf.LazyStringList drainUserAllocatedNatIps_ =
1640         com.google.protobuf.LazyStringArrayList.EMPTY;
1641 
ensureDrainUserAllocatedNatIpsIsMutable()1642     private void ensureDrainUserAllocatedNatIpsIsMutable() {
1643       if (!((bitField0_ & 0x00000004) != 0)) {
1644         drainUserAllocatedNatIps_ =
1645             new com.google.protobuf.LazyStringArrayList(drainUserAllocatedNatIps_);
1646         bitField0_ |= 0x00000004;
1647       }
1648     }
1649     /**
1650      *
1651      *
1652      * <pre>
1653      * A list of IPs user-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
1654      * </pre>
1655      *
1656      * <code>repeated string drain_user_allocated_nat_ips = 305268553;</code>
1657      *
1658      * @return A list containing the drainUserAllocatedNatIps.
1659      */
getDrainUserAllocatedNatIpsList()1660     public com.google.protobuf.ProtocolStringList getDrainUserAllocatedNatIpsList() {
1661       return drainUserAllocatedNatIps_.getUnmodifiableView();
1662     }
1663     /**
1664      *
1665      *
1666      * <pre>
1667      * A list of IPs user-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
1668      * </pre>
1669      *
1670      * <code>repeated string drain_user_allocated_nat_ips = 305268553;</code>
1671      *
1672      * @return The count of drainUserAllocatedNatIps.
1673      */
getDrainUserAllocatedNatIpsCount()1674     public int getDrainUserAllocatedNatIpsCount() {
1675       return drainUserAllocatedNatIps_.size();
1676     }
1677     /**
1678      *
1679      *
1680      * <pre>
1681      * A list of IPs user-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
1682      * </pre>
1683      *
1684      * <code>repeated string drain_user_allocated_nat_ips = 305268553;</code>
1685      *
1686      * @param index The index of the element to return.
1687      * @return The drainUserAllocatedNatIps at the given index.
1688      */
getDrainUserAllocatedNatIps(int index)1689     public java.lang.String getDrainUserAllocatedNatIps(int index) {
1690       return drainUserAllocatedNatIps_.get(index);
1691     }
1692     /**
1693      *
1694      *
1695      * <pre>
1696      * A list of IPs user-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
1697      * </pre>
1698      *
1699      * <code>repeated string drain_user_allocated_nat_ips = 305268553;</code>
1700      *
1701      * @param index The index of the value to return.
1702      * @return The bytes of the drainUserAllocatedNatIps at the given index.
1703      */
getDrainUserAllocatedNatIpsBytes(int index)1704     public com.google.protobuf.ByteString getDrainUserAllocatedNatIpsBytes(int index) {
1705       return drainUserAllocatedNatIps_.getByteString(index);
1706     }
1707     /**
1708      *
1709      *
1710      * <pre>
1711      * A list of IPs user-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
1712      * </pre>
1713      *
1714      * <code>repeated string drain_user_allocated_nat_ips = 305268553;</code>
1715      *
1716      * @param index The index to set the value at.
1717      * @param value The drainUserAllocatedNatIps to set.
1718      * @return This builder for chaining.
1719      */
setDrainUserAllocatedNatIps(int index, java.lang.String value)1720     public Builder setDrainUserAllocatedNatIps(int index, java.lang.String value) {
1721       if (value == null) {
1722         throw new NullPointerException();
1723       }
1724       ensureDrainUserAllocatedNatIpsIsMutable();
1725       drainUserAllocatedNatIps_.set(index, value);
1726       onChanged();
1727       return this;
1728     }
1729     /**
1730      *
1731      *
1732      * <pre>
1733      * A list of IPs user-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
1734      * </pre>
1735      *
1736      * <code>repeated string drain_user_allocated_nat_ips = 305268553;</code>
1737      *
1738      * @param value The drainUserAllocatedNatIps to add.
1739      * @return This builder for chaining.
1740      */
addDrainUserAllocatedNatIps(java.lang.String value)1741     public Builder addDrainUserAllocatedNatIps(java.lang.String value) {
1742       if (value == null) {
1743         throw new NullPointerException();
1744       }
1745       ensureDrainUserAllocatedNatIpsIsMutable();
1746       drainUserAllocatedNatIps_.add(value);
1747       onChanged();
1748       return this;
1749     }
1750     /**
1751      *
1752      *
1753      * <pre>
1754      * A list of IPs user-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
1755      * </pre>
1756      *
1757      * <code>repeated string drain_user_allocated_nat_ips = 305268553;</code>
1758      *
1759      * @param values The drainUserAllocatedNatIps to add.
1760      * @return This builder for chaining.
1761      */
addAllDrainUserAllocatedNatIps(java.lang.Iterable<java.lang.String> values)1762     public Builder addAllDrainUserAllocatedNatIps(java.lang.Iterable<java.lang.String> values) {
1763       ensureDrainUserAllocatedNatIpsIsMutable();
1764       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, drainUserAllocatedNatIps_);
1765       onChanged();
1766       return this;
1767     }
1768     /**
1769      *
1770      *
1771      * <pre>
1772      * A list of IPs user-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
1773      * </pre>
1774      *
1775      * <code>repeated string drain_user_allocated_nat_ips = 305268553;</code>
1776      *
1777      * @return This builder for chaining.
1778      */
clearDrainUserAllocatedNatIps()1779     public Builder clearDrainUserAllocatedNatIps() {
1780       drainUserAllocatedNatIps_ = com.google.protobuf.LazyStringArrayList.EMPTY;
1781       bitField0_ = (bitField0_ & ~0x00000004);
1782       onChanged();
1783       return this;
1784     }
1785     /**
1786      *
1787      *
1788      * <pre>
1789      * A list of IPs user-allocated for NAT that are in drain mode. Example: ["1.1.1.1", "179.12.26.133"].
1790      * </pre>
1791      *
1792      * <code>repeated string drain_user_allocated_nat_ips = 305268553;</code>
1793      *
1794      * @param value The bytes of the drainUserAllocatedNatIps to add.
1795      * @return This builder for chaining.
1796      */
addDrainUserAllocatedNatIpsBytes(com.google.protobuf.ByteString value)1797     public Builder addDrainUserAllocatedNatIpsBytes(com.google.protobuf.ByteString value) {
1798       if (value == null) {
1799         throw new NullPointerException();
1800       }
1801       checkByteStringIsUtf8(value);
1802       ensureDrainUserAllocatedNatIpsIsMutable();
1803       drainUserAllocatedNatIps_.add(value);
1804       onChanged();
1805       return this;
1806     }
1807 
1808     private int minExtraNatIpsNeeded_;
1809     /**
1810      *
1811      *
1812      * <pre>
1813      * The number of extra IPs to allocate. This will be greater than 0 only if user-specified IPs are NOT enough to allow all configured VMs to use NAT. This value is meaningful only when auto-allocation of NAT IPs is *not* used.
1814      * </pre>
1815      *
1816      * <code>optional int32 min_extra_nat_ips_needed = 365786338;</code>
1817      *
1818      * @return Whether the minExtraNatIpsNeeded field is set.
1819      */
1820     @java.lang.Override
hasMinExtraNatIpsNeeded()1821     public boolean hasMinExtraNatIpsNeeded() {
1822       return ((bitField0_ & 0x00000008) != 0);
1823     }
1824     /**
1825      *
1826      *
1827      * <pre>
1828      * The number of extra IPs to allocate. This will be greater than 0 only if user-specified IPs are NOT enough to allow all configured VMs to use NAT. This value is meaningful only when auto-allocation of NAT IPs is *not* used.
1829      * </pre>
1830      *
1831      * <code>optional int32 min_extra_nat_ips_needed = 365786338;</code>
1832      *
1833      * @return The minExtraNatIpsNeeded.
1834      */
1835     @java.lang.Override
getMinExtraNatIpsNeeded()1836     public int getMinExtraNatIpsNeeded() {
1837       return minExtraNatIpsNeeded_;
1838     }
1839     /**
1840      *
1841      *
1842      * <pre>
1843      * The number of extra IPs to allocate. This will be greater than 0 only if user-specified IPs are NOT enough to allow all configured VMs to use NAT. This value is meaningful only when auto-allocation of NAT IPs is *not* used.
1844      * </pre>
1845      *
1846      * <code>optional int32 min_extra_nat_ips_needed = 365786338;</code>
1847      *
1848      * @param value The minExtraNatIpsNeeded to set.
1849      * @return This builder for chaining.
1850      */
setMinExtraNatIpsNeeded(int value)1851     public Builder setMinExtraNatIpsNeeded(int value) {
1852 
1853       minExtraNatIpsNeeded_ = value;
1854       bitField0_ |= 0x00000008;
1855       onChanged();
1856       return this;
1857     }
1858     /**
1859      *
1860      *
1861      * <pre>
1862      * The number of extra IPs to allocate. This will be greater than 0 only if user-specified IPs are NOT enough to allow all configured VMs to use NAT. This value is meaningful only when auto-allocation of NAT IPs is *not* used.
1863      * </pre>
1864      *
1865      * <code>optional int32 min_extra_nat_ips_needed = 365786338;</code>
1866      *
1867      * @return This builder for chaining.
1868      */
clearMinExtraNatIpsNeeded()1869     public Builder clearMinExtraNatIpsNeeded() {
1870       bitField0_ = (bitField0_ & ~0x00000008);
1871       minExtraNatIpsNeeded_ = 0;
1872       onChanged();
1873       return this;
1874     }
1875 
1876     private java.lang.Object name_ = "";
1877     /**
1878      *
1879      *
1880      * <pre>
1881      * Unique name of this NAT.
1882      * </pre>
1883      *
1884      * <code>optional string name = 3373707;</code>
1885      *
1886      * @return Whether the name field is set.
1887      */
hasName()1888     public boolean hasName() {
1889       return ((bitField0_ & 0x00000010) != 0);
1890     }
1891     /**
1892      *
1893      *
1894      * <pre>
1895      * Unique name of this NAT.
1896      * </pre>
1897      *
1898      * <code>optional string name = 3373707;</code>
1899      *
1900      * @return The name.
1901      */
getName()1902     public java.lang.String getName() {
1903       java.lang.Object ref = name_;
1904       if (!(ref instanceof java.lang.String)) {
1905         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1906         java.lang.String s = bs.toStringUtf8();
1907         name_ = s;
1908         return s;
1909       } else {
1910         return (java.lang.String) ref;
1911       }
1912     }
1913     /**
1914      *
1915      *
1916      * <pre>
1917      * Unique name of this NAT.
1918      * </pre>
1919      *
1920      * <code>optional string name = 3373707;</code>
1921      *
1922      * @return The bytes for name.
1923      */
getNameBytes()1924     public com.google.protobuf.ByteString getNameBytes() {
1925       java.lang.Object ref = name_;
1926       if (ref instanceof String) {
1927         com.google.protobuf.ByteString b =
1928             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1929         name_ = b;
1930         return b;
1931       } else {
1932         return (com.google.protobuf.ByteString) ref;
1933       }
1934     }
1935     /**
1936      *
1937      *
1938      * <pre>
1939      * Unique name of this NAT.
1940      * </pre>
1941      *
1942      * <code>optional string name = 3373707;</code>
1943      *
1944      * @param value The name to set.
1945      * @return This builder for chaining.
1946      */
setName(java.lang.String value)1947     public Builder setName(java.lang.String value) {
1948       if (value == null) {
1949         throw new NullPointerException();
1950       }
1951       name_ = value;
1952       bitField0_ |= 0x00000010;
1953       onChanged();
1954       return this;
1955     }
1956     /**
1957      *
1958      *
1959      * <pre>
1960      * Unique name of this NAT.
1961      * </pre>
1962      *
1963      * <code>optional string name = 3373707;</code>
1964      *
1965      * @return This builder for chaining.
1966      */
clearName()1967     public Builder clearName() {
1968       name_ = getDefaultInstance().getName();
1969       bitField0_ = (bitField0_ & ~0x00000010);
1970       onChanged();
1971       return this;
1972     }
1973     /**
1974      *
1975      *
1976      * <pre>
1977      * Unique name of this NAT.
1978      * </pre>
1979      *
1980      * <code>optional string name = 3373707;</code>
1981      *
1982      * @param value The bytes for name to set.
1983      * @return This builder for chaining.
1984      */
setNameBytes(com.google.protobuf.ByteString value)1985     public Builder setNameBytes(com.google.protobuf.ByteString value) {
1986       if (value == null) {
1987         throw new NullPointerException();
1988       }
1989       checkByteStringIsUtf8(value);
1990       name_ = value;
1991       bitField0_ |= 0x00000010;
1992       onChanged();
1993       return this;
1994     }
1995 
1996     private int numVmEndpointsWithNatMappings_;
1997     /**
1998      *
1999      *
2000      * <pre>
2001      * Number of VM endpoints (i.e., Nics) that can use NAT.
2002      * </pre>
2003      *
2004      * <code>optional int32 num_vm_endpoints_with_nat_mappings = 512367468;</code>
2005      *
2006      * @return Whether the numVmEndpointsWithNatMappings field is set.
2007      */
2008     @java.lang.Override
hasNumVmEndpointsWithNatMappings()2009     public boolean hasNumVmEndpointsWithNatMappings() {
2010       return ((bitField0_ & 0x00000020) != 0);
2011     }
2012     /**
2013      *
2014      *
2015      * <pre>
2016      * Number of VM endpoints (i.e., Nics) that can use NAT.
2017      * </pre>
2018      *
2019      * <code>optional int32 num_vm_endpoints_with_nat_mappings = 512367468;</code>
2020      *
2021      * @return The numVmEndpointsWithNatMappings.
2022      */
2023     @java.lang.Override
getNumVmEndpointsWithNatMappings()2024     public int getNumVmEndpointsWithNatMappings() {
2025       return numVmEndpointsWithNatMappings_;
2026     }
2027     /**
2028      *
2029      *
2030      * <pre>
2031      * Number of VM endpoints (i.e., Nics) that can use NAT.
2032      * </pre>
2033      *
2034      * <code>optional int32 num_vm_endpoints_with_nat_mappings = 512367468;</code>
2035      *
2036      * @param value The numVmEndpointsWithNatMappings to set.
2037      * @return This builder for chaining.
2038      */
setNumVmEndpointsWithNatMappings(int value)2039     public Builder setNumVmEndpointsWithNatMappings(int value) {
2040 
2041       numVmEndpointsWithNatMappings_ = value;
2042       bitField0_ |= 0x00000020;
2043       onChanged();
2044       return this;
2045     }
2046     /**
2047      *
2048      *
2049      * <pre>
2050      * Number of VM endpoints (i.e., Nics) that can use NAT.
2051      * </pre>
2052      *
2053      * <code>optional int32 num_vm_endpoints_with_nat_mappings = 512367468;</code>
2054      *
2055      * @return This builder for chaining.
2056      */
clearNumVmEndpointsWithNatMappings()2057     public Builder clearNumVmEndpointsWithNatMappings() {
2058       bitField0_ = (bitField0_ & ~0x00000020);
2059       numVmEndpointsWithNatMappings_ = 0;
2060       onChanged();
2061       return this;
2062     }
2063 
2064     private java.util.List<com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus>
2065         ruleStatus_ = java.util.Collections.emptyList();
2066 
ensureRuleStatusIsMutable()2067     private void ensureRuleStatusIsMutable() {
2068       if (!((bitField0_ & 0x00000040) != 0)) {
2069         ruleStatus_ =
2070             new java.util.ArrayList<com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus>(
2071                 ruleStatus_);
2072         bitField0_ |= 0x00000040;
2073       }
2074     }
2075 
2076     private com.google.protobuf.RepeatedFieldBuilderV3<
2077             com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus,
2078             com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus.Builder,
2079             com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatusOrBuilder>
2080         ruleStatusBuilder_;
2081 
2082     /**
2083      *
2084      *
2085      * <pre>
2086      * Status of rules in this NAT.
2087      * </pre>
2088      *
2089      * <code>
2090      * repeated .google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus rule_status = 140223125;
2091      * </code>
2092      */
2093     public java.util.List<com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus>
getRuleStatusList()2094         getRuleStatusList() {
2095       if (ruleStatusBuilder_ == null) {
2096         return java.util.Collections.unmodifiableList(ruleStatus_);
2097       } else {
2098         return ruleStatusBuilder_.getMessageList();
2099       }
2100     }
2101     /**
2102      *
2103      *
2104      * <pre>
2105      * Status of rules in this NAT.
2106      * </pre>
2107      *
2108      * <code>
2109      * repeated .google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus rule_status = 140223125;
2110      * </code>
2111      */
getRuleStatusCount()2112     public int getRuleStatusCount() {
2113       if (ruleStatusBuilder_ == null) {
2114         return ruleStatus_.size();
2115       } else {
2116         return ruleStatusBuilder_.getCount();
2117       }
2118     }
2119     /**
2120      *
2121      *
2122      * <pre>
2123      * Status of rules in this NAT.
2124      * </pre>
2125      *
2126      * <code>
2127      * repeated .google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus rule_status = 140223125;
2128      * </code>
2129      */
getRuleStatus(int index)2130     public com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus getRuleStatus(int index) {
2131       if (ruleStatusBuilder_ == null) {
2132         return ruleStatus_.get(index);
2133       } else {
2134         return ruleStatusBuilder_.getMessage(index);
2135       }
2136     }
2137     /**
2138      *
2139      *
2140      * <pre>
2141      * Status of rules in this NAT.
2142      * </pre>
2143      *
2144      * <code>
2145      * repeated .google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus rule_status = 140223125;
2146      * </code>
2147      */
setRuleStatus( int index, com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus value)2148     public Builder setRuleStatus(
2149         int index, com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus value) {
2150       if (ruleStatusBuilder_ == null) {
2151         if (value == null) {
2152           throw new NullPointerException();
2153         }
2154         ensureRuleStatusIsMutable();
2155         ruleStatus_.set(index, value);
2156         onChanged();
2157       } else {
2158         ruleStatusBuilder_.setMessage(index, value);
2159       }
2160       return this;
2161     }
2162     /**
2163      *
2164      *
2165      * <pre>
2166      * Status of rules in this NAT.
2167      * </pre>
2168      *
2169      * <code>
2170      * repeated .google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus rule_status = 140223125;
2171      * </code>
2172      */
setRuleStatus( int index, com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus.Builder builderForValue)2173     public Builder setRuleStatus(
2174         int index,
2175         com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus.Builder builderForValue) {
2176       if (ruleStatusBuilder_ == null) {
2177         ensureRuleStatusIsMutable();
2178         ruleStatus_.set(index, builderForValue.build());
2179         onChanged();
2180       } else {
2181         ruleStatusBuilder_.setMessage(index, builderForValue.build());
2182       }
2183       return this;
2184     }
2185     /**
2186      *
2187      *
2188      * <pre>
2189      * Status of rules in this NAT.
2190      * </pre>
2191      *
2192      * <code>
2193      * repeated .google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus rule_status = 140223125;
2194      * </code>
2195      */
addRuleStatus( com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus value)2196     public Builder addRuleStatus(
2197         com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus value) {
2198       if (ruleStatusBuilder_ == null) {
2199         if (value == null) {
2200           throw new NullPointerException();
2201         }
2202         ensureRuleStatusIsMutable();
2203         ruleStatus_.add(value);
2204         onChanged();
2205       } else {
2206         ruleStatusBuilder_.addMessage(value);
2207       }
2208       return this;
2209     }
2210     /**
2211      *
2212      *
2213      * <pre>
2214      * Status of rules in this NAT.
2215      * </pre>
2216      *
2217      * <code>
2218      * repeated .google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus rule_status = 140223125;
2219      * </code>
2220      */
addRuleStatus( int index, com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus value)2221     public Builder addRuleStatus(
2222         int index, com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus value) {
2223       if (ruleStatusBuilder_ == null) {
2224         if (value == null) {
2225           throw new NullPointerException();
2226         }
2227         ensureRuleStatusIsMutable();
2228         ruleStatus_.add(index, value);
2229         onChanged();
2230       } else {
2231         ruleStatusBuilder_.addMessage(index, value);
2232       }
2233       return this;
2234     }
2235     /**
2236      *
2237      *
2238      * <pre>
2239      * Status of rules in this NAT.
2240      * </pre>
2241      *
2242      * <code>
2243      * repeated .google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus rule_status = 140223125;
2244      * </code>
2245      */
addRuleStatus( com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus.Builder builderForValue)2246     public Builder addRuleStatus(
2247         com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus.Builder builderForValue) {
2248       if (ruleStatusBuilder_ == null) {
2249         ensureRuleStatusIsMutable();
2250         ruleStatus_.add(builderForValue.build());
2251         onChanged();
2252       } else {
2253         ruleStatusBuilder_.addMessage(builderForValue.build());
2254       }
2255       return this;
2256     }
2257     /**
2258      *
2259      *
2260      * <pre>
2261      * Status of rules in this NAT.
2262      * </pre>
2263      *
2264      * <code>
2265      * repeated .google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus rule_status = 140223125;
2266      * </code>
2267      */
addRuleStatus( int index, com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus.Builder builderForValue)2268     public Builder addRuleStatus(
2269         int index,
2270         com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus.Builder builderForValue) {
2271       if (ruleStatusBuilder_ == null) {
2272         ensureRuleStatusIsMutable();
2273         ruleStatus_.add(index, builderForValue.build());
2274         onChanged();
2275       } else {
2276         ruleStatusBuilder_.addMessage(index, builderForValue.build());
2277       }
2278       return this;
2279     }
2280     /**
2281      *
2282      *
2283      * <pre>
2284      * Status of rules in this NAT.
2285      * </pre>
2286      *
2287      * <code>
2288      * repeated .google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus rule_status = 140223125;
2289      * </code>
2290      */
addAllRuleStatus( java.lang.Iterable<? extends com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus> values)2291     public Builder addAllRuleStatus(
2292         java.lang.Iterable<? extends com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus>
2293             values) {
2294       if (ruleStatusBuilder_ == null) {
2295         ensureRuleStatusIsMutable();
2296         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ruleStatus_);
2297         onChanged();
2298       } else {
2299         ruleStatusBuilder_.addAllMessages(values);
2300       }
2301       return this;
2302     }
2303     /**
2304      *
2305      *
2306      * <pre>
2307      * Status of rules in this NAT.
2308      * </pre>
2309      *
2310      * <code>
2311      * repeated .google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus rule_status = 140223125;
2312      * </code>
2313      */
clearRuleStatus()2314     public Builder clearRuleStatus() {
2315       if (ruleStatusBuilder_ == null) {
2316         ruleStatus_ = java.util.Collections.emptyList();
2317         bitField0_ = (bitField0_ & ~0x00000040);
2318         onChanged();
2319       } else {
2320         ruleStatusBuilder_.clear();
2321       }
2322       return this;
2323     }
2324     /**
2325      *
2326      *
2327      * <pre>
2328      * Status of rules in this NAT.
2329      * </pre>
2330      *
2331      * <code>
2332      * repeated .google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus rule_status = 140223125;
2333      * </code>
2334      */
removeRuleStatus(int index)2335     public Builder removeRuleStatus(int index) {
2336       if (ruleStatusBuilder_ == null) {
2337         ensureRuleStatusIsMutable();
2338         ruleStatus_.remove(index);
2339         onChanged();
2340       } else {
2341         ruleStatusBuilder_.remove(index);
2342       }
2343       return this;
2344     }
2345     /**
2346      *
2347      *
2348      * <pre>
2349      * Status of rules in this NAT.
2350      * </pre>
2351      *
2352      * <code>
2353      * repeated .google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus rule_status = 140223125;
2354      * </code>
2355      */
2356     public com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus.Builder
getRuleStatusBuilder(int index)2357         getRuleStatusBuilder(int index) {
2358       return getRuleStatusFieldBuilder().getBuilder(index);
2359     }
2360     /**
2361      *
2362      *
2363      * <pre>
2364      * Status of rules in this NAT.
2365      * </pre>
2366      *
2367      * <code>
2368      * repeated .google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus rule_status = 140223125;
2369      * </code>
2370      */
2371     public com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatusOrBuilder
getRuleStatusOrBuilder(int index)2372         getRuleStatusOrBuilder(int index) {
2373       if (ruleStatusBuilder_ == null) {
2374         return ruleStatus_.get(index);
2375       } else {
2376         return ruleStatusBuilder_.getMessageOrBuilder(index);
2377       }
2378     }
2379     /**
2380      *
2381      *
2382      * <pre>
2383      * Status of rules in this NAT.
2384      * </pre>
2385      *
2386      * <code>
2387      * repeated .google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus rule_status = 140223125;
2388      * </code>
2389      */
2390     public java.util.List<
2391             ? extends com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatusOrBuilder>
getRuleStatusOrBuilderList()2392         getRuleStatusOrBuilderList() {
2393       if (ruleStatusBuilder_ != null) {
2394         return ruleStatusBuilder_.getMessageOrBuilderList();
2395       } else {
2396         return java.util.Collections.unmodifiableList(ruleStatus_);
2397       }
2398     }
2399     /**
2400      *
2401      *
2402      * <pre>
2403      * Status of rules in this NAT.
2404      * </pre>
2405      *
2406      * <code>
2407      * repeated .google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus rule_status = 140223125;
2408      * </code>
2409      */
2410     public com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus.Builder
addRuleStatusBuilder()2411         addRuleStatusBuilder() {
2412       return getRuleStatusFieldBuilder()
2413           .addBuilder(
2414               com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus.getDefaultInstance());
2415     }
2416     /**
2417      *
2418      *
2419      * <pre>
2420      * Status of rules in this NAT.
2421      * </pre>
2422      *
2423      * <code>
2424      * repeated .google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus rule_status = 140223125;
2425      * </code>
2426      */
2427     public com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus.Builder
addRuleStatusBuilder(int index)2428         addRuleStatusBuilder(int index) {
2429       return getRuleStatusFieldBuilder()
2430           .addBuilder(
2431               index,
2432               com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus.getDefaultInstance());
2433     }
2434     /**
2435      *
2436      *
2437      * <pre>
2438      * Status of rules in this NAT.
2439      * </pre>
2440      *
2441      * <code>
2442      * repeated .google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus rule_status = 140223125;
2443      * </code>
2444      */
2445     public java.util.List<com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus.Builder>
getRuleStatusBuilderList()2446         getRuleStatusBuilderList() {
2447       return getRuleStatusFieldBuilder().getBuilderList();
2448     }
2449 
2450     private com.google.protobuf.RepeatedFieldBuilderV3<
2451             com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus,
2452             com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus.Builder,
2453             com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatusOrBuilder>
getRuleStatusFieldBuilder()2454         getRuleStatusFieldBuilder() {
2455       if (ruleStatusBuilder_ == null) {
2456         ruleStatusBuilder_ =
2457             new com.google.protobuf.RepeatedFieldBuilderV3<
2458                 com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus,
2459                 com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatus.Builder,
2460                 com.google.cloud.compute.v1.RouterStatusNatStatusNatRuleStatusOrBuilder>(
2461                 ruleStatus_, ((bitField0_ & 0x00000040) != 0), getParentForChildren(), isClean());
2462         ruleStatus_ = null;
2463       }
2464       return ruleStatusBuilder_;
2465     }
2466 
2467     private com.google.protobuf.LazyStringList userAllocatedNatIpResources_ =
2468         com.google.protobuf.LazyStringArrayList.EMPTY;
2469 
ensureUserAllocatedNatIpResourcesIsMutable()2470     private void ensureUserAllocatedNatIpResourcesIsMutable() {
2471       if (!((bitField0_ & 0x00000080) != 0)) {
2472         userAllocatedNatIpResources_ =
2473             new com.google.protobuf.LazyStringArrayList(userAllocatedNatIpResources_);
2474         bitField0_ |= 0x00000080;
2475       }
2476     }
2477     /**
2478      *
2479      *
2480      * <pre>
2481      * A list of fully qualified URLs of reserved IP address resources.
2482      * </pre>
2483      *
2484      * <code>repeated string user_allocated_nat_ip_resources = 212776151;</code>
2485      *
2486      * @return A list containing the userAllocatedNatIpResources.
2487      */
getUserAllocatedNatIpResourcesList()2488     public com.google.protobuf.ProtocolStringList getUserAllocatedNatIpResourcesList() {
2489       return userAllocatedNatIpResources_.getUnmodifiableView();
2490     }
2491     /**
2492      *
2493      *
2494      * <pre>
2495      * A list of fully qualified URLs of reserved IP address resources.
2496      * </pre>
2497      *
2498      * <code>repeated string user_allocated_nat_ip_resources = 212776151;</code>
2499      *
2500      * @return The count of userAllocatedNatIpResources.
2501      */
getUserAllocatedNatIpResourcesCount()2502     public int getUserAllocatedNatIpResourcesCount() {
2503       return userAllocatedNatIpResources_.size();
2504     }
2505     /**
2506      *
2507      *
2508      * <pre>
2509      * A list of fully qualified URLs of reserved IP address resources.
2510      * </pre>
2511      *
2512      * <code>repeated string user_allocated_nat_ip_resources = 212776151;</code>
2513      *
2514      * @param index The index of the element to return.
2515      * @return The userAllocatedNatIpResources at the given index.
2516      */
getUserAllocatedNatIpResources(int index)2517     public java.lang.String getUserAllocatedNatIpResources(int index) {
2518       return userAllocatedNatIpResources_.get(index);
2519     }
2520     /**
2521      *
2522      *
2523      * <pre>
2524      * A list of fully qualified URLs of reserved IP address resources.
2525      * </pre>
2526      *
2527      * <code>repeated string user_allocated_nat_ip_resources = 212776151;</code>
2528      *
2529      * @param index The index of the value to return.
2530      * @return The bytes of the userAllocatedNatIpResources at the given index.
2531      */
getUserAllocatedNatIpResourcesBytes(int index)2532     public com.google.protobuf.ByteString getUserAllocatedNatIpResourcesBytes(int index) {
2533       return userAllocatedNatIpResources_.getByteString(index);
2534     }
2535     /**
2536      *
2537      *
2538      * <pre>
2539      * A list of fully qualified URLs of reserved IP address resources.
2540      * </pre>
2541      *
2542      * <code>repeated string user_allocated_nat_ip_resources = 212776151;</code>
2543      *
2544      * @param index The index to set the value at.
2545      * @param value The userAllocatedNatIpResources to set.
2546      * @return This builder for chaining.
2547      */
setUserAllocatedNatIpResources(int index, java.lang.String value)2548     public Builder setUserAllocatedNatIpResources(int index, java.lang.String value) {
2549       if (value == null) {
2550         throw new NullPointerException();
2551       }
2552       ensureUserAllocatedNatIpResourcesIsMutable();
2553       userAllocatedNatIpResources_.set(index, value);
2554       onChanged();
2555       return this;
2556     }
2557     /**
2558      *
2559      *
2560      * <pre>
2561      * A list of fully qualified URLs of reserved IP address resources.
2562      * </pre>
2563      *
2564      * <code>repeated string user_allocated_nat_ip_resources = 212776151;</code>
2565      *
2566      * @param value The userAllocatedNatIpResources to add.
2567      * @return This builder for chaining.
2568      */
addUserAllocatedNatIpResources(java.lang.String value)2569     public Builder addUserAllocatedNatIpResources(java.lang.String value) {
2570       if (value == null) {
2571         throw new NullPointerException();
2572       }
2573       ensureUserAllocatedNatIpResourcesIsMutable();
2574       userAllocatedNatIpResources_.add(value);
2575       onChanged();
2576       return this;
2577     }
2578     /**
2579      *
2580      *
2581      * <pre>
2582      * A list of fully qualified URLs of reserved IP address resources.
2583      * </pre>
2584      *
2585      * <code>repeated string user_allocated_nat_ip_resources = 212776151;</code>
2586      *
2587      * @param values The userAllocatedNatIpResources to add.
2588      * @return This builder for chaining.
2589      */
addAllUserAllocatedNatIpResources(java.lang.Iterable<java.lang.String> values)2590     public Builder addAllUserAllocatedNatIpResources(java.lang.Iterable<java.lang.String> values) {
2591       ensureUserAllocatedNatIpResourcesIsMutable();
2592       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, userAllocatedNatIpResources_);
2593       onChanged();
2594       return this;
2595     }
2596     /**
2597      *
2598      *
2599      * <pre>
2600      * A list of fully qualified URLs of reserved IP address resources.
2601      * </pre>
2602      *
2603      * <code>repeated string user_allocated_nat_ip_resources = 212776151;</code>
2604      *
2605      * @return This builder for chaining.
2606      */
clearUserAllocatedNatIpResources()2607     public Builder clearUserAllocatedNatIpResources() {
2608       userAllocatedNatIpResources_ = com.google.protobuf.LazyStringArrayList.EMPTY;
2609       bitField0_ = (bitField0_ & ~0x00000080);
2610       onChanged();
2611       return this;
2612     }
2613     /**
2614      *
2615      *
2616      * <pre>
2617      * A list of fully qualified URLs of reserved IP address resources.
2618      * </pre>
2619      *
2620      * <code>repeated string user_allocated_nat_ip_resources = 212776151;</code>
2621      *
2622      * @param value The bytes of the userAllocatedNatIpResources to add.
2623      * @return This builder for chaining.
2624      */
addUserAllocatedNatIpResourcesBytes(com.google.protobuf.ByteString value)2625     public Builder addUserAllocatedNatIpResourcesBytes(com.google.protobuf.ByteString value) {
2626       if (value == null) {
2627         throw new NullPointerException();
2628       }
2629       checkByteStringIsUtf8(value);
2630       ensureUserAllocatedNatIpResourcesIsMutable();
2631       userAllocatedNatIpResources_.add(value);
2632       onChanged();
2633       return this;
2634     }
2635 
2636     private com.google.protobuf.LazyStringList userAllocatedNatIps_ =
2637         com.google.protobuf.LazyStringArrayList.EMPTY;
2638 
ensureUserAllocatedNatIpsIsMutable()2639     private void ensureUserAllocatedNatIpsIsMutable() {
2640       if (!((bitField0_ & 0x00000100) != 0)) {
2641         userAllocatedNatIps_ = new com.google.protobuf.LazyStringArrayList(userAllocatedNatIps_);
2642         bitField0_ |= 0x00000100;
2643       }
2644     }
2645     /**
2646      *
2647      *
2648      * <pre>
2649      * A list of IPs user-allocated for NAT. They will be raw IP strings like "179.12.26.133".
2650      * </pre>
2651      *
2652      * <code>repeated string user_allocated_nat_ips = 506878242;</code>
2653      *
2654      * @return A list containing the userAllocatedNatIps.
2655      */
getUserAllocatedNatIpsList()2656     public com.google.protobuf.ProtocolStringList getUserAllocatedNatIpsList() {
2657       return userAllocatedNatIps_.getUnmodifiableView();
2658     }
2659     /**
2660      *
2661      *
2662      * <pre>
2663      * A list of IPs user-allocated for NAT. They will be raw IP strings like "179.12.26.133".
2664      * </pre>
2665      *
2666      * <code>repeated string user_allocated_nat_ips = 506878242;</code>
2667      *
2668      * @return The count of userAllocatedNatIps.
2669      */
getUserAllocatedNatIpsCount()2670     public int getUserAllocatedNatIpsCount() {
2671       return userAllocatedNatIps_.size();
2672     }
2673     /**
2674      *
2675      *
2676      * <pre>
2677      * A list of IPs user-allocated for NAT. They will be raw IP strings like "179.12.26.133".
2678      * </pre>
2679      *
2680      * <code>repeated string user_allocated_nat_ips = 506878242;</code>
2681      *
2682      * @param index The index of the element to return.
2683      * @return The userAllocatedNatIps at the given index.
2684      */
getUserAllocatedNatIps(int index)2685     public java.lang.String getUserAllocatedNatIps(int index) {
2686       return userAllocatedNatIps_.get(index);
2687     }
2688     /**
2689      *
2690      *
2691      * <pre>
2692      * A list of IPs user-allocated for NAT. They will be raw IP strings like "179.12.26.133".
2693      * </pre>
2694      *
2695      * <code>repeated string user_allocated_nat_ips = 506878242;</code>
2696      *
2697      * @param index The index of the value to return.
2698      * @return The bytes of the userAllocatedNatIps at the given index.
2699      */
getUserAllocatedNatIpsBytes(int index)2700     public com.google.protobuf.ByteString getUserAllocatedNatIpsBytes(int index) {
2701       return userAllocatedNatIps_.getByteString(index);
2702     }
2703     /**
2704      *
2705      *
2706      * <pre>
2707      * A list of IPs user-allocated for NAT. They will be raw IP strings like "179.12.26.133".
2708      * </pre>
2709      *
2710      * <code>repeated string user_allocated_nat_ips = 506878242;</code>
2711      *
2712      * @param index The index to set the value at.
2713      * @param value The userAllocatedNatIps to set.
2714      * @return This builder for chaining.
2715      */
setUserAllocatedNatIps(int index, java.lang.String value)2716     public Builder setUserAllocatedNatIps(int index, java.lang.String value) {
2717       if (value == null) {
2718         throw new NullPointerException();
2719       }
2720       ensureUserAllocatedNatIpsIsMutable();
2721       userAllocatedNatIps_.set(index, value);
2722       onChanged();
2723       return this;
2724     }
2725     /**
2726      *
2727      *
2728      * <pre>
2729      * A list of IPs user-allocated for NAT. They will be raw IP strings like "179.12.26.133".
2730      * </pre>
2731      *
2732      * <code>repeated string user_allocated_nat_ips = 506878242;</code>
2733      *
2734      * @param value The userAllocatedNatIps to add.
2735      * @return This builder for chaining.
2736      */
addUserAllocatedNatIps(java.lang.String value)2737     public Builder addUserAllocatedNatIps(java.lang.String value) {
2738       if (value == null) {
2739         throw new NullPointerException();
2740       }
2741       ensureUserAllocatedNatIpsIsMutable();
2742       userAllocatedNatIps_.add(value);
2743       onChanged();
2744       return this;
2745     }
2746     /**
2747      *
2748      *
2749      * <pre>
2750      * A list of IPs user-allocated for NAT. They will be raw IP strings like "179.12.26.133".
2751      * </pre>
2752      *
2753      * <code>repeated string user_allocated_nat_ips = 506878242;</code>
2754      *
2755      * @param values The userAllocatedNatIps to add.
2756      * @return This builder for chaining.
2757      */
addAllUserAllocatedNatIps(java.lang.Iterable<java.lang.String> values)2758     public Builder addAllUserAllocatedNatIps(java.lang.Iterable<java.lang.String> values) {
2759       ensureUserAllocatedNatIpsIsMutable();
2760       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, userAllocatedNatIps_);
2761       onChanged();
2762       return this;
2763     }
2764     /**
2765      *
2766      *
2767      * <pre>
2768      * A list of IPs user-allocated for NAT. They will be raw IP strings like "179.12.26.133".
2769      * </pre>
2770      *
2771      * <code>repeated string user_allocated_nat_ips = 506878242;</code>
2772      *
2773      * @return This builder for chaining.
2774      */
clearUserAllocatedNatIps()2775     public Builder clearUserAllocatedNatIps() {
2776       userAllocatedNatIps_ = com.google.protobuf.LazyStringArrayList.EMPTY;
2777       bitField0_ = (bitField0_ & ~0x00000100);
2778       onChanged();
2779       return this;
2780     }
2781     /**
2782      *
2783      *
2784      * <pre>
2785      * A list of IPs user-allocated for NAT. They will be raw IP strings like "179.12.26.133".
2786      * </pre>
2787      *
2788      * <code>repeated string user_allocated_nat_ips = 506878242;</code>
2789      *
2790      * @param value The bytes of the userAllocatedNatIps to add.
2791      * @return This builder for chaining.
2792      */
addUserAllocatedNatIpsBytes(com.google.protobuf.ByteString value)2793     public Builder addUserAllocatedNatIpsBytes(com.google.protobuf.ByteString value) {
2794       if (value == null) {
2795         throw new NullPointerException();
2796       }
2797       checkByteStringIsUtf8(value);
2798       ensureUserAllocatedNatIpsIsMutable();
2799       userAllocatedNatIps_.add(value);
2800       onChanged();
2801       return this;
2802     }
2803 
2804     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)2805     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
2806       return super.setUnknownFields(unknownFields);
2807     }
2808 
2809     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)2810     public final Builder mergeUnknownFields(
2811         final com.google.protobuf.UnknownFieldSet unknownFields) {
2812       return super.mergeUnknownFields(unknownFields);
2813     }
2814 
2815     // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.RouterStatusNatStatus)
2816   }
2817 
2818   // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.RouterStatusNatStatus)
2819   private static final com.google.cloud.compute.v1.RouterStatusNatStatus DEFAULT_INSTANCE;
2820 
2821   static {
2822     DEFAULT_INSTANCE = new com.google.cloud.compute.v1.RouterStatusNatStatus();
2823   }
2824 
getDefaultInstance()2825   public static com.google.cloud.compute.v1.RouterStatusNatStatus getDefaultInstance() {
2826     return DEFAULT_INSTANCE;
2827   }
2828 
2829   private static final com.google.protobuf.Parser<RouterStatusNatStatus> PARSER =
2830       new com.google.protobuf.AbstractParser<RouterStatusNatStatus>() {
2831         @java.lang.Override
2832         public RouterStatusNatStatus parsePartialFrom(
2833             com.google.protobuf.CodedInputStream input,
2834             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2835             throws com.google.protobuf.InvalidProtocolBufferException {
2836           Builder builder = newBuilder();
2837           try {
2838             builder.mergeFrom(input, extensionRegistry);
2839           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2840             throw e.setUnfinishedMessage(builder.buildPartial());
2841           } catch (com.google.protobuf.UninitializedMessageException e) {
2842             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
2843           } catch (java.io.IOException e) {
2844             throw new com.google.protobuf.InvalidProtocolBufferException(e)
2845                 .setUnfinishedMessage(builder.buildPartial());
2846           }
2847           return builder.buildPartial();
2848         }
2849       };
2850 
parser()2851   public static com.google.protobuf.Parser<RouterStatusNatStatus> parser() {
2852     return PARSER;
2853   }
2854 
2855   @java.lang.Override
getParserForType()2856   public com.google.protobuf.Parser<RouterStatusNatStatus> getParserForType() {
2857     return PARSER;
2858   }
2859 
2860   @java.lang.Override
getDefaultInstanceForType()2861   public com.google.cloud.compute.v1.RouterStatusNatStatus getDefaultInstanceForType() {
2862     return DEFAULT_INSTANCE;
2863   }
2864 }
2865