• 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  * </pre>
26  *
27  * Protobuf type {@code google.cloud.compute.v1.RouterBgpPeer}
28  */
29 public final class RouterBgpPeer extends com.google.protobuf.GeneratedMessageV3
30     implements
31     // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.RouterBgpPeer)
32     RouterBgpPeerOrBuilder {
33   private static final long serialVersionUID = 0L;
34   // Use RouterBgpPeer.newBuilder() to construct.
RouterBgpPeer(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)35   private RouterBgpPeer(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
36     super(builder);
37   }
38 
RouterBgpPeer()39   private RouterBgpPeer() {
40     advertiseMode_ = "";
41     advertisedGroups_ = com.google.protobuf.LazyStringArrayList.EMPTY;
42     advertisedIpRanges_ = java.util.Collections.emptyList();
43     enable_ = "";
44     interfaceName_ = "";
45     ipAddress_ = "";
46     ipv6NexthopAddress_ = "";
47     managementType_ = "";
48     md5AuthenticationKeyName_ = "";
49     name_ = "";
50     peerIpAddress_ = "";
51     peerIpv6NexthopAddress_ = "";
52     routerApplianceInstance_ = "";
53   }
54 
55   @java.lang.Override
56   @SuppressWarnings({"unused"})
newInstance(UnusedPrivateParameter unused)57   protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
58     return new RouterBgpPeer();
59   }
60 
61   @java.lang.Override
getUnknownFields()62   public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
63     return this.unknownFields;
64   }
65 
getDescriptor()66   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
67     return com.google.cloud.compute.v1.Compute
68         .internal_static_google_cloud_compute_v1_RouterBgpPeer_descriptor;
69   }
70 
71   @java.lang.Override
72   protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()73       internalGetFieldAccessorTable() {
74     return com.google.cloud.compute.v1.Compute
75         .internal_static_google_cloud_compute_v1_RouterBgpPeer_fieldAccessorTable
76         .ensureFieldAccessorsInitialized(
77             com.google.cloud.compute.v1.RouterBgpPeer.class,
78             com.google.cloud.compute.v1.RouterBgpPeer.Builder.class);
79   }
80 
81   /**
82    *
83    *
84    * <pre>
85    * User-specified flag to indicate which mode to use for advertisement.
86    * </pre>
87    *
88    * Protobuf enum {@code google.cloud.compute.v1.RouterBgpPeer.AdvertiseMode}
89    */
90   public enum AdvertiseMode implements com.google.protobuf.ProtocolMessageEnum {
91     /**
92      *
93      *
94      * <pre>
95      * A value indicating that the enum field is not set.
96      * </pre>
97      *
98      * <code>UNDEFINED_ADVERTISE_MODE = 0;</code>
99      */
100     UNDEFINED_ADVERTISE_MODE(0),
101     /** <code>CUSTOM = 388595569;</code> */
102     CUSTOM(388595569),
103     /** <code>DEFAULT = 115302945;</code> */
104     DEFAULT(115302945),
105     UNRECOGNIZED(-1),
106     ;
107 
108     /**
109      *
110      *
111      * <pre>
112      * A value indicating that the enum field is not set.
113      * </pre>
114      *
115      * <code>UNDEFINED_ADVERTISE_MODE = 0;</code>
116      */
117     public static final int UNDEFINED_ADVERTISE_MODE_VALUE = 0;
118     /** <code>CUSTOM = 388595569;</code> */
119     public static final int CUSTOM_VALUE = 388595569;
120     /** <code>DEFAULT = 115302945;</code> */
121     public static final int DEFAULT_VALUE = 115302945;
122 
getNumber()123     public final int getNumber() {
124       if (this == UNRECOGNIZED) {
125         throw new java.lang.IllegalArgumentException(
126             "Can't get the number of an unknown enum value.");
127       }
128       return value;
129     }
130 
131     /**
132      * @param value The numeric wire value of the corresponding enum entry.
133      * @return The enum associated with the given numeric wire value.
134      * @deprecated Use {@link #forNumber(int)} instead.
135      */
136     @java.lang.Deprecated
valueOf(int value)137     public static AdvertiseMode valueOf(int value) {
138       return forNumber(value);
139     }
140 
141     /**
142      * @param value The numeric wire value of the corresponding enum entry.
143      * @return The enum associated with the given numeric wire value.
144      */
forNumber(int value)145     public static AdvertiseMode forNumber(int value) {
146       switch (value) {
147         case 0:
148           return UNDEFINED_ADVERTISE_MODE;
149         case 388595569:
150           return CUSTOM;
151         case 115302945:
152           return DEFAULT;
153         default:
154           return null;
155       }
156     }
157 
internalGetValueMap()158     public static com.google.protobuf.Internal.EnumLiteMap<AdvertiseMode> internalGetValueMap() {
159       return internalValueMap;
160     }
161 
162     private static final com.google.protobuf.Internal.EnumLiteMap<AdvertiseMode> internalValueMap =
163         new com.google.protobuf.Internal.EnumLiteMap<AdvertiseMode>() {
164           public AdvertiseMode findValueByNumber(int number) {
165             return AdvertiseMode.forNumber(number);
166           }
167         };
168 
getValueDescriptor()169     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
170       if (this == UNRECOGNIZED) {
171         throw new java.lang.IllegalStateException(
172             "Can't get the descriptor of an unrecognized enum value.");
173       }
174       return getDescriptor().getValues().get(ordinal());
175     }
176 
getDescriptorForType()177     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
178       return getDescriptor();
179     }
180 
getDescriptor()181     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
182       return com.google.cloud.compute.v1.RouterBgpPeer.getDescriptor().getEnumTypes().get(0);
183     }
184 
185     private static final AdvertiseMode[] VALUES = values();
186 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)187     public static AdvertiseMode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
188       if (desc.getType() != getDescriptor()) {
189         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
190       }
191       if (desc.getIndex() == -1) {
192         return UNRECOGNIZED;
193       }
194       return VALUES[desc.getIndex()];
195     }
196 
197     private final int value;
198 
AdvertiseMode(int value)199     private AdvertiseMode(int value) {
200       this.value = value;
201     }
202 
203     // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.RouterBgpPeer.AdvertiseMode)
204   }
205 
206   /**
207    *
208    *
209    * <pre>
210    * </pre>
211    *
212    * Protobuf enum {@code google.cloud.compute.v1.RouterBgpPeer.AdvertisedGroups}
213    */
214   public enum AdvertisedGroups implements com.google.protobuf.ProtocolMessageEnum {
215     /**
216      *
217      *
218      * <pre>
219      * A value indicating that the enum field is not set.
220      * </pre>
221      *
222      * <code>UNDEFINED_ADVERTISED_GROUPS = 0;</code>
223      */
224     UNDEFINED_ADVERTISED_GROUPS(0),
225     /**
226      *
227      *
228      * <pre>
229      * Advertise all available subnets (including peer VPC subnets).
230      * </pre>
231      *
232      * <code>ALL_SUBNETS = 3622872;</code>
233      */
234     ALL_SUBNETS(3622872),
235     UNRECOGNIZED(-1),
236     ;
237 
238     /**
239      *
240      *
241      * <pre>
242      * A value indicating that the enum field is not set.
243      * </pre>
244      *
245      * <code>UNDEFINED_ADVERTISED_GROUPS = 0;</code>
246      */
247     public static final int UNDEFINED_ADVERTISED_GROUPS_VALUE = 0;
248     /**
249      *
250      *
251      * <pre>
252      * Advertise all available subnets (including peer VPC subnets).
253      * </pre>
254      *
255      * <code>ALL_SUBNETS = 3622872;</code>
256      */
257     public static final int ALL_SUBNETS_VALUE = 3622872;
258 
getNumber()259     public final int getNumber() {
260       if (this == UNRECOGNIZED) {
261         throw new java.lang.IllegalArgumentException(
262             "Can't get the number of an unknown enum value.");
263       }
264       return value;
265     }
266 
267     /**
268      * @param value The numeric wire value of the corresponding enum entry.
269      * @return The enum associated with the given numeric wire value.
270      * @deprecated Use {@link #forNumber(int)} instead.
271      */
272     @java.lang.Deprecated
valueOf(int value)273     public static AdvertisedGroups valueOf(int value) {
274       return forNumber(value);
275     }
276 
277     /**
278      * @param value The numeric wire value of the corresponding enum entry.
279      * @return The enum associated with the given numeric wire value.
280      */
forNumber(int value)281     public static AdvertisedGroups forNumber(int value) {
282       switch (value) {
283         case 0:
284           return UNDEFINED_ADVERTISED_GROUPS;
285         case 3622872:
286           return ALL_SUBNETS;
287         default:
288           return null;
289       }
290     }
291 
internalGetValueMap()292     public static com.google.protobuf.Internal.EnumLiteMap<AdvertisedGroups> internalGetValueMap() {
293       return internalValueMap;
294     }
295 
296     private static final com.google.protobuf.Internal.EnumLiteMap<AdvertisedGroups>
297         internalValueMap =
298             new com.google.protobuf.Internal.EnumLiteMap<AdvertisedGroups>() {
299               public AdvertisedGroups findValueByNumber(int number) {
300                 return AdvertisedGroups.forNumber(number);
301               }
302             };
303 
getValueDescriptor()304     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
305       if (this == UNRECOGNIZED) {
306         throw new java.lang.IllegalStateException(
307             "Can't get the descriptor of an unrecognized enum value.");
308       }
309       return getDescriptor().getValues().get(ordinal());
310     }
311 
getDescriptorForType()312     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
313       return getDescriptor();
314     }
315 
getDescriptor()316     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
317       return com.google.cloud.compute.v1.RouterBgpPeer.getDescriptor().getEnumTypes().get(1);
318     }
319 
320     private static final AdvertisedGroups[] VALUES = values();
321 
valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)322     public static AdvertisedGroups valueOf(
323         com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
324       if (desc.getType() != getDescriptor()) {
325         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
326       }
327       if (desc.getIndex() == -1) {
328         return UNRECOGNIZED;
329       }
330       return VALUES[desc.getIndex()];
331     }
332 
333     private final int value;
334 
AdvertisedGroups(int value)335     private AdvertisedGroups(int value) {
336       this.value = value;
337     }
338 
339     // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.RouterBgpPeer.AdvertisedGroups)
340   }
341 
342   /**
343    *
344    *
345    * <pre>
346    * The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
347    * </pre>
348    *
349    * Protobuf enum {@code google.cloud.compute.v1.RouterBgpPeer.Enable}
350    */
351   public enum Enable implements com.google.protobuf.ProtocolMessageEnum {
352     /**
353      *
354      *
355      * <pre>
356      * A value indicating that the enum field is not set.
357      * </pre>
358      *
359      * <code>UNDEFINED_ENABLE = 0;</code>
360      */
361     UNDEFINED_ENABLE(0),
362     /** <code>FALSE = 66658563;</code> */
363     FALSE(66658563),
364     /** <code>TRUE = 2583950;</code> */
365     TRUE(2583950),
366     UNRECOGNIZED(-1),
367     ;
368 
369     /**
370      *
371      *
372      * <pre>
373      * A value indicating that the enum field is not set.
374      * </pre>
375      *
376      * <code>UNDEFINED_ENABLE = 0;</code>
377      */
378     public static final int UNDEFINED_ENABLE_VALUE = 0;
379     /** <code>FALSE = 66658563;</code> */
380     public static final int FALSE_VALUE = 66658563;
381     /** <code>TRUE = 2583950;</code> */
382     public static final int TRUE_VALUE = 2583950;
383 
getNumber()384     public final int getNumber() {
385       if (this == UNRECOGNIZED) {
386         throw new java.lang.IllegalArgumentException(
387             "Can't get the number of an unknown enum value.");
388       }
389       return value;
390     }
391 
392     /**
393      * @param value The numeric wire value of the corresponding enum entry.
394      * @return The enum associated with the given numeric wire value.
395      * @deprecated Use {@link #forNumber(int)} instead.
396      */
397     @java.lang.Deprecated
valueOf(int value)398     public static Enable valueOf(int value) {
399       return forNumber(value);
400     }
401 
402     /**
403      * @param value The numeric wire value of the corresponding enum entry.
404      * @return The enum associated with the given numeric wire value.
405      */
forNumber(int value)406     public static Enable forNumber(int value) {
407       switch (value) {
408         case 0:
409           return UNDEFINED_ENABLE;
410         case 66658563:
411           return FALSE;
412         case 2583950:
413           return TRUE;
414         default:
415           return null;
416       }
417     }
418 
internalGetValueMap()419     public static com.google.protobuf.Internal.EnumLiteMap<Enable> internalGetValueMap() {
420       return internalValueMap;
421     }
422 
423     private static final com.google.protobuf.Internal.EnumLiteMap<Enable> internalValueMap =
424         new com.google.protobuf.Internal.EnumLiteMap<Enable>() {
425           public Enable findValueByNumber(int number) {
426             return Enable.forNumber(number);
427           }
428         };
429 
getValueDescriptor()430     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
431       if (this == UNRECOGNIZED) {
432         throw new java.lang.IllegalStateException(
433             "Can't get the descriptor of an unrecognized enum value.");
434       }
435       return getDescriptor().getValues().get(ordinal());
436     }
437 
getDescriptorForType()438     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
439       return getDescriptor();
440     }
441 
getDescriptor()442     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
443       return com.google.cloud.compute.v1.RouterBgpPeer.getDescriptor().getEnumTypes().get(2);
444     }
445 
446     private static final Enable[] VALUES = values();
447 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)448     public static Enable valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
449       if (desc.getType() != getDescriptor()) {
450         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
451       }
452       if (desc.getIndex() == -1) {
453         return UNRECOGNIZED;
454       }
455       return VALUES[desc.getIndex()];
456     }
457 
458     private final int value;
459 
Enable(int value)460     private Enable(int value) {
461       this.value = value;
462     }
463 
464     // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.RouterBgpPeer.Enable)
465   }
466 
467   /**
468    *
469    *
470    * <pre>
471    * [Output Only] The resource that configures and manages this BGP peer. - MANAGED_BY_USER is the default value and can be managed by you or other users - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.
472    * </pre>
473    *
474    * Protobuf enum {@code google.cloud.compute.v1.RouterBgpPeer.ManagementType}
475    */
476   public enum ManagementType implements com.google.protobuf.ProtocolMessageEnum {
477     /**
478      *
479      *
480      * <pre>
481      * A value indicating that the enum field is not set.
482      * </pre>
483      *
484      * <code>UNDEFINED_MANAGEMENT_TYPE = 0;</code>
485      */
486     UNDEFINED_MANAGEMENT_TYPE(0),
487     /**
488      *
489      *
490      * <pre>
491      * The BGP peer is automatically created for PARTNER type InterconnectAttachment; Google will automatically create/delete this BGP peer when the PARTNER InterconnectAttachment is created/deleted, and Google will update the ipAddress and peerIpAddress when the PARTNER InterconnectAttachment is provisioned. This type of BGP peer cannot be created or deleted, but can be modified for all fields except for name, ipAddress and peerIpAddress.
492      * </pre>
493      *
494      * <code>MANAGED_BY_ATTACHMENT = 458926411;</code>
495      */
496     MANAGED_BY_ATTACHMENT(458926411),
497     /**
498      *
499      *
500      * <pre>
501      * Default value, the BGP peer is manually created and managed by user.
502      * </pre>
503      *
504      * <code>MANAGED_BY_USER = 317294067;</code>
505      */
506     MANAGED_BY_USER(317294067),
507     UNRECOGNIZED(-1),
508     ;
509 
510     /**
511      *
512      *
513      * <pre>
514      * A value indicating that the enum field is not set.
515      * </pre>
516      *
517      * <code>UNDEFINED_MANAGEMENT_TYPE = 0;</code>
518      */
519     public static final int UNDEFINED_MANAGEMENT_TYPE_VALUE = 0;
520     /**
521      *
522      *
523      * <pre>
524      * The BGP peer is automatically created for PARTNER type InterconnectAttachment; Google will automatically create/delete this BGP peer when the PARTNER InterconnectAttachment is created/deleted, and Google will update the ipAddress and peerIpAddress when the PARTNER InterconnectAttachment is provisioned. This type of BGP peer cannot be created or deleted, but can be modified for all fields except for name, ipAddress and peerIpAddress.
525      * </pre>
526      *
527      * <code>MANAGED_BY_ATTACHMENT = 458926411;</code>
528      */
529     public static final int MANAGED_BY_ATTACHMENT_VALUE = 458926411;
530     /**
531      *
532      *
533      * <pre>
534      * Default value, the BGP peer is manually created and managed by user.
535      * </pre>
536      *
537      * <code>MANAGED_BY_USER = 317294067;</code>
538      */
539     public static final int MANAGED_BY_USER_VALUE = 317294067;
540 
getNumber()541     public final int getNumber() {
542       if (this == UNRECOGNIZED) {
543         throw new java.lang.IllegalArgumentException(
544             "Can't get the number of an unknown enum value.");
545       }
546       return value;
547     }
548 
549     /**
550      * @param value The numeric wire value of the corresponding enum entry.
551      * @return The enum associated with the given numeric wire value.
552      * @deprecated Use {@link #forNumber(int)} instead.
553      */
554     @java.lang.Deprecated
valueOf(int value)555     public static ManagementType valueOf(int value) {
556       return forNumber(value);
557     }
558 
559     /**
560      * @param value The numeric wire value of the corresponding enum entry.
561      * @return The enum associated with the given numeric wire value.
562      */
forNumber(int value)563     public static ManagementType forNumber(int value) {
564       switch (value) {
565         case 0:
566           return UNDEFINED_MANAGEMENT_TYPE;
567         case 458926411:
568           return MANAGED_BY_ATTACHMENT;
569         case 317294067:
570           return MANAGED_BY_USER;
571         default:
572           return null;
573       }
574     }
575 
internalGetValueMap()576     public static com.google.protobuf.Internal.EnumLiteMap<ManagementType> internalGetValueMap() {
577       return internalValueMap;
578     }
579 
580     private static final com.google.protobuf.Internal.EnumLiteMap<ManagementType> internalValueMap =
581         new com.google.protobuf.Internal.EnumLiteMap<ManagementType>() {
582           public ManagementType findValueByNumber(int number) {
583             return ManagementType.forNumber(number);
584           }
585         };
586 
getValueDescriptor()587     public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
588       if (this == UNRECOGNIZED) {
589         throw new java.lang.IllegalStateException(
590             "Can't get the descriptor of an unrecognized enum value.");
591       }
592       return getDescriptor().getValues().get(ordinal());
593     }
594 
getDescriptorForType()595     public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
596       return getDescriptor();
597     }
598 
getDescriptor()599     public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
600       return com.google.cloud.compute.v1.RouterBgpPeer.getDescriptor().getEnumTypes().get(3);
601     }
602 
603     private static final ManagementType[] VALUES = values();
604 
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)605     public static ManagementType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
606       if (desc.getType() != getDescriptor()) {
607         throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
608       }
609       if (desc.getIndex() == -1) {
610         return UNRECOGNIZED;
611       }
612       return VALUES[desc.getIndex()];
613     }
614 
615     private final int value;
616 
ManagementType(int value)617     private ManagementType(int value) {
618       this.value = value;
619     }
620 
621     // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.RouterBgpPeer.ManagementType)
622   }
623 
624   private int bitField0_;
625   public static final int ADVERTISE_MODE_FIELD_NUMBER = 312134331;
626 
627   @SuppressWarnings("serial")
628   private volatile java.lang.Object advertiseMode_ = "";
629   /**
630    *
631    *
632    * <pre>
633    * User-specified flag to indicate which mode to use for advertisement.
634    * Check the AdvertiseMode enum for the list of possible values.
635    * </pre>
636    *
637    * <code>optional string advertise_mode = 312134331;</code>
638    *
639    * @return Whether the advertiseMode field is set.
640    */
641   @java.lang.Override
hasAdvertiseMode()642   public boolean hasAdvertiseMode() {
643     return ((bitField0_ & 0x00000001) != 0);
644   }
645   /**
646    *
647    *
648    * <pre>
649    * User-specified flag to indicate which mode to use for advertisement.
650    * Check the AdvertiseMode enum for the list of possible values.
651    * </pre>
652    *
653    * <code>optional string advertise_mode = 312134331;</code>
654    *
655    * @return The advertiseMode.
656    */
657   @java.lang.Override
getAdvertiseMode()658   public java.lang.String getAdvertiseMode() {
659     java.lang.Object ref = advertiseMode_;
660     if (ref instanceof java.lang.String) {
661       return (java.lang.String) ref;
662     } else {
663       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
664       java.lang.String s = bs.toStringUtf8();
665       advertiseMode_ = s;
666       return s;
667     }
668   }
669   /**
670    *
671    *
672    * <pre>
673    * User-specified flag to indicate which mode to use for advertisement.
674    * Check the AdvertiseMode enum for the list of possible values.
675    * </pre>
676    *
677    * <code>optional string advertise_mode = 312134331;</code>
678    *
679    * @return The bytes for advertiseMode.
680    */
681   @java.lang.Override
getAdvertiseModeBytes()682   public com.google.protobuf.ByteString getAdvertiseModeBytes() {
683     java.lang.Object ref = advertiseMode_;
684     if (ref instanceof java.lang.String) {
685       com.google.protobuf.ByteString b =
686           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
687       advertiseMode_ = b;
688       return b;
689     } else {
690       return (com.google.protobuf.ByteString) ref;
691     }
692   }
693 
694   public static final int ADVERTISED_GROUPS_FIELD_NUMBER = 21065526;
695 
696   @SuppressWarnings("serial")
697   private com.google.protobuf.LazyStringList advertisedGroups_;
698   /**
699    *
700    *
701    * <pre>
702    * User-specified list of prefix groups to advertise in custom mode, which currently supports the following option: - ALL_SUBNETS: Advertises all of the router's own VPC subnets. This excludes any routes learned for subnets that use VPC Network Peering. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
703    * Check the AdvertisedGroups enum for the list of possible values.
704    * </pre>
705    *
706    * <code>repeated string advertised_groups = 21065526;</code>
707    *
708    * @return A list containing the advertisedGroups.
709    */
getAdvertisedGroupsList()710   public com.google.protobuf.ProtocolStringList getAdvertisedGroupsList() {
711     return advertisedGroups_;
712   }
713   /**
714    *
715    *
716    * <pre>
717    * User-specified list of prefix groups to advertise in custom mode, which currently supports the following option: - ALL_SUBNETS: Advertises all of the router's own VPC subnets. This excludes any routes learned for subnets that use VPC Network Peering. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
718    * Check the AdvertisedGroups enum for the list of possible values.
719    * </pre>
720    *
721    * <code>repeated string advertised_groups = 21065526;</code>
722    *
723    * @return The count of advertisedGroups.
724    */
getAdvertisedGroupsCount()725   public int getAdvertisedGroupsCount() {
726     return advertisedGroups_.size();
727   }
728   /**
729    *
730    *
731    * <pre>
732    * User-specified list of prefix groups to advertise in custom mode, which currently supports the following option: - ALL_SUBNETS: Advertises all of the router's own VPC subnets. This excludes any routes learned for subnets that use VPC Network Peering. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
733    * Check the AdvertisedGroups enum for the list of possible values.
734    * </pre>
735    *
736    * <code>repeated string advertised_groups = 21065526;</code>
737    *
738    * @param index The index of the element to return.
739    * @return The advertisedGroups at the given index.
740    */
getAdvertisedGroups(int index)741   public java.lang.String getAdvertisedGroups(int index) {
742     return advertisedGroups_.get(index);
743   }
744   /**
745    *
746    *
747    * <pre>
748    * User-specified list of prefix groups to advertise in custom mode, which currently supports the following option: - ALL_SUBNETS: Advertises all of the router's own VPC subnets. This excludes any routes learned for subnets that use VPC Network Peering. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
749    * Check the AdvertisedGroups enum for the list of possible values.
750    * </pre>
751    *
752    * <code>repeated string advertised_groups = 21065526;</code>
753    *
754    * @param index The index of the value to return.
755    * @return The bytes of the advertisedGroups at the given index.
756    */
getAdvertisedGroupsBytes(int index)757   public com.google.protobuf.ByteString getAdvertisedGroupsBytes(int index) {
758     return advertisedGroups_.getByteString(index);
759   }
760 
761   public static final int ADVERTISED_IP_RANGES_FIELD_NUMBER = 35449932;
762 
763   @SuppressWarnings("serial")
764   private java.util.List<com.google.cloud.compute.v1.RouterAdvertisedIpRange> advertisedIpRanges_;
765   /**
766    *
767    *
768    * <pre>
769    * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
770    * </pre>
771    *
772    * <code>
773    * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932;
774    * </code>
775    */
776   @java.lang.Override
777   public java.util.List<com.google.cloud.compute.v1.RouterAdvertisedIpRange>
getAdvertisedIpRangesList()778       getAdvertisedIpRangesList() {
779     return advertisedIpRanges_;
780   }
781   /**
782    *
783    *
784    * <pre>
785    * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
786    * </pre>
787    *
788    * <code>
789    * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932;
790    * </code>
791    */
792   @java.lang.Override
793   public java.util.List<? extends com.google.cloud.compute.v1.RouterAdvertisedIpRangeOrBuilder>
getAdvertisedIpRangesOrBuilderList()794       getAdvertisedIpRangesOrBuilderList() {
795     return advertisedIpRanges_;
796   }
797   /**
798    *
799    *
800    * <pre>
801    * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
802    * </pre>
803    *
804    * <code>
805    * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932;
806    * </code>
807    */
808   @java.lang.Override
getAdvertisedIpRangesCount()809   public int getAdvertisedIpRangesCount() {
810     return advertisedIpRanges_.size();
811   }
812   /**
813    *
814    *
815    * <pre>
816    * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
817    * </pre>
818    *
819    * <code>
820    * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932;
821    * </code>
822    */
823   @java.lang.Override
getAdvertisedIpRanges(int index)824   public com.google.cloud.compute.v1.RouterAdvertisedIpRange getAdvertisedIpRanges(int index) {
825     return advertisedIpRanges_.get(index);
826   }
827   /**
828    *
829    *
830    * <pre>
831    * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
832    * </pre>
833    *
834    * <code>
835    * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932;
836    * </code>
837    */
838   @java.lang.Override
839   public com.google.cloud.compute.v1.RouterAdvertisedIpRangeOrBuilder
getAdvertisedIpRangesOrBuilder(int index)840       getAdvertisedIpRangesOrBuilder(int index) {
841     return advertisedIpRanges_.get(index);
842   }
843 
844   public static final int ADVERTISED_ROUTE_PRIORITY_FIELD_NUMBER = 186486332;
845   private int advertisedRoutePriority_ = 0;
846   /**
847    *
848    *
849    * <pre>
850    * The priority of routes advertised to this BGP peer. Where there is more than one matching route of maximum length, the routes with the lowest priority value win.
851    * </pre>
852    *
853    * <code>optional uint32 advertised_route_priority = 186486332;</code>
854    *
855    * @return Whether the advertisedRoutePriority field is set.
856    */
857   @java.lang.Override
hasAdvertisedRoutePriority()858   public boolean hasAdvertisedRoutePriority() {
859     return ((bitField0_ & 0x00000002) != 0);
860   }
861   /**
862    *
863    *
864    * <pre>
865    * The priority of routes advertised to this BGP peer. Where there is more than one matching route of maximum length, the routes with the lowest priority value win.
866    * </pre>
867    *
868    * <code>optional uint32 advertised_route_priority = 186486332;</code>
869    *
870    * @return The advertisedRoutePriority.
871    */
872   @java.lang.Override
getAdvertisedRoutePriority()873   public int getAdvertisedRoutePriority() {
874     return advertisedRoutePriority_;
875   }
876 
877   public static final int BFD_FIELD_NUMBER = 97440;
878   private com.google.cloud.compute.v1.RouterBgpPeerBfd bfd_;
879   /**
880    *
881    *
882    * <pre>
883    * BFD configuration for the BGP peering.
884    * </pre>
885    *
886    * <code>optional .google.cloud.compute.v1.RouterBgpPeerBfd bfd = 97440;</code>
887    *
888    * @return Whether the bfd field is set.
889    */
890   @java.lang.Override
hasBfd()891   public boolean hasBfd() {
892     return ((bitField0_ & 0x00000004) != 0);
893   }
894   /**
895    *
896    *
897    * <pre>
898    * BFD configuration for the BGP peering.
899    * </pre>
900    *
901    * <code>optional .google.cloud.compute.v1.RouterBgpPeerBfd bfd = 97440;</code>
902    *
903    * @return The bfd.
904    */
905   @java.lang.Override
getBfd()906   public com.google.cloud.compute.v1.RouterBgpPeerBfd getBfd() {
907     return bfd_ == null ? com.google.cloud.compute.v1.RouterBgpPeerBfd.getDefaultInstance() : bfd_;
908   }
909   /**
910    *
911    *
912    * <pre>
913    * BFD configuration for the BGP peering.
914    * </pre>
915    *
916    * <code>optional .google.cloud.compute.v1.RouterBgpPeerBfd bfd = 97440;</code>
917    */
918   @java.lang.Override
getBfdOrBuilder()919   public com.google.cloud.compute.v1.RouterBgpPeerBfdOrBuilder getBfdOrBuilder() {
920     return bfd_ == null ? com.google.cloud.compute.v1.RouterBgpPeerBfd.getDefaultInstance() : bfd_;
921   }
922 
923   public static final int ENABLE_FIELD_NUMBER = 311764355;
924 
925   @SuppressWarnings("serial")
926   private volatile java.lang.Object enable_ = "";
927   /**
928    *
929    *
930    * <pre>
931    * The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
932    * Check the Enable enum for the list of possible values.
933    * </pre>
934    *
935    * <code>optional string enable = 311764355;</code>
936    *
937    * @return Whether the enable field is set.
938    */
939   @java.lang.Override
hasEnable()940   public boolean hasEnable() {
941     return ((bitField0_ & 0x00000008) != 0);
942   }
943   /**
944    *
945    *
946    * <pre>
947    * The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
948    * Check the Enable enum for the list of possible values.
949    * </pre>
950    *
951    * <code>optional string enable = 311764355;</code>
952    *
953    * @return The enable.
954    */
955   @java.lang.Override
getEnable()956   public java.lang.String getEnable() {
957     java.lang.Object ref = enable_;
958     if (ref instanceof java.lang.String) {
959       return (java.lang.String) ref;
960     } else {
961       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
962       java.lang.String s = bs.toStringUtf8();
963       enable_ = s;
964       return s;
965     }
966   }
967   /**
968    *
969    *
970    * <pre>
971    * The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
972    * Check the Enable enum for the list of possible values.
973    * </pre>
974    *
975    * <code>optional string enable = 311764355;</code>
976    *
977    * @return The bytes for enable.
978    */
979   @java.lang.Override
getEnableBytes()980   public com.google.protobuf.ByteString getEnableBytes() {
981     java.lang.Object ref = enable_;
982     if (ref instanceof java.lang.String) {
983       com.google.protobuf.ByteString b =
984           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
985       enable_ = b;
986       return b;
987     } else {
988       return (com.google.protobuf.ByteString) ref;
989     }
990   }
991 
992   public static final int ENABLE_IPV6_FIELD_NUMBER = 181467939;
993   private boolean enableIpv6_ = false;
994   /**
995    *
996    *
997    * <pre>
998    * Enable IPv6 traffic over BGP Peer. If not specified, it is disabled by default.
999    * </pre>
1000    *
1001    * <code>optional bool enable_ipv6 = 181467939;</code>
1002    *
1003    * @return Whether the enableIpv6 field is set.
1004    */
1005   @java.lang.Override
hasEnableIpv6()1006   public boolean hasEnableIpv6() {
1007     return ((bitField0_ & 0x00000010) != 0);
1008   }
1009   /**
1010    *
1011    *
1012    * <pre>
1013    * Enable IPv6 traffic over BGP Peer. If not specified, it is disabled by default.
1014    * </pre>
1015    *
1016    * <code>optional bool enable_ipv6 = 181467939;</code>
1017    *
1018    * @return The enableIpv6.
1019    */
1020   @java.lang.Override
getEnableIpv6()1021   public boolean getEnableIpv6() {
1022     return enableIpv6_;
1023   }
1024 
1025   public static final int INTERFACE_NAME_FIELD_NUMBER = 437854673;
1026 
1027   @SuppressWarnings("serial")
1028   private volatile java.lang.Object interfaceName_ = "";
1029   /**
1030    *
1031    *
1032    * <pre>
1033    * Name of the interface the BGP peer is associated with.
1034    * </pre>
1035    *
1036    * <code>optional string interface_name = 437854673;</code>
1037    *
1038    * @return Whether the interfaceName field is set.
1039    */
1040   @java.lang.Override
hasInterfaceName()1041   public boolean hasInterfaceName() {
1042     return ((bitField0_ & 0x00000020) != 0);
1043   }
1044   /**
1045    *
1046    *
1047    * <pre>
1048    * Name of the interface the BGP peer is associated with.
1049    * </pre>
1050    *
1051    * <code>optional string interface_name = 437854673;</code>
1052    *
1053    * @return The interfaceName.
1054    */
1055   @java.lang.Override
getInterfaceName()1056   public java.lang.String getInterfaceName() {
1057     java.lang.Object ref = interfaceName_;
1058     if (ref instanceof java.lang.String) {
1059       return (java.lang.String) ref;
1060     } else {
1061       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1062       java.lang.String s = bs.toStringUtf8();
1063       interfaceName_ = s;
1064       return s;
1065     }
1066   }
1067   /**
1068    *
1069    *
1070    * <pre>
1071    * Name of the interface the BGP peer is associated with.
1072    * </pre>
1073    *
1074    * <code>optional string interface_name = 437854673;</code>
1075    *
1076    * @return The bytes for interfaceName.
1077    */
1078   @java.lang.Override
getInterfaceNameBytes()1079   public com.google.protobuf.ByteString getInterfaceNameBytes() {
1080     java.lang.Object ref = interfaceName_;
1081     if (ref instanceof java.lang.String) {
1082       com.google.protobuf.ByteString b =
1083           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1084       interfaceName_ = b;
1085       return b;
1086     } else {
1087       return (com.google.protobuf.ByteString) ref;
1088     }
1089   }
1090 
1091   public static final int IP_ADDRESS_FIELD_NUMBER = 406272220;
1092 
1093   @SuppressWarnings("serial")
1094   private volatile java.lang.Object ipAddress_ = "";
1095   /**
1096    *
1097    *
1098    * <pre>
1099    * IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1100    * </pre>
1101    *
1102    * <code>optional string ip_address = 406272220;</code>
1103    *
1104    * @return Whether the ipAddress field is set.
1105    */
1106   @java.lang.Override
hasIpAddress()1107   public boolean hasIpAddress() {
1108     return ((bitField0_ & 0x00000040) != 0);
1109   }
1110   /**
1111    *
1112    *
1113    * <pre>
1114    * IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1115    * </pre>
1116    *
1117    * <code>optional string ip_address = 406272220;</code>
1118    *
1119    * @return The ipAddress.
1120    */
1121   @java.lang.Override
getIpAddress()1122   public java.lang.String getIpAddress() {
1123     java.lang.Object ref = ipAddress_;
1124     if (ref instanceof java.lang.String) {
1125       return (java.lang.String) ref;
1126     } else {
1127       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1128       java.lang.String s = bs.toStringUtf8();
1129       ipAddress_ = s;
1130       return s;
1131     }
1132   }
1133   /**
1134    *
1135    *
1136    * <pre>
1137    * IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
1138    * </pre>
1139    *
1140    * <code>optional string ip_address = 406272220;</code>
1141    *
1142    * @return The bytes for ipAddress.
1143    */
1144   @java.lang.Override
getIpAddressBytes()1145   public com.google.protobuf.ByteString getIpAddressBytes() {
1146     java.lang.Object ref = ipAddress_;
1147     if (ref instanceof java.lang.String) {
1148       com.google.protobuf.ByteString b =
1149           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1150       ipAddress_ = b;
1151       return b;
1152     } else {
1153       return (com.google.protobuf.ByteString) ref;
1154     }
1155   }
1156 
1157   public static final int IPV6_NEXTHOP_ADDRESS_FIELD_NUMBER = 27968211;
1158 
1159   @SuppressWarnings("serial")
1160   private volatile java.lang.Object ipv6NexthopAddress_ = "";
1161   /**
1162    *
1163    *
1164    * <pre>
1165    * IPv6 address of the interface inside Google Cloud Platform.
1166    * </pre>
1167    *
1168    * <code>optional string ipv6_nexthop_address = 27968211;</code>
1169    *
1170    * @return Whether the ipv6NexthopAddress field is set.
1171    */
1172   @java.lang.Override
hasIpv6NexthopAddress()1173   public boolean hasIpv6NexthopAddress() {
1174     return ((bitField0_ & 0x00000080) != 0);
1175   }
1176   /**
1177    *
1178    *
1179    * <pre>
1180    * IPv6 address of the interface inside Google Cloud Platform.
1181    * </pre>
1182    *
1183    * <code>optional string ipv6_nexthop_address = 27968211;</code>
1184    *
1185    * @return The ipv6NexthopAddress.
1186    */
1187   @java.lang.Override
getIpv6NexthopAddress()1188   public java.lang.String getIpv6NexthopAddress() {
1189     java.lang.Object ref = ipv6NexthopAddress_;
1190     if (ref instanceof java.lang.String) {
1191       return (java.lang.String) ref;
1192     } else {
1193       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1194       java.lang.String s = bs.toStringUtf8();
1195       ipv6NexthopAddress_ = s;
1196       return s;
1197     }
1198   }
1199   /**
1200    *
1201    *
1202    * <pre>
1203    * IPv6 address of the interface inside Google Cloud Platform.
1204    * </pre>
1205    *
1206    * <code>optional string ipv6_nexthop_address = 27968211;</code>
1207    *
1208    * @return The bytes for ipv6NexthopAddress.
1209    */
1210   @java.lang.Override
getIpv6NexthopAddressBytes()1211   public com.google.protobuf.ByteString getIpv6NexthopAddressBytes() {
1212     java.lang.Object ref = ipv6NexthopAddress_;
1213     if (ref instanceof java.lang.String) {
1214       com.google.protobuf.ByteString b =
1215           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1216       ipv6NexthopAddress_ = b;
1217       return b;
1218     } else {
1219       return (com.google.protobuf.ByteString) ref;
1220     }
1221   }
1222 
1223   public static final int MANAGEMENT_TYPE_FIELD_NUMBER = 173703606;
1224 
1225   @SuppressWarnings("serial")
1226   private volatile java.lang.Object managementType_ = "";
1227   /**
1228    *
1229    *
1230    * <pre>
1231    * [Output Only] The resource that configures and manages this BGP peer. - MANAGED_BY_USER is the default value and can be managed by you or other users - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.
1232    * Check the ManagementType enum for the list of possible values.
1233    * </pre>
1234    *
1235    * <code>optional string management_type = 173703606;</code>
1236    *
1237    * @return Whether the managementType field is set.
1238    */
1239   @java.lang.Override
hasManagementType()1240   public boolean hasManagementType() {
1241     return ((bitField0_ & 0x00000100) != 0);
1242   }
1243   /**
1244    *
1245    *
1246    * <pre>
1247    * [Output Only] The resource that configures and manages this BGP peer. - MANAGED_BY_USER is the default value and can be managed by you or other users - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.
1248    * Check the ManagementType enum for the list of possible values.
1249    * </pre>
1250    *
1251    * <code>optional string management_type = 173703606;</code>
1252    *
1253    * @return The managementType.
1254    */
1255   @java.lang.Override
getManagementType()1256   public java.lang.String getManagementType() {
1257     java.lang.Object ref = managementType_;
1258     if (ref instanceof java.lang.String) {
1259       return (java.lang.String) ref;
1260     } else {
1261       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1262       java.lang.String s = bs.toStringUtf8();
1263       managementType_ = s;
1264       return s;
1265     }
1266   }
1267   /**
1268    *
1269    *
1270    * <pre>
1271    * [Output Only] The resource that configures and manages this BGP peer. - MANAGED_BY_USER is the default value and can be managed by you or other users - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.
1272    * Check the ManagementType enum for the list of possible values.
1273    * </pre>
1274    *
1275    * <code>optional string management_type = 173703606;</code>
1276    *
1277    * @return The bytes for managementType.
1278    */
1279   @java.lang.Override
getManagementTypeBytes()1280   public com.google.protobuf.ByteString getManagementTypeBytes() {
1281     java.lang.Object ref = managementType_;
1282     if (ref instanceof java.lang.String) {
1283       com.google.protobuf.ByteString b =
1284           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1285       managementType_ = b;
1286       return b;
1287     } else {
1288       return (com.google.protobuf.ByteString) ref;
1289     }
1290   }
1291 
1292   public static final int MD5_AUTHENTICATION_KEY_NAME_FIELD_NUMBER = 281075345;
1293 
1294   @SuppressWarnings("serial")
1295   private volatile java.lang.Object md5AuthenticationKeyName_ = "";
1296   /**
1297    *
1298    *
1299    * <pre>
1300    * Present if MD5 authentication is enabled for the peering. Must be the name of one of the entries in the Router.md5_authentication_keys. The field must comply with RFC1035.
1301    * </pre>
1302    *
1303    * <code>optional string md5_authentication_key_name = 281075345;</code>
1304    *
1305    * @return Whether the md5AuthenticationKeyName field is set.
1306    */
1307   @java.lang.Override
hasMd5AuthenticationKeyName()1308   public boolean hasMd5AuthenticationKeyName() {
1309     return ((bitField0_ & 0x00000200) != 0);
1310   }
1311   /**
1312    *
1313    *
1314    * <pre>
1315    * Present if MD5 authentication is enabled for the peering. Must be the name of one of the entries in the Router.md5_authentication_keys. The field must comply with RFC1035.
1316    * </pre>
1317    *
1318    * <code>optional string md5_authentication_key_name = 281075345;</code>
1319    *
1320    * @return The md5AuthenticationKeyName.
1321    */
1322   @java.lang.Override
getMd5AuthenticationKeyName()1323   public java.lang.String getMd5AuthenticationKeyName() {
1324     java.lang.Object ref = md5AuthenticationKeyName_;
1325     if (ref instanceof java.lang.String) {
1326       return (java.lang.String) ref;
1327     } else {
1328       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1329       java.lang.String s = bs.toStringUtf8();
1330       md5AuthenticationKeyName_ = s;
1331       return s;
1332     }
1333   }
1334   /**
1335    *
1336    *
1337    * <pre>
1338    * Present if MD5 authentication is enabled for the peering. Must be the name of one of the entries in the Router.md5_authentication_keys. The field must comply with RFC1035.
1339    * </pre>
1340    *
1341    * <code>optional string md5_authentication_key_name = 281075345;</code>
1342    *
1343    * @return The bytes for md5AuthenticationKeyName.
1344    */
1345   @java.lang.Override
getMd5AuthenticationKeyNameBytes()1346   public com.google.protobuf.ByteString getMd5AuthenticationKeyNameBytes() {
1347     java.lang.Object ref = md5AuthenticationKeyName_;
1348     if (ref instanceof java.lang.String) {
1349       com.google.protobuf.ByteString b =
1350           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1351       md5AuthenticationKeyName_ = b;
1352       return b;
1353     } else {
1354       return (com.google.protobuf.ByteString) ref;
1355     }
1356   }
1357 
1358   public static final int NAME_FIELD_NUMBER = 3373707;
1359 
1360   @SuppressWarnings("serial")
1361   private volatile java.lang.Object name_ = "";
1362   /**
1363    *
1364    *
1365    * <pre>
1366    * Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
1367    * </pre>
1368    *
1369    * <code>optional string name = 3373707;</code>
1370    *
1371    * @return Whether the name field is set.
1372    */
1373   @java.lang.Override
hasName()1374   public boolean hasName() {
1375     return ((bitField0_ & 0x00000400) != 0);
1376   }
1377   /**
1378    *
1379    *
1380    * <pre>
1381    * Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
1382    * </pre>
1383    *
1384    * <code>optional string name = 3373707;</code>
1385    *
1386    * @return The name.
1387    */
1388   @java.lang.Override
getName()1389   public java.lang.String getName() {
1390     java.lang.Object ref = name_;
1391     if (ref instanceof java.lang.String) {
1392       return (java.lang.String) ref;
1393     } else {
1394       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1395       java.lang.String s = bs.toStringUtf8();
1396       name_ = s;
1397       return s;
1398     }
1399   }
1400   /**
1401    *
1402    *
1403    * <pre>
1404    * Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
1405    * </pre>
1406    *
1407    * <code>optional string name = 3373707;</code>
1408    *
1409    * @return The bytes for name.
1410    */
1411   @java.lang.Override
getNameBytes()1412   public com.google.protobuf.ByteString getNameBytes() {
1413     java.lang.Object ref = name_;
1414     if (ref instanceof java.lang.String) {
1415       com.google.protobuf.ByteString b =
1416           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1417       name_ = b;
1418       return b;
1419     } else {
1420       return (com.google.protobuf.ByteString) ref;
1421     }
1422   }
1423 
1424   public static final int PEER_ASN_FIELD_NUMBER = 69573151;
1425   private int peerAsn_ = 0;
1426   /**
1427    *
1428    *
1429    * <pre>
1430    * Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1431    * </pre>
1432    *
1433    * <code>optional uint32 peer_asn = 69573151;</code>
1434    *
1435    * @return Whether the peerAsn field is set.
1436    */
1437   @java.lang.Override
hasPeerAsn()1438   public boolean hasPeerAsn() {
1439     return ((bitField0_ & 0x00000800) != 0);
1440   }
1441   /**
1442    *
1443    *
1444    * <pre>
1445    * Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
1446    * </pre>
1447    *
1448    * <code>optional uint32 peer_asn = 69573151;</code>
1449    *
1450    * @return The peerAsn.
1451    */
1452   @java.lang.Override
getPeerAsn()1453   public int getPeerAsn() {
1454     return peerAsn_;
1455   }
1456 
1457   public static final int PEER_IP_ADDRESS_FIELD_NUMBER = 207735769;
1458 
1459   @SuppressWarnings("serial")
1460   private volatile java.lang.Object peerIpAddress_ = "";
1461   /**
1462    *
1463    *
1464    * <pre>
1465    * IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1466    * </pre>
1467    *
1468    * <code>optional string peer_ip_address = 207735769;</code>
1469    *
1470    * @return Whether the peerIpAddress field is set.
1471    */
1472   @java.lang.Override
hasPeerIpAddress()1473   public boolean hasPeerIpAddress() {
1474     return ((bitField0_ & 0x00001000) != 0);
1475   }
1476   /**
1477    *
1478    *
1479    * <pre>
1480    * IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1481    * </pre>
1482    *
1483    * <code>optional string peer_ip_address = 207735769;</code>
1484    *
1485    * @return The peerIpAddress.
1486    */
1487   @java.lang.Override
getPeerIpAddress()1488   public java.lang.String getPeerIpAddress() {
1489     java.lang.Object ref = peerIpAddress_;
1490     if (ref instanceof java.lang.String) {
1491       return (java.lang.String) ref;
1492     } else {
1493       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1494       java.lang.String s = bs.toStringUtf8();
1495       peerIpAddress_ = s;
1496       return s;
1497     }
1498   }
1499   /**
1500    *
1501    *
1502    * <pre>
1503    * IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
1504    * </pre>
1505    *
1506    * <code>optional string peer_ip_address = 207735769;</code>
1507    *
1508    * @return The bytes for peerIpAddress.
1509    */
1510   @java.lang.Override
getPeerIpAddressBytes()1511   public com.google.protobuf.ByteString getPeerIpAddressBytes() {
1512     java.lang.Object ref = peerIpAddress_;
1513     if (ref instanceof java.lang.String) {
1514       com.google.protobuf.ByteString b =
1515           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1516       peerIpAddress_ = b;
1517       return b;
1518     } else {
1519       return (com.google.protobuf.ByteString) ref;
1520     }
1521   }
1522 
1523   public static final int PEER_IPV6_NEXTHOP_ADDRESS_FIELD_NUMBER = 491486608;
1524 
1525   @SuppressWarnings("serial")
1526   private volatile java.lang.Object peerIpv6NexthopAddress_ = "";
1527   /**
1528    *
1529    *
1530    * <pre>
1531    * IPv6 address of the BGP interface outside Google Cloud Platform.
1532    * </pre>
1533    *
1534    * <code>optional string peer_ipv6_nexthop_address = 491486608;</code>
1535    *
1536    * @return Whether the peerIpv6NexthopAddress field is set.
1537    */
1538   @java.lang.Override
hasPeerIpv6NexthopAddress()1539   public boolean hasPeerIpv6NexthopAddress() {
1540     return ((bitField0_ & 0x00002000) != 0);
1541   }
1542   /**
1543    *
1544    *
1545    * <pre>
1546    * IPv6 address of the BGP interface outside Google Cloud Platform.
1547    * </pre>
1548    *
1549    * <code>optional string peer_ipv6_nexthop_address = 491486608;</code>
1550    *
1551    * @return The peerIpv6NexthopAddress.
1552    */
1553   @java.lang.Override
getPeerIpv6NexthopAddress()1554   public java.lang.String getPeerIpv6NexthopAddress() {
1555     java.lang.Object ref = peerIpv6NexthopAddress_;
1556     if (ref instanceof java.lang.String) {
1557       return (java.lang.String) ref;
1558     } else {
1559       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1560       java.lang.String s = bs.toStringUtf8();
1561       peerIpv6NexthopAddress_ = s;
1562       return s;
1563     }
1564   }
1565   /**
1566    *
1567    *
1568    * <pre>
1569    * IPv6 address of the BGP interface outside Google Cloud Platform.
1570    * </pre>
1571    *
1572    * <code>optional string peer_ipv6_nexthop_address = 491486608;</code>
1573    *
1574    * @return The bytes for peerIpv6NexthopAddress.
1575    */
1576   @java.lang.Override
getPeerIpv6NexthopAddressBytes()1577   public com.google.protobuf.ByteString getPeerIpv6NexthopAddressBytes() {
1578     java.lang.Object ref = peerIpv6NexthopAddress_;
1579     if (ref instanceof java.lang.String) {
1580       com.google.protobuf.ByteString b =
1581           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1582       peerIpv6NexthopAddress_ = b;
1583       return b;
1584     } else {
1585       return (com.google.protobuf.ByteString) ref;
1586     }
1587   }
1588 
1589   public static final int ROUTER_APPLIANCE_INSTANCE_FIELD_NUMBER = 468312989;
1590 
1591   @SuppressWarnings("serial")
1592   private volatile java.lang.Object routerApplianceInstance_ = "";
1593   /**
1594    *
1595    *
1596    * <pre>
1597    * URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.
1598    * </pre>
1599    *
1600    * <code>optional string router_appliance_instance = 468312989;</code>
1601    *
1602    * @return Whether the routerApplianceInstance field is set.
1603    */
1604   @java.lang.Override
hasRouterApplianceInstance()1605   public boolean hasRouterApplianceInstance() {
1606     return ((bitField0_ & 0x00004000) != 0);
1607   }
1608   /**
1609    *
1610    *
1611    * <pre>
1612    * URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.
1613    * </pre>
1614    *
1615    * <code>optional string router_appliance_instance = 468312989;</code>
1616    *
1617    * @return The routerApplianceInstance.
1618    */
1619   @java.lang.Override
getRouterApplianceInstance()1620   public java.lang.String getRouterApplianceInstance() {
1621     java.lang.Object ref = routerApplianceInstance_;
1622     if (ref instanceof java.lang.String) {
1623       return (java.lang.String) ref;
1624     } else {
1625       com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
1626       java.lang.String s = bs.toStringUtf8();
1627       routerApplianceInstance_ = s;
1628       return s;
1629     }
1630   }
1631   /**
1632    *
1633    *
1634    * <pre>
1635    * URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.
1636    * </pre>
1637    *
1638    * <code>optional string router_appliance_instance = 468312989;</code>
1639    *
1640    * @return The bytes for routerApplianceInstance.
1641    */
1642   @java.lang.Override
getRouterApplianceInstanceBytes()1643   public com.google.protobuf.ByteString getRouterApplianceInstanceBytes() {
1644     java.lang.Object ref = routerApplianceInstance_;
1645     if (ref instanceof java.lang.String) {
1646       com.google.protobuf.ByteString b =
1647           com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
1648       routerApplianceInstance_ = b;
1649       return b;
1650     } else {
1651       return (com.google.protobuf.ByteString) ref;
1652     }
1653   }
1654 
1655   private byte memoizedIsInitialized = -1;
1656 
1657   @java.lang.Override
isInitialized()1658   public final boolean isInitialized() {
1659     byte isInitialized = memoizedIsInitialized;
1660     if (isInitialized == 1) return true;
1661     if (isInitialized == 0) return false;
1662 
1663     memoizedIsInitialized = 1;
1664     return true;
1665   }
1666 
1667   @java.lang.Override
writeTo(com.google.protobuf.CodedOutputStream output)1668   public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
1669     if (((bitField0_ & 0x00000004) != 0)) {
1670       output.writeMessage(97440, getBfd());
1671     }
1672     if (((bitField0_ & 0x00000400) != 0)) {
1673       com.google.protobuf.GeneratedMessageV3.writeString(output, 3373707, name_);
1674     }
1675     for (int i = 0; i < advertisedGroups_.size(); i++) {
1676       com.google.protobuf.GeneratedMessageV3.writeString(
1677           output, 21065526, advertisedGroups_.getRaw(i));
1678     }
1679     if (((bitField0_ & 0x00000080) != 0)) {
1680       com.google.protobuf.GeneratedMessageV3.writeString(output, 27968211, ipv6NexthopAddress_);
1681     }
1682     for (int i = 0; i < advertisedIpRanges_.size(); i++) {
1683       output.writeMessage(35449932, advertisedIpRanges_.get(i));
1684     }
1685     if (((bitField0_ & 0x00000800) != 0)) {
1686       output.writeUInt32(69573151, peerAsn_);
1687     }
1688     if (((bitField0_ & 0x00000100) != 0)) {
1689       com.google.protobuf.GeneratedMessageV3.writeString(output, 173703606, managementType_);
1690     }
1691     if (((bitField0_ & 0x00000010) != 0)) {
1692       output.writeBool(181467939, enableIpv6_);
1693     }
1694     if (((bitField0_ & 0x00000002) != 0)) {
1695       output.writeUInt32(186486332, advertisedRoutePriority_);
1696     }
1697     if (((bitField0_ & 0x00001000) != 0)) {
1698       com.google.protobuf.GeneratedMessageV3.writeString(output, 207735769, peerIpAddress_);
1699     }
1700     if (((bitField0_ & 0x00000200) != 0)) {
1701       com.google.protobuf.GeneratedMessageV3.writeString(
1702           output, 281075345, md5AuthenticationKeyName_);
1703     }
1704     if (((bitField0_ & 0x00000008) != 0)) {
1705       com.google.protobuf.GeneratedMessageV3.writeString(output, 311764355, enable_);
1706     }
1707     if (((bitField0_ & 0x00000001) != 0)) {
1708       com.google.protobuf.GeneratedMessageV3.writeString(output, 312134331, advertiseMode_);
1709     }
1710     if (((bitField0_ & 0x00000040) != 0)) {
1711       com.google.protobuf.GeneratedMessageV3.writeString(output, 406272220, ipAddress_);
1712     }
1713     if (((bitField0_ & 0x00000020) != 0)) {
1714       com.google.protobuf.GeneratedMessageV3.writeString(output, 437854673, interfaceName_);
1715     }
1716     if (((bitField0_ & 0x00004000) != 0)) {
1717       com.google.protobuf.GeneratedMessageV3.writeString(
1718           output, 468312989, routerApplianceInstance_);
1719     }
1720     if (((bitField0_ & 0x00002000) != 0)) {
1721       com.google.protobuf.GeneratedMessageV3.writeString(
1722           output, 491486608, peerIpv6NexthopAddress_);
1723     }
1724     getUnknownFields().writeTo(output);
1725   }
1726 
1727   @java.lang.Override
getSerializedSize()1728   public int getSerializedSize() {
1729     int size = memoizedSize;
1730     if (size != -1) return size;
1731 
1732     size = 0;
1733     if (((bitField0_ & 0x00000004) != 0)) {
1734       size += com.google.protobuf.CodedOutputStream.computeMessageSize(97440, getBfd());
1735     }
1736     if (((bitField0_ & 0x00000400) != 0)) {
1737       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3373707, name_);
1738     }
1739     {
1740       int dataSize = 0;
1741       for (int i = 0; i < advertisedGroups_.size(); i++) {
1742         dataSize += computeStringSizeNoTag(advertisedGroups_.getRaw(i));
1743       }
1744       size += dataSize;
1745       size += 4 * getAdvertisedGroupsList().size();
1746     }
1747     if (((bitField0_ & 0x00000080) != 0)) {
1748       size +=
1749           com.google.protobuf.GeneratedMessageV3.computeStringSize(27968211, ipv6NexthopAddress_);
1750     }
1751     for (int i = 0; i < advertisedIpRanges_.size(); i++) {
1752       size +=
1753           com.google.protobuf.CodedOutputStream.computeMessageSize(
1754               35449932, advertisedIpRanges_.get(i));
1755     }
1756     if (((bitField0_ & 0x00000800) != 0)) {
1757       size += com.google.protobuf.CodedOutputStream.computeUInt32Size(69573151, peerAsn_);
1758     }
1759     if (((bitField0_ & 0x00000100) != 0)) {
1760       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(173703606, managementType_);
1761     }
1762     if (((bitField0_ & 0x00000010) != 0)) {
1763       size += com.google.protobuf.CodedOutputStream.computeBoolSize(181467939, enableIpv6_);
1764     }
1765     if (((bitField0_ & 0x00000002) != 0)) {
1766       size +=
1767           com.google.protobuf.CodedOutputStream.computeUInt32Size(
1768               186486332, advertisedRoutePriority_);
1769     }
1770     if (((bitField0_ & 0x00001000) != 0)) {
1771       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(207735769, peerIpAddress_);
1772     }
1773     if (((bitField0_ & 0x00000200) != 0)) {
1774       size +=
1775           com.google.protobuf.GeneratedMessageV3.computeStringSize(
1776               281075345, md5AuthenticationKeyName_);
1777     }
1778     if (((bitField0_ & 0x00000008) != 0)) {
1779       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(311764355, enable_);
1780     }
1781     if (((bitField0_ & 0x00000001) != 0)) {
1782       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(312134331, advertiseMode_);
1783     }
1784     if (((bitField0_ & 0x00000040) != 0)) {
1785       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(406272220, ipAddress_);
1786     }
1787     if (((bitField0_ & 0x00000020) != 0)) {
1788       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(437854673, interfaceName_);
1789     }
1790     if (((bitField0_ & 0x00004000) != 0)) {
1791       size +=
1792           com.google.protobuf.GeneratedMessageV3.computeStringSize(
1793               468312989, routerApplianceInstance_);
1794     }
1795     if (((bitField0_ & 0x00002000) != 0)) {
1796       size +=
1797           com.google.protobuf.GeneratedMessageV3.computeStringSize(
1798               491486608, peerIpv6NexthopAddress_);
1799     }
1800     size += getUnknownFields().getSerializedSize();
1801     memoizedSize = size;
1802     return size;
1803   }
1804 
1805   @java.lang.Override
equals(final java.lang.Object obj)1806   public boolean equals(final java.lang.Object obj) {
1807     if (obj == this) {
1808       return true;
1809     }
1810     if (!(obj instanceof com.google.cloud.compute.v1.RouterBgpPeer)) {
1811       return super.equals(obj);
1812     }
1813     com.google.cloud.compute.v1.RouterBgpPeer other =
1814         (com.google.cloud.compute.v1.RouterBgpPeer) obj;
1815 
1816     if (hasAdvertiseMode() != other.hasAdvertiseMode()) return false;
1817     if (hasAdvertiseMode()) {
1818       if (!getAdvertiseMode().equals(other.getAdvertiseMode())) return false;
1819     }
1820     if (!getAdvertisedGroupsList().equals(other.getAdvertisedGroupsList())) return false;
1821     if (!getAdvertisedIpRangesList().equals(other.getAdvertisedIpRangesList())) return false;
1822     if (hasAdvertisedRoutePriority() != other.hasAdvertisedRoutePriority()) return false;
1823     if (hasAdvertisedRoutePriority()) {
1824       if (getAdvertisedRoutePriority() != other.getAdvertisedRoutePriority()) return false;
1825     }
1826     if (hasBfd() != other.hasBfd()) return false;
1827     if (hasBfd()) {
1828       if (!getBfd().equals(other.getBfd())) return false;
1829     }
1830     if (hasEnable() != other.hasEnable()) return false;
1831     if (hasEnable()) {
1832       if (!getEnable().equals(other.getEnable())) return false;
1833     }
1834     if (hasEnableIpv6() != other.hasEnableIpv6()) return false;
1835     if (hasEnableIpv6()) {
1836       if (getEnableIpv6() != other.getEnableIpv6()) return false;
1837     }
1838     if (hasInterfaceName() != other.hasInterfaceName()) return false;
1839     if (hasInterfaceName()) {
1840       if (!getInterfaceName().equals(other.getInterfaceName())) return false;
1841     }
1842     if (hasIpAddress() != other.hasIpAddress()) return false;
1843     if (hasIpAddress()) {
1844       if (!getIpAddress().equals(other.getIpAddress())) return false;
1845     }
1846     if (hasIpv6NexthopAddress() != other.hasIpv6NexthopAddress()) return false;
1847     if (hasIpv6NexthopAddress()) {
1848       if (!getIpv6NexthopAddress().equals(other.getIpv6NexthopAddress())) return false;
1849     }
1850     if (hasManagementType() != other.hasManagementType()) return false;
1851     if (hasManagementType()) {
1852       if (!getManagementType().equals(other.getManagementType())) return false;
1853     }
1854     if (hasMd5AuthenticationKeyName() != other.hasMd5AuthenticationKeyName()) return false;
1855     if (hasMd5AuthenticationKeyName()) {
1856       if (!getMd5AuthenticationKeyName().equals(other.getMd5AuthenticationKeyName())) return false;
1857     }
1858     if (hasName() != other.hasName()) return false;
1859     if (hasName()) {
1860       if (!getName().equals(other.getName())) return false;
1861     }
1862     if (hasPeerAsn() != other.hasPeerAsn()) return false;
1863     if (hasPeerAsn()) {
1864       if (getPeerAsn() != other.getPeerAsn()) return false;
1865     }
1866     if (hasPeerIpAddress() != other.hasPeerIpAddress()) return false;
1867     if (hasPeerIpAddress()) {
1868       if (!getPeerIpAddress().equals(other.getPeerIpAddress())) return false;
1869     }
1870     if (hasPeerIpv6NexthopAddress() != other.hasPeerIpv6NexthopAddress()) return false;
1871     if (hasPeerIpv6NexthopAddress()) {
1872       if (!getPeerIpv6NexthopAddress().equals(other.getPeerIpv6NexthopAddress())) return false;
1873     }
1874     if (hasRouterApplianceInstance() != other.hasRouterApplianceInstance()) return false;
1875     if (hasRouterApplianceInstance()) {
1876       if (!getRouterApplianceInstance().equals(other.getRouterApplianceInstance())) return false;
1877     }
1878     if (!getUnknownFields().equals(other.getUnknownFields())) return false;
1879     return true;
1880   }
1881 
1882   @java.lang.Override
hashCode()1883   public int hashCode() {
1884     if (memoizedHashCode != 0) {
1885       return memoizedHashCode;
1886     }
1887     int hash = 41;
1888     hash = (19 * hash) + getDescriptor().hashCode();
1889     if (hasAdvertiseMode()) {
1890       hash = (37 * hash) + ADVERTISE_MODE_FIELD_NUMBER;
1891       hash = (53 * hash) + getAdvertiseMode().hashCode();
1892     }
1893     if (getAdvertisedGroupsCount() > 0) {
1894       hash = (37 * hash) + ADVERTISED_GROUPS_FIELD_NUMBER;
1895       hash = (53 * hash) + getAdvertisedGroupsList().hashCode();
1896     }
1897     if (getAdvertisedIpRangesCount() > 0) {
1898       hash = (37 * hash) + ADVERTISED_IP_RANGES_FIELD_NUMBER;
1899       hash = (53 * hash) + getAdvertisedIpRangesList().hashCode();
1900     }
1901     if (hasAdvertisedRoutePriority()) {
1902       hash = (37 * hash) + ADVERTISED_ROUTE_PRIORITY_FIELD_NUMBER;
1903       hash = (53 * hash) + getAdvertisedRoutePriority();
1904     }
1905     if (hasBfd()) {
1906       hash = (37 * hash) + BFD_FIELD_NUMBER;
1907       hash = (53 * hash) + getBfd().hashCode();
1908     }
1909     if (hasEnable()) {
1910       hash = (37 * hash) + ENABLE_FIELD_NUMBER;
1911       hash = (53 * hash) + getEnable().hashCode();
1912     }
1913     if (hasEnableIpv6()) {
1914       hash = (37 * hash) + ENABLE_IPV6_FIELD_NUMBER;
1915       hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableIpv6());
1916     }
1917     if (hasInterfaceName()) {
1918       hash = (37 * hash) + INTERFACE_NAME_FIELD_NUMBER;
1919       hash = (53 * hash) + getInterfaceName().hashCode();
1920     }
1921     if (hasIpAddress()) {
1922       hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER;
1923       hash = (53 * hash) + getIpAddress().hashCode();
1924     }
1925     if (hasIpv6NexthopAddress()) {
1926       hash = (37 * hash) + IPV6_NEXTHOP_ADDRESS_FIELD_NUMBER;
1927       hash = (53 * hash) + getIpv6NexthopAddress().hashCode();
1928     }
1929     if (hasManagementType()) {
1930       hash = (37 * hash) + MANAGEMENT_TYPE_FIELD_NUMBER;
1931       hash = (53 * hash) + getManagementType().hashCode();
1932     }
1933     if (hasMd5AuthenticationKeyName()) {
1934       hash = (37 * hash) + MD5_AUTHENTICATION_KEY_NAME_FIELD_NUMBER;
1935       hash = (53 * hash) + getMd5AuthenticationKeyName().hashCode();
1936     }
1937     if (hasName()) {
1938       hash = (37 * hash) + NAME_FIELD_NUMBER;
1939       hash = (53 * hash) + getName().hashCode();
1940     }
1941     if (hasPeerAsn()) {
1942       hash = (37 * hash) + PEER_ASN_FIELD_NUMBER;
1943       hash = (53 * hash) + getPeerAsn();
1944     }
1945     if (hasPeerIpAddress()) {
1946       hash = (37 * hash) + PEER_IP_ADDRESS_FIELD_NUMBER;
1947       hash = (53 * hash) + getPeerIpAddress().hashCode();
1948     }
1949     if (hasPeerIpv6NexthopAddress()) {
1950       hash = (37 * hash) + PEER_IPV6_NEXTHOP_ADDRESS_FIELD_NUMBER;
1951       hash = (53 * hash) + getPeerIpv6NexthopAddress().hashCode();
1952     }
1953     if (hasRouterApplianceInstance()) {
1954       hash = (37 * hash) + ROUTER_APPLIANCE_INSTANCE_FIELD_NUMBER;
1955       hash = (53 * hash) + getRouterApplianceInstance().hashCode();
1956     }
1957     hash = (29 * hash) + getUnknownFields().hashCode();
1958     memoizedHashCode = hash;
1959     return hash;
1960   }
1961 
parseFrom(java.nio.ByteBuffer data)1962   public static com.google.cloud.compute.v1.RouterBgpPeer parseFrom(java.nio.ByteBuffer data)
1963       throws com.google.protobuf.InvalidProtocolBufferException {
1964     return PARSER.parseFrom(data);
1965   }
1966 
parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1967   public static com.google.cloud.compute.v1.RouterBgpPeer parseFrom(
1968       java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1969       throws com.google.protobuf.InvalidProtocolBufferException {
1970     return PARSER.parseFrom(data, extensionRegistry);
1971   }
1972 
parseFrom( com.google.protobuf.ByteString data)1973   public static com.google.cloud.compute.v1.RouterBgpPeer parseFrom(
1974       com.google.protobuf.ByteString data)
1975       throws com.google.protobuf.InvalidProtocolBufferException {
1976     return PARSER.parseFrom(data);
1977   }
1978 
parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1979   public static com.google.cloud.compute.v1.RouterBgpPeer parseFrom(
1980       com.google.protobuf.ByteString data,
1981       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1982       throws com.google.protobuf.InvalidProtocolBufferException {
1983     return PARSER.parseFrom(data, extensionRegistry);
1984   }
1985 
parseFrom(byte[] data)1986   public static com.google.cloud.compute.v1.RouterBgpPeer parseFrom(byte[] data)
1987       throws com.google.protobuf.InvalidProtocolBufferException {
1988     return PARSER.parseFrom(data);
1989   }
1990 
parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1991   public static com.google.cloud.compute.v1.RouterBgpPeer parseFrom(
1992       byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1993       throws com.google.protobuf.InvalidProtocolBufferException {
1994     return PARSER.parseFrom(data, extensionRegistry);
1995   }
1996 
parseFrom(java.io.InputStream input)1997   public static com.google.cloud.compute.v1.RouterBgpPeer parseFrom(java.io.InputStream input)
1998       throws java.io.IOException {
1999     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
2000   }
2001 
parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2002   public static com.google.cloud.compute.v1.RouterBgpPeer parseFrom(
2003       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2004       throws java.io.IOException {
2005     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
2006         PARSER, input, extensionRegistry);
2007   }
2008 
parseDelimitedFrom( java.io.InputStream input)2009   public static com.google.cloud.compute.v1.RouterBgpPeer parseDelimitedFrom(
2010       java.io.InputStream input) throws java.io.IOException {
2011     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
2012   }
2013 
parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2014   public static com.google.cloud.compute.v1.RouterBgpPeer parseDelimitedFrom(
2015       java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2016       throws java.io.IOException {
2017     return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
2018         PARSER, input, extensionRegistry);
2019   }
2020 
parseFrom( com.google.protobuf.CodedInputStream input)2021   public static com.google.cloud.compute.v1.RouterBgpPeer parseFrom(
2022       com.google.protobuf.CodedInputStream input) throws java.io.IOException {
2023     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
2024   }
2025 
parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2026   public static com.google.cloud.compute.v1.RouterBgpPeer parseFrom(
2027       com.google.protobuf.CodedInputStream input,
2028       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2029       throws java.io.IOException {
2030     return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
2031         PARSER, input, extensionRegistry);
2032   }
2033 
2034   @java.lang.Override
newBuilderForType()2035   public Builder newBuilderForType() {
2036     return newBuilder();
2037   }
2038 
newBuilder()2039   public static Builder newBuilder() {
2040     return DEFAULT_INSTANCE.toBuilder();
2041   }
2042 
newBuilder(com.google.cloud.compute.v1.RouterBgpPeer prototype)2043   public static Builder newBuilder(com.google.cloud.compute.v1.RouterBgpPeer prototype) {
2044     return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
2045   }
2046 
2047   @java.lang.Override
toBuilder()2048   public Builder toBuilder() {
2049     return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
2050   }
2051 
2052   @java.lang.Override
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)2053   protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
2054     Builder builder = new Builder(parent);
2055     return builder;
2056   }
2057   /**
2058    *
2059    *
2060    * <pre>
2061    * </pre>
2062    *
2063    * Protobuf type {@code google.cloud.compute.v1.RouterBgpPeer}
2064    */
2065   public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
2066       implements
2067       // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.RouterBgpPeer)
2068       com.google.cloud.compute.v1.RouterBgpPeerOrBuilder {
getDescriptor()2069     public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
2070       return com.google.cloud.compute.v1.Compute
2071           .internal_static_google_cloud_compute_v1_RouterBgpPeer_descriptor;
2072     }
2073 
2074     @java.lang.Override
2075     protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()2076         internalGetFieldAccessorTable() {
2077       return com.google.cloud.compute.v1.Compute
2078           .internal_static_google_cloud_compute_v1_RouterBgpPeer_fieldAccessorTable
2079           .ensureFieldAccessorsInitialized(
2080               com.google.cloud.compute.v1.RouterBgpPeer.class,
2081               com.google.cloud.compute.v1.RouterBgpPeer.Builder.class);
2082     }
2083 
2084     // Construct using com.google.cloud.compute.v1.RouterBgpPeer.newBuilder()
Builder()2085     private Builder() {
2086       maybeForceBuilderInitialization();
2087     }
2088 
Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)2089     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
2090       super(parent);
2091       maybeForceBuilderInitialization();
2092     }
2093 
maybeForceBuilderInitialization()2094     private void maybeForceBuilderInitialization() {
2095       if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
2096         getAdvertisedIpRangesFieldBuilder();
2097         getBfdFieldBuilder();
2098       }
2099     }
2100 
2101     @java.lang.Override
clear()2102     public Builder clear() {
2103       super.clear();
2104       bitField0_ = 0;
2105       advertiseMode_ = "";
2106       advertisedGroups_ = com.google.protobuf.LazyStringArrayList.EMPTY;
2107       bitField0_ = (bitField0_ & ~0x00000002);
2108       if (advertisedIpRangesBuilder_ == null) {
2109         advertisedIpRanges_ = java.util.Collections.emptyList();
2110       } else {
2111         advertisedIpRanges_ = null;
2112         advertisedIpRangesBuilder_.clear();
2113       }
2114       bitField0_ = (bitField0_ & ~0x00000004);
2115       advertisedRoutePriority_ = 0;
2116       bfd_ = null;
2117       if (bfdBuilder_ != null) {
2118         bfdBuilder_.dispose();
2119         bfdBuilder_ = null;
2120       }
2121       enable_ = "";
2122       enableIpv6_ = false;
2123       interfaceName_ = "";
2124       ipAddress_ = "";
2125       ipv6NexthopAddress_ = "";
2126       managementType_ = "";
2127       md5AuthenticationKeyName_ = "";
2128       name_ = "";
2129       peerAsn_ = 0;
2130       peerIpAddress_ = "";
2131       peerIpv6NexthopAddress_ = "";
2132       routerApplianceInstance_ = "";
2133       return this;
2134     }
2135 
2136     @java.lang.Override
getDescriptorForType()2137     public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
2138       return com.google.cloud.compute.v1.Compute
2139           .internal_static_google_cloud_compute_v1_RouterBgpPeer_descriptor;
2140     }
2141 
2142     @java.lang.Override
getDefaultInstanceForType()2143     public com.google.cloud.compute.v1.RouterBgpPeer getDefaultInstanceForType() {
2144       return com.google.cloud.compute.v1.RouterBgpPeer.getDefaultInstance();
2145     }
2146 
2147     @java.lang.Override
build()2148     public com.google.cloud.compute.v1.RouterBgpPeer build() {
2149       com.google.cloud.compute.v1.RouterBgpPeer result = buildPartial();
2150       if (!result.isInitialized()) {
2151         throw newUninitializedMessageException(result);
2152       }
2153       return result;
2154     }
2155 
2156     @java.lang.Override
buildPartial()2157     public com.google.cloud.compute.v1.RouterBgpPeer buildPartial() {
2158       com.google.cloud.compute.v1.RouterBgpPeer result =
2159           new com.google.cloud.compute.v1.RouterBgpPeer(this);
2160       buildPartialRepeatedFields(result);
2161       if (bitField0_ != 0) {
2162         buildPartial0(result);
2163       }
2164       onBuilt();
2165       return result;
2166     }
2167 
buildPartialRepeatedFields(com.google.cloud.compute.v1.RouterBgpPeer result)2168     private void buildPartialRepeatedFields(com.google.cloud.compute.v1.RouterBgpPeer result) {
2169       if (((bitField0_ & 0x00000002) != 0)) {
2170         advertisedGroups_ = advertisedGroups_.getUnmodifiableView();
2171         bitField0_ = (bitField0_ & ~0x00000002);
2172       }
2173       result.advertisedGroups_ = advertisedGroups_;
2174       if (advertisedIpRangesBuilder_ == null) {
2175         if (((bitField0_ & 0x00000004) != 0)) {
2176           advertisedIpRanges_ = java.util.Collections.unmodifiableList(advertisedIpRanges_);
2177           bitField0_ = (bitField0_ & ~0x00000004);
2178         }
2179         result.advertisedIpRanges_ = advertisedIpRanges_;
2180       } else {
2181         result.advertisedIpRanges_ = advertisedIpRangesBuilder_.build();
2182       }
2183     }
2184 
buildPartial0(com.google.cloud.compute.v1.RouterBgpPeer result)2185     private void buildPartial0(com.google.cloud.compute.v1.RouterBgpPeer result) {
2186       int from_bitField0_ = bitField0_;
2187       int to_bitField0_ = 0;
2188       if (((from_bitField0_ & 0x00000001) != 0)) {
2189         result.advertiseMode_ = advertiseMode_;
2190         to_bitField0_ |= 0x00000001;
2191       }
2192       if (((from_bitField0_ & 0x00000008) != 0)) {
2193         result.advertisedRoutePriority_ = advertisedRoutePriority_;
2194         to_bitField0_ |= 0x00000002;
2195       }
2196       if (((from_bitField0_ & 0x00000010) != 0)) {
2197         result.bfd_ = bfdBuilder_ == null ? bfd_ : bfdBuilder_.build();
2198         to_bitField0_ |= 0x00000004;
2199       }
2200       if (((from_bitField0_ & 0x00000020) != 0)) {
2201         result.enable_ = enable_;
2202         to_bitField0_ |= 0x00000008;
2203       }
2204       if (((from_bitField0_ & 0x00000040) != 0)) {
2205         result.enableIpv6_ = enableIpv6_;
2206         to_bitField0_ |= 0x00000010;
2207       }
2208       if (((from_bitField0_ & 0x00000080) != 0)) {
2209         result.interfaceName_ = interfaceName_;
2210         to_bitField0_ |= 0x00000020;
2211       }
2212       if (((from_bitField0_ & 0x00000100) != 0)) {
2213         result.ipAddress_ = ipAddress_;
2214         to_bitField0_ |= 0x00000040;
2215       }
2216       if (((from_bitField0_ & 0x00000200) != 0)) {
2217         result.ipv6NexthopAddress_ = ipv6NexthopAddress_;
2218         to_bitField0_ |= 0x00000080;
2219       }
2220       if (((from_bitField0_ & 0x00000400) != 0)) {
2221         result.managementType_ = managementType_;
2222         to_bitField0_ |= 0x00000100;
2223       }
2224       if (((from_bitField0_ & 0x00000800) != 0)) {
2225         result.md5AuthenticationKeyName_ = md5AuthenticationKeyName_;
2226         to_bitField0_ |= 0x00000200;
2227       }
2228       if (((from_bitField0_ & 0x00001000) != 0)) {
2229         result.name_ = name_;
2230         to_bitField0_ |= 0x00000400;
2231       }
2232       if (((from_bitField0_ & 0x00002000) != 0)) {
2233         result.peerAsn_ = peerAsn_;
2234         to_bitField0_ |= 0x00000800;
2235       }
2236       if (((from_bitField0_ & 0x00004000) != 0)) {
2237         result.peerIpAddress_ = peerIpAddress_;
2238         to_bitField0_ |= 0x00001000;
2239       }
2240       if (((from_bitField0_ & 0x00008000) != 0)) {
2241         result.peerIpv6NexthopAddress_ = peerIpv6NexthopAddress_;
2242         to_bitField0_ |= 0x00002000;
2243       }
2244       if (((from_bitField0_ & 0x00010000) != 0)) {
2245         result.routerApplianceInstance_ = routerApplianceInstance_;
2246         to_bitField0_ |= 0x00004000;
2247       }
2248       result.bitField0_ |= to_bitField0_;
2249     }
2250 
2251     @java.lang.Override
clone()2252     public Builder clone() {
2253       return super.clone();
2254     }
2255 
2256     @java.lang.Override
setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)2257     public Builder setField(
2258         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
2259       return super.setField(field, value);
2260     }
2261 
2262     @java.lang.Override
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)2263     public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
2264       return super.clearField(field);
2265     }
2266 
2267     @java.lang.Override
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)2268     public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
2269       return super.clearOneof(oneof);
2270     }
2271 
2272     @java.lang.Override
setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)2273     public Builder setRepeatedField(
2274         com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
2275       return super.setRepeatedField(field, index, value);
2276     }
2277 
2278     @java.lang.Override
addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)2279     public Builder addRepeatedField(
2280         com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
2281       return super.addRepeatedField(field, value);
2282     }
2283 
2284     @java.lang.Override
mergeFrom(com.google.protobuf.Message other)2285     public Builder mergeFrom(com.google.protobuf.Message other) {
2286       if (other instanceof com.google.cloud.compute.v1.RouterBgpPeer) {
2287         return mergeFrom((com.google.cloud.compute.v1.RouterBgpPeer) other);
2288       } else {
2289         super.mergeFrom(other);
2290         return this;
2291       }
2292     }
2293 
mergeFrom(com.google.cloud.compute.v1.RouterBgpPeer other)2294     public Builder mergeFrom(com.google.cloud.compute.v1.RouterBgpPeer other) {
2295       if (other == com.google.cloud.compute.v1.RouterBgpPeer.getDefaultInstance()) return this;
2296       if (other.hasAdvertiseMode()) {
2297         advertiseMode_ = other.advertiseMode_;
2298         bitField0_ |= 0x00000001;
2299         onChanged();
2300       }
2301       if (!other.advertisedGroups_.isEmpty()) {
2302         if (advertisedGroups_.isEmpty()) {
2303           advertisedGroups_ = other.advertisedGroups_;
2304           bitField0_ = (bitField0_ & ~0x00000002);
2305         } else {
2306           ensureAdvertisedGroupsIsMutable();
2307           advertisedGroups_.addAll(other.advertisedGroups_);
2308         }
2309         onChanged();
2310       }
2311       if (advertisedIpRangesBuilder_ == null) {
2312         if (!other.advertisedIpRanges_.isEmpty()) {
2313           if (advertisedIpRanges_.isEmpty()) {
2314             advertisedIpRanges_ = other.advertisedIpRanges_;
2315             bitField0_ = (bitField0_ & ~0x00000004);
2316           } else {
2317             ensureAdvertisedIpRangesIsMutable();
2318             advertisedIpRanges_.addAll(other.advertisedIpRanges_);
2319           }
2320           onChanged();
2321         }
2322       } else {
2323         if (!other.advertisedIpRanges_.isEmpty()) {
2324           if (advertisedIpRangesBuilder_.isEmpty()) {
2325             advertisedIpRangesBuilder_.dispose();
2326             advertisedIpRangesBuilder_ = null;
2327             advertisedIpRanges_ = other.advertisedIpRanges_;
2328             bitField0_ = (bitField0_ & ~0x00000004);
2329             advertisedIpRangesBuilder_ =
2330                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
2331                     ? getAdvertisedIpRangesFieldBuilder()
2332                     : null;
2333           } else {
2334             advertisedIpRangesBuilder_.addAllMessages(other.advertisedIpRanges_);
2335           }
2336         }
2337       }
2338       if (other.hasAdvertisedRoutePriority()) {
2339         setAdvertisedRoutePriority(other.getAdvertisedRoutePriority());
2340       }
2341       if (other.hasBfd()) {
2342         mergeBfd(other.getBfd());
2343       }
2344       if (other.hasEnable()) {
2345         enable_ = other.enable_;
2346         bitField0_ |= 0x00000020;
2347         onChanged();
2348       }
2349       if (other.hasEnableIpv6()) {
2350         setEnableIpv6(other.getEnableIpv6());
2351       }
2352       if (other.hasInterfaceName()) {
2353         interfaceName_ = other.interfaceName_;
2354         bitField0_ |= 0x00000080;
2355         onChanged();
2356       }
2357       if (other.hasIpAddress()) {
2358         ipAddress_ = other.ipAddress_;
2359         bitField0_ |= 0x00000100;
2360         onChanged();
2361       }
2362       if (other.hasIpv6NexthopAddress()) {
2363         ipv6NexthopAddress_ = other.ipv6NexthopAddress_;
2364         bitField0_ |= 0x00000200;
2365         onChanged();
2366       }
2367       if (other.hasManagementType()) {
2368         managementType_ = other.managementType_;
2369         bitField0_ |= 0x00000400;
2370         onChanged();
2371       }
2372       if (other.hasMd5AuthenticationKeyName()) {
2373         md5AuthenticationKeyName_ = other.md5AuthenticationKeyName_;
2374         bitField0_ |= 0x00000800;
2375         onChanged();
2376       }
2377       if (other.hasName()) {
2378         name_ = other.name_;
2379         bitField0_ |= 0x00001000;
2380         onChanged();
2381       }
2382       if (other.hasPeerAsn()) {
2383         setPeerAsn(other.getPeerAsn());
2384       }
2385       if (other.hasPeerIpAddress()) {
2386         peerIpAddress_ = other.peerIpAddress_;
2387         bitField0_ |= 0x00004000;
2388         onChanged();
2389       }
2390       if (other.hasPeerIpv6NexthopAddress()) {
2391         peerIpv6NexthopAddress_ = other.peerIpv6NexthopAddress_;
2392         bitField0_ |= 0x00008000;
2393         onChanged();
2394       }
2395       if (other.hasRouterApplianceInstance()) {
2396         routerApplianceInstance_ = other.routerApplianceInstance_;
2397         bitField0_ |= 0x00010000;
2398         onChanged();
2399       }
2400       this.mergeUnknownFields(other.getUnknownFields());
2401       onChanged();
2402       return this;
2403     }
2404 
2405     @java.lang.Override
isInitialized()2406     public final boolean isInitialized() {
2407       return true;
2408     }
2409 
2410     @java.lang.Override
mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)2411     public Builder mergeFrom(
2412         com.google.protobuf.CodedInputStream input,
2413         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
2414         throws java.io.IOException {
2415       if (extensionRegistry == null) {
2416         throw new java.lang.NullPointerException();
2417       }
2418       try {
2419         boolean done = false;
2420         while (!done) {
2421           int tag = input.readTag();
2422           switch (tag) {
2423             case 0:
2424               done = true;
2425               break;
2426             case 779522:
2427               {
2428                 input.readMessage(getBfdFieldBuilder().getBuilder(), extensionRegistry);
2429                 bitField0_ |= 0x00000010;
2430                 break;
2431               } // case 779522
2432             case 26989658:
2433               {
2434                 name_ = input.readStringRequireUtf8();
2435                 bitField0_ |= 0x00001000;
2436                 break;
2437               } // case 26989658
2438             case 168524210:
2439               {
2440                 java.lang.String s = input.readStringRequireUtf8();
2441                 ensureAdvertisedGroupsIsMutable();
2442                 advertisedGroups_.add(s);
2443                 break;
2444               } // case 168524210
2445             case 223745690:
2446               {
2447                 ipv6NexthopAddress_ = input.readStringRequireUtf8();
2448                 bitField0_ |= 0x00000200;
2449                 break;
2450               } // case 223745690
2451             case 283599458:
2452               {
2453                 com.google.cloud.compute.v1.RouterAdvertisedIpRange m =
2454                     input.readMessage(
2455                         com.google.cloud.compute.v1.RouterAdvertisedIpRange.parser(),
2456                         extensionRegistry);
2457                 if (advertisedIpRangesBuilder_ == null) {
2458                   ensureAdvertisedIpRangesIsMutable();
2459                   advertisedIpRanges_.add(m);
2460                 } else {
2461                   advertisedIpRangesBuilder_.addMessage(m);
2462                 }
2463                 break;
2464               } // case 283599458
2465             case 556585208:
2466               {
2467                 peerAsn_ = input.readUInt32();
2468                 bitField0_ |= 0x00002000;
2469                 break;
2470               } // case 556585208
2471             case 1389628850:
2472               {
2473                 managementType_ = input.readStringRequireUtf8();
2474                 bitField0_ |= 0x00000400;
2475                 break;
2476               } // case 1389628850
2477             case 1451743512:
2478               {
2479                 enableIpv6_ = input.readBool();
2480                 bitField0_ |= 0x00000040;
2481                 break;
2482               } // case 1451743512
2483             case 1491890656:
2484               {
2485                 advertisedRoutePriority_ = input.readUInt32();
2486                 bitField0_ |= 0x00000008;
2487                 break;
2488               } // case 1491890656
2489             case 1661886154:
2490               {
2491                 peerIpAddress_ = input.readStringRequireUtf8();
2492                 bitField0_ |= 0x00004000;
2493                 break;
2494               } // case 1661886154
2495             case -2046364534:
2496               {
2497                 md5AuthenticationKeyName_ = input.readStringRequireUtf8();
2498                 bitField0_ |= 0x00000800;
2499                 break;
2500               } // case -2046364534
2501             case -1800852454:
2502               {
2503                 enable_ = input.readStringRequireUtf8();
2504                 bitField0_ |= 0x00000020;
2505                 break;
2506               } // case -1800852454
2507             case -1797892646:
2508               {
2509                 advertiseMode_ = input.readStringRequireUtf8();
2510                 bitField0_ |= 0x00000001;
2511                 break;
2512               } // case -1797892646
2513             case -1044789534:
2514               {
2515                 ipAddress_ = input.readStringRequireUtf8();
2516                 bitField0_ |= 0x00000100;
2517                 break;
2518               } // case -1044789534
2519             case -792129910:
2520               {
2521                 interfaceName_ = input.readStringRequireUtf8();
2522                 bitField0_ |= 0x00000080;
2523                 break;
2524               } // case -792129910
2525             case -548463382:
2526               {
2527                 routerApplianceInstance_ = input.readStringRequireUtf8();
2528                 bitField0_ |= 0x00010000;
2529                 break;
2530               } // case -548463382
2531             case -363074430:
2532               {
2533                 peerIpv6NexthopAddress_ = input.readStringRequireUtf8();
2534                 bitField0_ |= 0x00008000;
2535                 break;
2536               } // case -363074430
2537             default:
2538               {
2539                 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
2540                   done = true; // was an endgroup tag
2541                 }
2542                 break;
2543               } // default:
2544           } // switch (tag)
2545         } // while (!done)
2546       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
2547         throw e.unwrapIOException();
2548       } finally {
2549         onChanged();
2550       } // finally
2551       return this;
2552     }
2553 
2554     private int bitField0_;
2555 
2556     private java.lang.Object advertiseMode_ = "";
2557     /**
2558      *
2559      *
2560      * <pre>
2561      * User-specified flag to indicate which mode to use for advertisement.
2562      * Check the AdvertiseMode enum for the list of possible values.
2563      * </pre>
2564      *
2565      * <code>optional string advertise_mode = 312134331;</code>
2566      *
2567      * @return Whether the advertiseMode field is set.
2568      */
hasAdvertiseMode()2569     public boolean hasAdvertiseMode() {
2570       return ((bitField0_ & 0x00000001) != 0);
2571     }
2572     /**
2573      *
2574      *
2575      * <pre>
2576      * User-specified flag to indicate which mode to use for advertisement.
2577      * Check the AdvertiseMode enum for the list of possible values.
2578      * </pre>
2579      *
2580      * <code>optional string advertise_mode = 312134331;</code>
2581      *
2582      * @return The advertiseMode.
2583      */
getAdvertiseMode()2584     public java.lang.String getAdvertiseMode() {
2585       java.lang.Object ref = advertiseMode_;
2586       if (!(ref instanceof java.lang.String)) {
2587         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
2588         java.lang.String s = bs.toStringUtf8();
2589         advertiseMode_ = s;
2590         return s;
2591       } else {
2592         return (java.lang.String) ref;
2593       }
2594     }
2595     /**
2596      *
2597      *
2598      * <pre>
2599      * User-specified flag to indicate which mode to use for advertisement.
2600      * Check the AdvertiseMode enum for the list of possible values.
2601      * </pre>
2602      *
2603      * <code>optional string advertise_mode = 312134331;</code>
2604      *
2605      * @return The bytes for advertiseMode.
2606      */
getAdvertiseModeBytes()2607     public com.google.protobuf.ByteString getAdvertiseModeBytes() {
2608       java.lang.Object ref = advertiseMode_;
2609       if (ref instanceof String) {
2610         com.google.protobuf.ByteString b =
2611             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
2612         advertiseMode_ = b;
2613         return b;
2614       } else {
2615         return (com.google.protobuf.ByteString) ref;
2616       }
2617     }
2618     /**
2619      *
2620      *
2621      * <pre>
2622      * User-specified flag to indicate which mode to use for advertisement.
2623      * Check the AdvertiseMode enum for the list of possible values.
2624      * </pre>
2625      *
2626      * <code>optional string advertise_mode = 312134331;</code>
2627      *
2628      * @param value The advertiseMode to set.
2629      * @return This builder for chaining.
2630      */
setAdvertiseMode(java.lang.String value)2631     public Builder setAdvertiseMode(java.lang.String value) {
2632       if (value == null) {
2633         throw new NullPointerException();
2634       }
2635       advertiseMode_ = value;
2636       bitField0_ |= 0x00000001;
2637       onChanged();
2638       return this;
2639     }
2640     /**
2641      *
2642      *
2643      * <pre>
2644      * User-specified flag to indicate which mode to use for advertisement.
2645      * Check the AdvertiseMode enum for the list of possible values.
2646      * </pre>
2647      *
2648      * <code>optional string advertise_mode = 312134331;</code>
2649      *
2650      * @return This builder for chaining.
2651      */
clearAdvertiseMode()2652     public Builder clearAdvertiseMode() {
2653       advertiseMode_ = getDefaultInstance().getAdvertiseMode();
2654       bitField0_ = (bitField0_ & ~0x00000001);
2655       onChanged();
2656       return this;
2657     }
2658     /**
2659      *
2660      *
2661      * <pre>
2662      * User-specified flag to indicate which mode to use for advertisement.
2663      * Check the AdvertiseMode enum for the list of possible values.
2664      * </pre>
2665      *
2666      * <code>optional string advertise_mode = 312134331;</code>
2667      *
2668      * @param value The bytes for advertiseMode to set.
2669      * @return This builder for chaining.
2670      */
setAdvertiseModeBytes(com.google.protobuf.ByteString value)2671     public Builder setAdvertiseModeBytes(com.google.protobuf.ByteString value) {
2672       if (value == null) {
2673         throw new NullPointerException();
2674       }
2675       checkByteStringIsUtf8(value);
2676       advertiseMode_ = value;
2677       bitField0_ |= 0x00000001;
2678       onChanged();
2679       return this;
2680     }
2681 
2682     private com.google.protobuf.LazyStringList advertisedGroups_ =
2683         com.google.protobuf.LazyStringArrayList.EMPTY;
2684 
ensureAdvertisedGroupsIsMutable()2685     private void ensureAdvertisedGroupsIsMutable() {
2686       if (!((bitField0_ & 0x00000002) != 0)) {
2687         advertisedGroups_ = new com.google.protobuf.LazyStringArrayList(advertisedGroups_);
2688         bitField0_ |= 0x00000002;
2689       }
2690     }
2691     /**
2692      *
2693      *
2694      * <pre>
2695      * User-specified list of prefix groups to advertise in custom mode, which currently supports the following option: - ALL_SUBNETS: Advertises all of the router's own VPC subnets. This excludes any routes learned for subnets that use VPC Network Peering. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
2696      * Check the AdvertisedGroups enum for the list of possible values.
2697      * </pre>
2698      *
2699      * <code>repeated string advertised_groups = 21065526;</code>
2700      *
2701      * @return A list containing the advertisedGroups.
2702      */
getAdvertisedGroupsList()2703     public com.google.protobuf.ProtocolStringList getAdvertisedGroupsList() {
2704       return advertisedGroups_.getUnmodifiableView();
2705     }
2706     /**
2707      *
2708      *
2709      * <pre>
2710      * User-specified list of prefix groups to advertise in custom mode, which currently supports the following option: - ALL_SUBNETS: Advertises all of the router's own VPC subnets. This excludes any routes learned for subnets that use VPC Network Peering. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
2711      * Check the AdvertisedGroups enum for the list of possible values.
2712      * </pre>
2713      *
2714      * <code>repeated string advertised_groups = 21065526;</code>
2715      *
2716      * @return The count of advertisedGroups.
2717      */
getAdvertisedGroupsCount()2718     public int getAdvertisedGroupsCount() {
2719       return advertisedGroups_.size();
2720     }
2721     /**
2722      *
2723      *
2724      * <pre>
2725      * User-specified list of prefix groups to advertise in custom mode, which currently supports the following option: - ALL_SUBNETS: Advertises all of the router's own VPC subnets. This excludes any routes learned for subnets that use VPC Network Peering. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
2726      * Check the AdvertisedGroups enum for the list of possible values.
2727      * </pre>
2728      *
2729      * <code>repeated string advertised_groups = 21065526;</code>
2730      *
2731      * @param index The index of the element to return.
2732      * @return The advertisedGroups at the given index.
2733      */
getAdvertisedGroups(int index)2734     public java.lang.String getAdvertisedGroups(int index) {
2735       return advertisedGroups_.get(index);
2736     }
2737     /**
2738      *
2739      *
2740      * <pre>
2741      * User-specified list of prefix groups to advertise in custom mode, which currently supports the following option: - ALL_SUBNETS: Advertises all of the router's own VPC subnets. This excludes any routes learned for subnets that use VPC Network Peering. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
2742      * Check the AdvertisedGroups enum for the list of possible values.
2743      * </pre>
2744      *
2745      * <code>repeated string advertised_groups = 21065526;</code>
2746      *
2747      * @param index The index of the value to return.
2748      * @return The bytes of the advertisedGroups at the given index.
2749      */
getAdvertisedGroupsBytes(int index)2750     public com.google.protobuf.ByteString getAdvertisedGroupsBytes(int index) {
2751       return advertisedGroups_.getByteString(index);
2752     }
2753     /**
2754      *
2755      *
2756      * <pre>
2757      * User-specified list of prefix groups to advertise in custom mode, which currently supports the following option: - ALL_SUBNETS: Advertises all of the router's own VPC subnets. This excludes any routes learned for subnets that use VPC Network Peering. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
2758      * Check the AdvertisedGroups enum for the list of possible values.
2759      * </pre>
2760      *
2761      * <code>repeated string advertised_groups = 21065526;</code>
2762      *
2763      * @param index The index to set the value at.
2764      * @param value The advertisedGroups to set.
2765      * @return This builder for chaining.
2766      */
setAdvertisedGroups(int index, java.lang.String value)2767     public Builder setAdvertisedGroups(int index, java.lang.String value) {
2768       if (value == null) {
2769         throw new NullPointerException();
2770       }
2771       ensureAdvertisedGroupsIsMutable();
2772       advertisedGroups_.set(index, value);
2773       onChanged();
2774       return this;
2775     }
2776     /**
2777      *
2778      *
2779      * <pre>
2780      * User-specified list of prefix groups to advertise in custom mode, which currently supports the following option: - ALL_SUBNETS: Advertises all of the router's own VPC subnets. This excludes any routes learned for subnets that use VPC Network Peering. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
2781      * Check the AdvertisedGroups enum for the list of possible values.
2782      * </pre>
2783      *
2784      * <code>repeated string advertised_groups = 21065526;</code>
2785      *
2786      * @param value The advertisedGroups to add.
2787      * @return This builder for chaining.
2788      */
addAdvertisedGroups(java.lang.String value)2789     public Builder addAdvertisedGroups(java.lang.String value) {
2790       if (value == null) {
2791         throw new NullPointerException();
2792       }
2793       ensureAdvertisedGroupsIsMutable();
2794       advertisedGroups_.add(value);
2795       onChanged();
2796       return this;
2797     }
2798     /**
2799      *
2800      *
2801      * <pre>
2802      * User-specified list of prefix groups to advertise in custom mode, which currently supports the following option: - ALL_SUBNETS: Advertises all of the router's own VPC subnets. This excludes any routes learned for subnets that use VPC Network Peering. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
2803      * Check the AdvertisedGroups enum for the list of possible values.
2804      * </pre>
2805      *
2806      * <code>repeated string advertised_groups = 21065526;</code>
2807      *
2808      * @param values The advertisedGroups to add.
2809      * @return This builder for chaining.
2810      */
addAllAdvertisedGroups(java.lang.Iterable<java.lang.String> values)2811     public Builder addAllAdvertisedGroups(java.lang.Iterable<java.lang.String> values) {
2812       ensureAdvertisedGroupsIsMutable();
2813       com.google.protobuf.AbstractMessageLite.Builder.addAll(values, advertisedGroups_);
2814       onChanged();
2815       return this;
2816     }
2817     /**
2818      *
2819      *
2820      * <pre>
2821      * User-specified list of prefix groups to advertise in custom mode, which currently supports the following option: - ALL_SUBNETS: Advertises all of the router's own VPC subnets. This excludes any routes learned for subnets that use VPC Network Peering. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
2822      * Check the AdvertisedGroups enum for the list of possible values.
2823      * </pre>
2824      *
2825      * <code>repeated string advertised_groups = 21065526;</code>
2826      *
2827      * @return This builder for chaining.
2828      */
clearAdvertisedGroups()2829     public Builder clearAdvertisedGroups() {
2830       advertisedGroups_ = com.google.protobuf.LazyStringArrayList.EMPTY;
2831       bitField0_ = (bitField0_ & ~0x00000002);
2832       onChanged();
2833       return this;
2834     }
2835     /**
2836      *
2837      *
2838      * <pre>
2839      * User-specified list of prefix groups to advertise in custom mode, which currently supports the following option: - ALL_SUBNETS: Advertises all of the router's own VPC subnets. This excludes any routes learned for subnets that use VPC Network Peering. Note that this field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These groups are advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups.
2840      * Check the AdvertisedGroups enum for the list of possible values.
2841      * </pre>
2842      *
2843      * <code>repeated string advertised_groups = 21065526;</code>
2844      *
2845      * @param value The bytes of the advertisedGroups to add.
2846      * @return This builder for chaining.
2847      */
addAdvertisedGroupsBytes(com.google.protobuf.ByteString value)2848     public Builder addAdvertisedGroupsBytes(com.google.protobuf.ByteString value) {
2849       if (value == null) {
2850         throw new NullPointerException();
2851       }
2852       checkByteStringIsUtf8(value);
2853       ensureAdvertisedGroupsIsMutable();
2854       advertisedGroups_.add(value);
2855       onChanged();
2856       return this;
2857     }
2858 
2859     private java.util.List<com.google.cloud.compute.v1.RouterAdvertisedIpRange>
2860         advertisedIpRanges_ = java.util.Collections.emptyList();
2861 
ensureAdvertisedIpRangesIsMutable()2862     private void ensureAdvertisedIpRangesIsMutable() {
2863       if (!((bitField0_ & 0x00000004) != 0)) {
2864         advertisedIpRanges_ =
2865             new java.util.ArrayList<com.google.cloud.compute.v1.RouterAdvertisedIpRange>(
2866                 advertisedIpRanges_);
2867         bitField0_ |= 0x00000004;
2868       }
2869     }
2870 
2871     private com.google.protobuf.RepeatedFieldBuilderV3<
2872             com.google.cloud.compute.v1.RouterAdvertisedIpRange,
2873             com.google.cloud.compute.v1.RouterAdvertisedIpRange.Builder,
2874             com.google.cloud.compute.v1.RouterAdvertisedIpRangeOrBuilder>
2875         advertisedIpRangesBuilder_;
2876 
2877     /**
2878      *
2879      *
2880      * <pre>
2881      * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
2882      * </pre>
2883      *
2884      * <code>
2885      * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932;
2886      * </code>
2887      */
2888     public java.util.List<com.google.cloud.compute.v1.RouterAdvertisedIpRange>
getAdvertisedIpRangesList()2889         getAdvertisedIpRangesList() {
2890       if (advertisedIpRangesBuilder_ == null) {
2891         return java.util.Collections.unmodifiableList(advertisedIpRanges_);
2892       } else {
2893         return advertisedIpRangesBuilder_.getMessageList();
2894       }
2895     }
2896     /**
2897      *
2898      *
2899      * <pre>
2900      * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
2901      * </pre>
2902      *
2903      * <code>
2904      * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932;
2905      * </code>
2906      */
getAdvertisedIpRangesCount()2907     public int getAdvertisedIpRangesCount() {
2908       if (advertisedIpRangesBuilder_ == null) {
2909         return advertisedIpRanges_.size();
2910       } else {
2911         return advertisedIpRangesBuilder_.getCount();
2912       }
2913     }
2914     /**
2915      *
2916      *
2917      * <pre>
2918      * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
2919      * </pre>
2920      *
2921      * <code>
2922      * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932;
2923      * </code>
2924      */
getAdvertisedIpRanges(int index)2925     public com.google.cloud.compute.v1.RouterAdvertisedIpRange getAdvertisedIpRanges(int index) {
2926       if (advertisedIpRangesBuilder_ == null) {
2927         return advertisedIpRanges_.get(index);
2928       } else {
2929         return advertisedIpRangesBuilder_.getMessage(index);
2930       }
2931     }
2932     /**
2933      *
2934      *
2935      * <pre>
2936      * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
2937      * </pre>
2938      *
2939      * <code>
2940      * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932;
2941      * </code>
2942      */
setAdvertisedIpRanges( int index, com.google.cloud.compute.v1.RouterAdvertisedIpRange value)2943     public Builder setAdvertisedIpRanges(
2944         int index, com.google.cloud.compute.v1.RouterAdvertisedIpRange value) {
2945       if (advertisedIpRangesBuilder_ == null) {
2946         if (value == null) {
2947           throw new NullPointerException();
2948         }
2949         ensureAdvertisedIpRangesIsMutable();
2950         advertisedIpRanges_.set(index, value);
2951         onChanged();
2952       } else {
2953         advertisedIpRangesBuilder_.setMessage(index, value);
2954       }
2955       return this;
2956     }
2957     /**
2958      *
2959      *
2960      * <pre>
2961      * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
2962      * </pre>
2963      *
2964      * <code>
2965      * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932;
2966      * </code>
2967      */
setAdvertisedIpRanges( int index, com.google.cloud.compute.v1.RouterAdvertisedIpRange.Builder builderForValue)2968     public Builder setAdvertisedIpRanges(
2969         int index, com.google.cloud.compute.v1.RouterAdvertisedIpRange.Builder builderForValue) {
2970       if (advertisedIpRangesBuilder_ == null) {
2971         ensureAdvertisedIpRangesIsMutable();
2972         advertisedIpRanges_.set(index, builderForValue.build());
2973         onChanged();
2974       } else {
2975         advertisedIpRangesBuilder_.setMessage(index, builderForValue.build());
2976       }
2977       return this;
2978     }
2979     /**
2980      *
2981      *
2982      * <pre>
2983      * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
2984      * </pre>
2985      *
2986      * <code>
2987      * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932;
2988      * </code>
2989      */
addAdvertisedIpRanges( com.google.cloud.compute.v1.RouterAdvertisedIpRange value)2990     public Builder addAdvertisedIpRanges(
2991         com.google.cloud.compute.v1.RouterAdvertisedIpRange value) {
2992       if (advertisedIpRangesBuilder_ == null) {
2993         if (value == null) {
2994           throw new NullPointerException();
2995         }
2996         ensureAdvertisedIpRangesIsMutable();
2997         advertisedIpRanges_.add(value);
2998         onChanged();
2999       } else {
3000         advertisedIpRangesBuilder_.addMessage(value);
3001       }
3002       return this;
3003     }
3004     /**
3005      *
3006      *
3007      * <pre>
3008      * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
3009      * </pre>
3010      *
3011      * <code>
3012      * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932;
3013      * </code>
3014      */
addAdvertisedIpRanges( int index, com.google.cloud.compute.v1.RouterAdvertisedIpRange value)3015     public Builder addAdvertisedIpRanges(
3016         int index, com.google.cloud.compute.v1.RouterAdvertisedIpRange value) {
3017       if (advertisedIpRangesBuilder_ == null) {
3018         if (value == null) {
3019           throw new NullPointerException();
3020         }
3021         ensureAdvertisedIpRangesIsMutable();
3022         advertisedIpRanges_.add(index, value);
3023         onChanged();
3024       } else {
3025         advertisedIpRangesBuilder_.addMessage(index, value);
3026       }
3027       return this;
3028     }
3029     /**
3030      *
3031      *
3032      * <pre>
3033      * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
3034      * </pre>
3035      *
3036      * <code>
3037      * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932;
3038      * </code>
3039      */
addAdvertisedIpRanges( com.google.cloud.compute.v1.RouterAdvertisedIpRange.Builder builderForValue)3040     public Builder addAdvertisedIpRanges(
3041         com.google.cloud.compute.v1.RouterAdvertisedIpRange.Builder builderForValue) {
3042       if (advertisedIpRangesBuilder_ == null) {
3043         ensureAdvertisedIpRangesIsMutable();
3044         advertisedIpRanges_.add(builderForValue.build());
3045         onChanged();
3046       } else {
3047         advertisedIpRangesBuilder_.addMessage(builderForValue.build());
3048       }
3049       return this;
3050     }
3051     /**
3052      *
3053      *
3054      * <pre>
3055      * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
3056      * </pre>
3057      *
3058      * <code>
3059      * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932;
3060      * </code>
3061      */
addAdvertisedIpRanges( int index, com.google.cloud.compute.v1.RouterAdvertisedIpRange.Builder builderForValue)3062     public Builder addAdvertisedIpRanges(
3063         int index, com.google.cloud.compute.v1.RouterAdvertisedIpRange.Builder builderForValue) {
3064       if (advertisedIpRangesBuilder_ == null) {
3065         ensureAdvertisedIpRangesIsMutable();
3066         advertisedIpRanges_.add(index, builderForValue.build());
3067         onChanged();
3068       } else {
3069         advertisedIpRangesBuilder_.addMessage(index, builderForValue.build());
3070       }
3071       return this;
3072     }
3073     /**
3074      *
3075      *
3076      * <pre>
3077      * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
3078      * </pre>
3079      *
3080      * <code>
3081      * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932;
3082      * </code>
3083      */
addAllAdvertisedIpRanges( java.lang.Iterable<? extends com.google.cloud.compute.v1.RouterAdvertisedIpRange> values)3084     public Builder addAllAdvertisedIpRanges(
3085         java.lang.Iterable<? extends com.google.cloud.compute.v1.RouterAdvertisedIpRange> values) {
3086       if (advertisedIpRangesBuilder_ == null) {
3087         ensureAdvertisedIpRangesIsMutable();
3088         com.google.protobuf.AbstractMessageLite.Builder.addAll(values, advertisedIpRanges_);
3089         onChanged();
3090       } else {
3091         advertisedIpRangesBuilder_.addAllMessages(values);
3092       }
3093       return this;
3094     }
3095     /**
3096      *
3097      *
3098      * <pre>
3099      * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
3100      * </pre>
3101      *
3102      * <code>
3103      * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932;
3104      * </code>
3105      */
clearAdvertisedIpRanges()3106     public Builder clearAdvertisedIpRanges() {
3107       if (advertisedIpRangesBuilder_ == null) {
3108         advertisedIpRanges_ = java.util.Collections.emptyList();
3109         bitField0_ = (bitField0_ & ~0x00000004);
3110         onChanged();
3111       } else {
3112         advertisedIpRangesBuilder_.clear();
3113       }
3114       return this;
3115     }
3116     /**
3117      *
3118      *
3119      * <pre>
3120      * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
3121      * </pre>
3122      *
3123      * <code>
3124      * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932;
3125      * </code>
3126      */
removeAdvertisedIpRanges(int index)3127     public Builder removeAdvertisedIpRanges(int index) {
3128       if (advertisedIpRangesBuilder_ == null) {
3129         ensureAdvertisedIpRangesIsMutable();
3130         advertisedIpRanges_.remove(index);
3131         onChanged();
3132       } else {
3133         advertisedIpRangesBuilder_.remove(index);
3134       }
3135       return this;
3136     }
3137     /**
3138      *
3139      *
3140      * <pre>
3141      * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
3142      * </pre>
3143      *
3144      * <code>
3145      * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932;
3146      * </code>
3147      */
getAdvertisedIpRangesBuilder( int index)3148     public com.google.cloud.compute.v1.RouterAdvertisedIpRange.Builder getAdvertisedIpRangesBuilder(
3149         int index) {
3150       return getAdvertisedIpRangesFieldBuilder().getBuilder(index);
3151     }
3152     /**
3153      *
3154      *
3155      * <pre>
3156      * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
3157      * </pre>
3158      *
3159      * <code>
3160      * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932;
3161      * </code>
3162      */
3163     public com.google.cloud.compute.v1.RouterAdvertisedIpRangeOrBuilder
getAdvertisedIpRangesOrBuilder(int index)3164         getAdvertisedIpRangesOrBuilder(int index) {
3165       if (advertisedIpRangesBuilder_ == null) {
3166         return advertisedIpRanges_.get(index);
3167       } else {
3168         return advertisedIpRangesBuilder_.getMessageOrBuilder(index);
3169       }
3170     }
3171     /**
3172      *
3173      *
3174      * <pre>
3175      * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
3176      * </pre>
3177      *
3178      * <code>
3179      * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932;
3180      * </code>
3181      */
3182     public java.util.List<? extends com.google.cloud.compute.v1.RouterAdvertisedIpRangeOrBuilder>
getAdvertisedIpRangesOrBuilderList()3183         getAdvertisedIpRangesOrBuilderList() {
3184       if (advertisedIpRangesBuilder_ != null) {
3185         return advertisedIpRangesBuilder_.getMessageOrBuilderList();
3186       } else {
3187         return java.util.Collections.unmodifiableList(advertisedIpRanges_);
3188       }
3189     }
3190     /**
3191      *
3192      *
3193      * <pre>
3194      * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
3195      * </pre>
3196      *
3197      * <code>
3198      * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932;
3199      * </code>
3200      */
3201     public com.google.cloud.compute.v1.RouterAdvertisedIpRange.Builder
addAdvertisedIpRangesBuilder()3202         addAdvertisedIpRangesBuilder() {
3203       return getAdvertisedIpRangesFieldBuilder()
3204           .addBuilder(com.google.cloud.compute.v1.RouterAdvertisedIpRange.getDefaultInstance());
3205     }
3206     /**
3207      *
3208      *
3209      * <pre>
3210      * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
3211      * </pre>
3212      *
3213      * <code>
3214      * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932;
3215      * </code>
3216      */
addAdvertisedIpRangesBuilder( int index)3217     public com.google.cloud.compute.v1.RouterAdvertisedIpRange.Builder addAdvertisedIpRangesBuilder(
3218         int index) {
3219       return getAdvertisedIpRangesFieldBuilder()
3220           .addBuilder(
3221               index, com.google.cloud.compute.v1.RouterAdvertisedIpRange.getDefaultInstance());
3222     }
3223     /**
3224      *
3225      *
3226      * <pre>
3227      * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and overrides the list defined for the router (in the "bgp" message). These IP ranges are advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges.
3228      * </pre>
3229      *
3230      * <code>
3231      * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932;
3232      * </code>
3233      */
3234     public java.util.List<com.google.cloud.compute.v1.RouterAdvertisedIpRange.Builder>
getAdvertisedIpRangesBuilderList()3235         getAdvertisedIpRangesBuilderList() {
3236       return getAdvertisedIpRangesFieldBuilder().getBuilderList();
3237     }
3238 
3239     private com.google.protobuf.RepeatedFieldBuilderV3<
3240             com.google.cloud.compute.v1.RouterAdvertisedIpRange,
3241             com.google.cloud.compute.v1.RouterAdvertisedIpRange.Builder,
3242             com.google.cloud.compute.v1.RouterAdvertisedIpRangeOrBuilder>
getAdvertisedIpRangesFieldBuilder()3243         getAdvertisedIpRangesFieldBuilder() {
3244       if (advertisedIpRangesBuilder_ == null) {
3245         advertisedIpRangesBuilder_ =
3246             new com.google.protobuf.RepeatedFieldBuilderV3<
3247                 com.google.cloud.compute.v1.RouterAdvertisedIpRange,
3248                 com.google.cloud.compute.v1.RouterAdvertisedIpRange.Builder,
3249                 com.google.cloud.compute.v1.RouterAdvertisedIpRangeOrBuilder>(
3250                 advertisedIpRanges_,
3251                 ((bitField0_ & 0x00000004) != 0),
3252                 getParentForChildren(),
3253                 isClean());
3254         advertisedIpRanges_ = null;
3255       }
3256       return advertisedIpRangesBuilder_;
3257     }
3258 
3259     private int advertisedRoutePriority_;
3260     /**
3261      *
3262      *
3263      * <pre>
3264      * The priority of routes advertised to this BGP peer. Where there is more than one matching route of maximum length, the routes with the lowest priority value win.
3265      * </pre>
3266      *
3267      * <code>optional uint32 advertised_route_priority = 186486332;</code>
3268      *
3269      * @return Whether the advertisedRoutePriority field is set.
3270      */
3271     @java.lang.Override
hasAdvertisedRoutePriority()3272     public boolean hasAdvertisedRoutePriority() {
3273       return ((bitField0_ & 0x00000008) != 0);
3274     }
3275     /**
3276      *
3277      *
3278      * <pre>
3279      * The priority of routes advertised to this BGP peer. Where there is more than one matching route of maximum length, the routes with the lowest priority value win.
3280      * </pre>
3281      *
3282      * <code>optional uint32 advertised_route_priority = 186486332;</code>
3283      *
3284      * @return The advertisedRoutePriority.
3285      */
3286     @java.lang.Override
getAdvertisedRoutePriority()3287     public int getAdvertisedRoutePriority() {
3288       return advertisedRoutePriority_;
3289     }
3290     /**
3291      *
3292      *
3293      * <pre>
3294      * The priority of routes advertised to this BGP peer. Where there is more than one matching route of maximum length, the routes with the lowest priority value win.
3295      * </pre>
3296      *
3297      * <code>optional uint32 advertised_route_priority = 186486332;</code>
3298      *
3299      * @param value The advertisedRoutePriority to set.
3300      * @return This builder for chaining.
3301      */
setAdvertisedRoutePriority(int value)3302     public Builder setAdvertisedRoutePriority(int value) {
3303 
3304       advertisedRoutePriority_ = value;
3305       bitField0_ |= 0x00000008;
3306       onChanged();
3307       return this;
3308     }
3309     /**
3310      *
3311      *
3312      * <pre>
3313      * The priority of routes advertised to this BGP peer. Where there is more than one matching route of maximum length, the routes with the lowest priority value win.
3314      * </pre>
3315      *
3316      * <code>optional uint32 advertised_route_priority = 186486332;</code>
3317      *
3318      * @return This builder for chaining.
3319      */
clearAdvertisedRoutePriority()3320     public Builder clearAdvertisedRoutePriority() {
3321       bitField0_ = (bitField0_ & ~0x00000008);
3322       advertisedRoutePriority_ = 0;
3323       onChanged();
3324       return this;
3325     }
3326 
3327     private com.google.cloud.compute.v1.RouterBgpPeerBfd bfd_;
3328     private com.google.protobuf.SingleFieldBuilderV3<
3329             com.google.cloud.compute.v1.RouterBgpPeerBfd,
3330             com.google.cloud.compute.v1.RouterBgpPeerBfd.Builder,
3331             com.google.cloud.compute.v1.RouterBgpPeerBfdOrBuilder>
3332         bfdBuilder_;
3333     /**
3334      *
3335      *
3336      * <pre>
3337      * BFD configuration for the BGP peering.
3338      * </pre>
3339      *
3340      * <code>optional .google.cloud.compute.v1.RouterBgpPeerBfd bfd = 97440;</code>
3341      *
3342      * @return Whether the bfd field is set.
3343      */
hasBfd()3344     public boolean hasBfd() {
3345       return ((bitField0_ & 0x00000010) != 0);
3346     }
3347     /**
3348      *
3349      *
3350      * <pre>
3351      * BFD configuration for the BGP peering.
3352      * </pre>
3353      *
3354      * <code>optional .google.cloud.compute.v1.RouterBgpPeerBfd bfd = 97440;</code>
3355      *
3356      * @return The bfd.
3357      */
getBfd()3358     public com.google.cloud.compute.v1.RouterBgpPeerBfd getBfd() {
3359       if (bfdBuilder_ == null) {
3360         return bfd_ == null
3361             ? com.google.cloud.compute.v1.RouterBgpPeerBfd.getDefaultInstance()
3362             : bfd_;
3363       } else {
3364         return bfdBuilder_.getMessage();
3365       }
3366     }
3367     /**
3368      *
3369      *
3370      * <pre>
3371      * BFD configuration for the BGP peering.
3372      * </pre>
3373      *
3374      * <code>optional .google.cloud.compute.v1.RouterBgpPeerBfd bfd = 97440;</code>
3375      */
setBfd(com.google.cloud.compute.v1.RouterBgpPeerBfd value)3376     public Builder setBfd(com.google.cloud.compute.v1.RouterBgpPeerBfd value) {
3377       if (bfdBuilder_ == null) {
3378         if (value == null) {
3379           throw new NullPointerException();
3380         }
3381         bfd_ = value;
3382       } else {
3383         bfdBuilder_.setMessage(value);
3384       }
3385       bitField0_ |= 0x00000010;
3386       onChanged();
3387       return this;
3388     }
3389     /**
3390      *
3391      *
3392      * <pre>
3393      * BFD configuration for the BGP peering.
3394      * </pre>
3395      *
3396      * <code>optional .google.cloud.compute.v1.RouterBgpPeerBfd bfd = 97440;</code>
3397      */
setBfd(com.google.cloud.compute.v1.RouterBgpPeerBfd.Builder builderForValue)3398     public Builder setBfd(com.google.cloud.compute.v1.RouterBgpPeerBfd.Builder builderForValue) {
3399       if (bfdBuilder_ == null) {
3400         bfd_ = builderForValue.build();
3401       } else {
3402         bfdBuilder_.setMessage(builderForValue.build());
3403       }
3404       bitField0_ |= 0x00000010;
3405       onChanged();
3406       return this;
3407     }
3408     /**
3409      *
3410      *
3411      * <pre>
3412      * BFD configuration for the BGP peering.
3413      * </pre>
3414      *
3415      * <code>optional .google.cloud.compute.v1.RouterBgpPeerBfd bfd = 97440;</code>
3416      */
mergeBfd(com.google.cloud.compute.v1.RouterBgpPeerBfd value)3417     public Builder mergeBfd(com.google.cloud.compute.v1.RouterBgpPeerBfd value) {
3418       if (bfdBuilder_ == null) {
3419         if (((bitField0_ & 0x00000010) != 0)
3420             && bfd_ != null
3421             && bfd_ != com.google.cloud.compute.v1.RouterBgpPeerBfd.getDefaultInstance()) {
3422           getBfdBuilder().mergeFrom(value);
3423         } else {
3424           bfd_ = value;
3425         }
3426       } else {
3427         bfdBuilder_.mergeFrom(value);
3428       }
3429       bitField0_ |= 0x00000010;
3430       onChanged();
3431       return this;
3432     }
3433     /**
3434      *
3435      *
3436      * <pre>
3437      * BFD configuration for the BGP peering.
3438      * </pre>
3439      *
3440      * <code>optional .google.cloud.compute.v1.RouterBgpPeerBfd bfd = 97440;</code>
3441      */
clearBfd()3442     public Builder clearBfd() {
3443       bitField0_ = (bitField0_ & ~0x00000010);
3444       bfd_ = null;
3445       if (bfdBuilder_ != null) {
3446         bfdBuilder_.dispose();
3447         bfdBuilder_ = null;
3448       }
3449       onChanged();
3450       return this;
3451     }
3452     /**
3453      *
3454      *
3455      * <pre>
3456      * BFD configuration for the BGP peering.
3457      * </pre>
3458      *
3459      * <code>optional .google.cloud.compute.v1.RouterBgpPeerBfd bfd = 97440;</code>
3460      */
getBfdBuilder()3461     public com.google.cloud.compute.v1.RouterBgpPeerBfd.Builder getBfdBuilder() {
3462       bitField0_ |= 0x00000010;
3463       onChanged();
3464       return getBfdFieldBuilder().getBuilder();
3465     }
3466     /**
3467      *
3468      *
3469      * <pre>
3470      * BFD configuration for the BGP peering.
3471      * </pre>
3472      *
3473      * <code>optional .google.cloud.compute.v1.RouterBgpPeerBfd bfd = 97440;</code>
3474      */
getBfdOrBuilder()3475     public com.google.cloud.compute.v1.RouterBgpPeerBfdOrBuilder getBfdOrBuilder() {
3476       if (bfdBuilder_ != null) {
3477         return bfdBuilder_.getMessageOrBuilder();
3478       } else {
3479         return bfd_ == null
3480             ? com.google.cloud.compute.v1.RouterBgpPeerBfd.getDefaultInstance()
3481             : bfd_;
3482       }
3483     }
3484     /**
3485      *
3486      *
3487      * <pre>
3488      * BFD configuration for the BGP peering.
3489      * </pre>
3490      *
3491      * <code>optional .google.cloud.compute.v1.RouterBgpPeerBfd bfd = 97440;</code>
3492      */
3493     private com.google.protobuf.SingleFieldBuilderV3<
3494             com.google.cloud.compute.v1.RouterBgpPeerBfd,
3495             com.google.cloud.compute.v1.RouterBgpPeerBfd.Builder,
3496             com.google.cloud.compute.v1.RouterBgpPeerBfdOrBuilder>
getBfdFieldBuilder()3497         getBfdFieldBuilder() {
3498       if (bfdBuilder_ == null) {
3499         bfdBuilder_ =
3500             new com.google.protobuf.SingleFieldBuilderV3<
3501                 com.google.cloud.compute.v1.RouterBgpPeerBfd,
3502                 com.google.cloud.compute.v1.RouterBgpPeerBfd.Builder,
3503                 com.google.cloud.compute.v1.RouterBgpPeerBfdOrBuilder>(
3504                 getBfd(), getParentForChildren(), isClean());
3505         bfd_ = null;
3506       }
3507       return bfdBuilder_;
3508     }
3509 
3510     private java.lang.Object enable_ = "";
3511     /**
3512      *
3513      *
3514      * <pre>
3515      * The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
3516      * Check the Enable enum for the list of possible values.
3517      * </pre>
3518      *
3519      * <code>optional string enable = 311764355;</code>
3520      *
3521      * @return Whether the enable field is set.
3522      */
hasEnable()3523     public boolean hasEnable() {
3524       return ((bitField0_ & 0x00000020) != 0);
3525     }
3526     /**
3527      *
3528      *
3529      * <pre>
3530      * The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
3531      * Check the Enable enum for the list of possible values.
3532      * </pre>
3533      *
3534      * <code>optional string enable = 311764355;</code>
3535      *
3536      * @return The enable.
3537      */
getEnable()3538     public java.lang.String getEnable() {
3539       java.lang.Object ref = enable_;
3540       if (!(ref instanceof java.lang.String)) {
3541         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
3542         java.lang.String s = bs.toStringUtf8();
3543         enable_ = s;
3544         return s;
3545       } else {
3546         return (java.lang.String) ref;
3547       }
3548     }
3549     /**
3550      *
3551      *
3552      * <pre>
3553      * The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
3554      * Check the Enable enum for the list of possible values.
3555      * </pre>
3556      *
3557      * <code>optional string enable = 311764355;</code>
3558      *
3559      * @return The bytes for enable.
3560      */
getEnableBytes()3561     public com.google.protobuf.ByteString getEnableBytes() {
3562       java.lang.Object ref = enable_;
3563       if (ref instanceof String) {
3564         com.google.protobuf.ByteString b =
3565             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
3566         enable_ = b;
3567         return b;
3568       } else {
3569         return (com.google.protobuf.ByteString) ref;
3570       }
3571     }
3572     /**
3573      *
3574      *
3575      * <pre>
3576      * The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
3577      * Check the Enable enum for the list of possible values.
3578      * </pre>
3579      *
3580      * <code>optional string enable = 311764355;</code>
3581      *
3582      * @param value The enable to set.
3583      * @return This builder for chaining.
3584      */
setEnable(java.lang.String value)3585     public Builder setEnable(java.lang.String value) {
3586       if (value == null) {
3587         throw new NullPointerException();
3588       }
3589       enable_ = value;
3590       bitField0_ |= 0x00000020;
3591       onChanged();
3592       return this;
3593     }
3594     /**
3595      *
3596      *
3597      * <pre>
3598      * The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
3599      * Check the Enable enum for the list of possible values.
3600      * </pre>
3601      *
3602      * <code>optional string enable = 311764355;</code>
3603      *
3604      * @return This builder for chaining.
3605      */
clearEnable()3606     public Builder clearEnable() {
3607       enable_ = getDefaultInstance().getEnable();
3608       bitField0_ = (bitField0_ & ~0x00000020);
3609       onChanged();
3610       return this;
3611     }
3612     /**
3613      *
3614      *
3615      * <pre>
3616      * The status of the BGP peer connection. If set to FALSE, any active session with the peer is terminated and all associated routing information is removed. If set to TRUE, the peer connection can be established with routing information. The default is TRUE.
3617      * Check the Enable enum for the list of possible values.
3618      * </pre>
3619      *
3620      * <code>optional string enable = 311764355;</code>
3621      *
3622      * @param value The bytes for enable to set.
3623      * @return This builder for chaining.
3624      */
setEnableBytes(com.google.protobuf.ByteString value)3625     public Builder setEnableBytes(com.google.protobuf.ByteString value) {
3626       if (value == null) {
3627         throw new NullPointerException();
3628       }
3629       checkByteStringIsUtf8(value);
3630       enable_ = value;
3631       bitField0_ |= 0x00000020;
3632       onChanged();
3633       return this;
3634     }
3635 
3636     private boolean enableIpv6_;
3637     /**
3638      *
3639      *
3640      * <pre>
3641      * Enable IPv6 traffic over BGP Peer. If not specified, it is disabled by default.
3642      * </pre>
3643      *
3644      * <code>optional bool enable_ipv6 = 181467939;</code>
3645      *
3646      * @return Whether the enableIpv6 field is set.
3647      */
3648     @java.lang.Override
hasEnableIpv6()3649     public boolean hasEnableIpv6() {
3650       return ((bitField0_ & 0x00000040) != 0);
3651     }
3652     /**
3653      *
3654      *
3655      * <pre>
3656      * Enable IPv6 traffic over BGP Peer. If not specified, it is disabled by default.
3657      * </pre>
3658      *
3659      * <code>optional bool enable_ipv6 = 181467939;</code>
3660      *
3661      * @return The enableIpv6.
3662      */
3663     @java.lang.Override
getEnableIpv6()3664     public boolean getEnableIpv6() {
3665       return enableIpv6_;
3666     }
3667     /**
3668      *
3669      *
3670      * <pre>
3671      * Enable IPv6 traffic over BGP Peer. If not specified, it is disabled by default.
3672      * </pre>
3673      *
3674      * <code>optional bool enable_ipv6 = 181467939;</code>
3675      *
3676      * @param value The enableIpv6 to set.
3677      * @return This builder for chaining.
3678      */
setEnableIpv6(boolean value)3679     public Builder setEnableIpv6(boolean value) {
3680 
3681       enableIpv6_ = value;
3682       bitField0_ |= 0x00000040;
3683       onChanged();
3684       return this;
3685     }
3686     /**
3687      *
3688      *
3689      * <pre>
3690      * Enable IPv6 traffic over BGP Peer. If not specified, it is disabled by default.
3691      * </pre>
3692      *
3693      * <code>optional bool enable_ipv6 = 181467939;</code>
3694      *
3695      * @return This builder for chaining.
3696      */
clearEnableIpv6()3697     public Builder clearEnableIpv6() {
3698       bitField0_ = (bitField0_ & ~0x00000040);
3699       enableIpv6_ = false;
3700       onChanged();
3701       return this;
3702     }
3703 
3704     private java.lang.Object interfaceName_ = "";
3705     /**
3706      *
3707      *
3708      * <pre>
3709      * Name of the interface the BGP peer is associated with.
3710      * </pre>
3711      *
3712      * <code>optional string interface_name = 437854673;</code>
3713      *
3714      * @return Whether the interfaceName field is set.
3715      */
hasInterfaceName()3716     public boolean hasInterfaceName() {
3717       return ((bitField0_ & 0x00000080) != 0);
3718     }
3719     /**
3720      *
3721      *
3722      * <pre>
3723      * Name of the interface the BGP peer is associated with.
3724      * </pre>
3725      *
3726      * <code>optional string interface_name = 437854673;</code>
3727      *
3728      * @return The interfaceName.
3729      */
getInterfaceName()3730     public java.lang.String getInterfaceName() {
3731       java.lang.Object ref = interfaceName_;
3732       if (!(ref instanceof java.lang.String)) {
3733         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
3734         java.lang.String s = bs.toStringUtf8();
3735         interfaceName_ = s;
3736         return s;
3737       } else {
3738         return (java.lang.String) ref;
3739       }
3740     }
3741     /**
3742      *
3743      *
3744      * <pre>
3745      * Name of the interface the BGP peer is associated with.
3746      * </pre>
3747      *
3748      * <code>optional string interface_name = 437854673;</code>
3749      *
3750      * @return The bytes for interfaceName.
3751      */
getInterfaceNameBytes()3752     public com.google.protobuf.ByteString getInterfaceNameBytes() {
3753       java.lang.Object ref = interfaceName_;
3754       if (ref instanceof String) {
3755         com.google.protobuf.ByteString b =
3756             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
3757         interfaceName_ = b;
3758         return b;
3759       } else {
3760         return (com.google.protobuf.ByteString) ref;
3761       }
3762     }
3763     /**
3764      *
3765      *
3766      * <pre>
3767      * Name of the interface the BGP peer is associated with.
3768      * </pre>
3769      *
3770      * <code>optional string interface_name = 437854673;</code>
3771      *
3772      * @param value The interfaceName to set.
3773      * @return This builder for chaining.
3774      */
setInterfaceName(java.lang.String value)3775     public Builder setInterfaceName(java.lang.String value) {
3776       if (value == null) {
3777         throw new NullPointerException();
3778       }
3779       interfaceName_ = value;
3780       bitField0_ |= 0x00000080;
3781       onChanged();
3782       return this;
3783     }
3784     /**
3785      *
3786      *
3787      * <pre>
3788      * Name of the interface the BGP peer is associated with.
3789      * </pre>
3790      *
3791      * <code>optional string interface_name = 437854673;</code>
3792      *
3793      * @return This builder for chaining.
3794      */
clearInterfaceName()3795     public Builder clearInterfaceName() {
3796       interfaceName_ = getDefaultInstance().getInterfaceName();
3797       bitField0_ = (bitField0_ & ~0x00000080);
3798       onChanged();
3799       return this;
3800     }
3801     /**
3802      *
3803      *
3804      * <pre>
3805      * Name of the interface the BGP peer is associated with.
3806      * </pre>
3807      *
3808      * <code>optional string interface_name = 437854673;</code>
3809      *
3810      * @param value The bytes for interfaceName to set.
3811      * @return This builder for chaining.
3812      */
setInterfaceNameBytes(com.google.protobuf.ByteString value)3813     public Builder setInterfaceNameBytes(com.google.protobuf.ByteString value) {
3814       if (value == null) {
3815         throw new NullPointerException();
3816       }
3817       checkByteStringIsUtf8(value);
3818       interfaceName_ = value;
3819       bitField0_ |= 0x00000080;
3820       onChanged();
3821       return this;
3822     }
3823 
3824     private java.lang.Object ipAddress_ = "";
3825     /**
3826      *
3827      *
3828      * <pre>
3829      * IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
3830      * </pre>
3831      *
3832      * <code>optional string ip_address = 406272220;</code>
3833      *
3834      * @return Whether the ipAddress field is set.
3835      */
hasIpAddress()3836     public boolean hasIpAddress() {
3837       return ((bitField0_ & 0x00000100) != 0);
3838     }
3839     /**
3840      *
3841      *
3842      * <pre>
3843      * IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
3844      * </pre>
3845      *
3846      * <code>optional string ip_address = 406272220;</code>
3847      *
3848      * @return The ipAddress.
3849      */
getIpAddress()3850     public java.lang.String getIpAddress() {
3851       java.lang.Object ref = ipAddress_;
3852       if (!(ref instanceof java.lang.String)) {
3853         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
3854         java.lang.String s = bs.toStringUtf8();
3855         ipAddress_ = s;
3856         return s;
3857       } else {
3858         return (java.lang.String) ref;
3859       }
3860     }
3861     /**
3862      *
3863      *
3864      * <pre>
3865      * IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
3866      * </pre>
3867      *
3868      * <code>optional string ip_address = 406272220;</code>
3869      *
3870      * @return The bytes for ipAddress.
3871      */
getIpAddressBytes()3872     public com.google.protobuf.ByteString getIpAddressBytes() {
3873       java.lang.Object ref = ipAddress_;
3874       if (ref instanceof String) {
3875         com.google.protobuf.ByteString b =
3876             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
3877         ipAddress_ = b;
3878         return b;
3879       } else {
3880         return (com.google.protobuf.ByteString) ref;
3881       }
3882     }
3883     /**
3884      *
3885      *
3886      * <pre>
3887      * IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
3888      * </pre>
3889      *
3890      * <code>optional string ip_address = 406272220;</code>
3891      *
3892      * @param value The ipAddress to set.
3893      * @return This builder for chaining.
3894      */
setIpAddress(java.lang.String value)3895     public Builder setIpAddress(java.lang.String value) {
3896       if (value == null) {
3897         throw new NullPointerException();
3898       }
3899       ipAddress_ = value;
3900       bitField0_ |= 0x00000100;
3901       onChanged();
3902       return this;
3903     }
3904     /**
3905      *
3906      *
3907      * <pre>
3908      * IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
3909      * </pre>
3910      *
3911      * <code>optional string ip_address = 406272220;</code>
3912      *
3913      * @return This builder for chaining.
3914      */
clearIpAddress()3915     public Builder clearIpAddress() {
3916       ipAddress_ = getDefaultInstance().getIpAddress();
3917       bitField0_ = (bitField0_ & ~0x00000100);
3918       onChanged();
3919       return this;
3920     }
3921     /**
3922      *
3923      *
3924      * <pre>
3925      * IP address of the interface inside Google Cloud Platform. Only IPv4 is supported.
3926      * </pre>
3927      *
3928      * <code>optional string ip_address = 406272220;</code>
3929      *
3930      * @param value The bytes for ipAddress to set.
3931      * @return This builder for chaining.
3932      */
setIpAddressBytes(com.google.protobuf.ByteString value)3933     public Builder setIpAddressBytes(com.google.protobuf.ByteString value) {
3934       if (value == null) {
3935         throw new NullPointerException();
3936       }
3937       checkByteStringIsUtf8(value);
3938       ipAddress_ = value;
3939       bitField0_ |= 0x00000100;
3940       onChanged();
3941       return this;
3942     }
3943 
3944     private java.lang.Object ipv6NexthopAddress_ = "";
3945     /**
3946      *
3947      *
3948      * <pre>
3949      * IPv6 address of the interface inside Google Cloud Platform.
3950      * </pre>
3951      *
3952      * <code>optional string ipv6_nexthop_address = 27968211;</code>
3953      *
3954      * @return Whether the ipv6NexthopAddress field is set.
3955      */
hasIpv6NexthopAddress()3956     public boolean hasIpv6NexthopAddress() {
3957       return ((bitField0_ & 0x00000200) != 0);
3958     }
3959     /**
3960      *
3961      *
3962      * <pre>
3963      * IPv6 address of the interface inside Google Cloud Platform.
3964      * </pre>
3965      *
3966      * <code>optional string ipv6_nexthop_address = 27968211;</code>
3967      *
3968      * @return The ipv6NexthopAddress.
3969      */
getIpv6NexthopAddress()3970     public java.lang.String getIpv6NexthopAddress() {
3971       java.lang.Object ref = ipv6NexthopAddress_;
3972       if (!(ref instanceof java.lang.String)) {
3973         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
3974         java.lang.String s = bs.toStringUtf8();
3975         ipv6NexthopAddress_ = s;
3976         return s;
3977       } else {
3978         return (java.lang.String) ref;
3979       }
3980     }
3981     /**
3982      *
3983      *
3984      * <pre>
3985      * IPv6 address of the interface inside Google Cloud Platform.
3986      * </pre>
3987      *
3988      * <code>optional string ipv6_nexthop_address = 27968211;</code>
3989      *
3990      * @return The bytes for ipv6NexthopAddress.
3991      */
getIpv6NexthopAddressBytes()3992     public com.google.protobuf.ByteString getIpv6NexthopAddressBytes() {
3993       java.lang.Object ref = ipv6NexthopAddress_;
3994       if (ref instanceof String) {
3995         com.google.protobuf.ByteString b =
3996             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
3997         ipv6NexthopAddress_ = b;
3998         return b;
3999       } else {
4000         return (com.google.protobuf.ByteString) ref;
4001       }
4002     }
4003     /**
4004      *
4005      *
4006      * <pre>
4007      * IPv6 address of the interface inside Google Cloud Platform.
4008      * </pre>
4009      *
4010      * <code>optional string ipv6_nexthop_address = 27968211;</code>
4011      *
4012      * @param value The ipv6NexthopAddress to set.
4013      * @return This builder for chaining.
4014      */
setIpv6NexthopAddress(java.lang.String value)4015     public Builder setIpv6NexthopAddress(java.lang.String value) {
4016       if (value == null) {
4017         throw new NullPointerException();
4018       }
4019       ipv6NexthopAddress_ = value;
4020       bitField0_ |= 0x00000200;
4021       onChanged();
4022       return this;
4023     }
4024     /**
4025      *
4026      *
4027      * <pre>
4028      * IPv6 address of the interface inside Google Cloud Platform.
4029      * </pre>
4030      *
4031      * <code>optional string ipv6_nexthop_address = 27968211;</code>
4032      *
4033      * @return This builder for chaining.
4034      */
clearIpv6NexthopAddress()4035     public Builder clearIpv6NexthopAddress() {
4036       ipv6NexthopAddress_ = getDefaultInstance().getIpv6NexthopAddress();
4037       bitField0_ = (bitField0_ & ~0x00000200);
4038       onChanged();
4039       return this;
4040     }
4041     /**
4042      *
4043      *
4044      * <pre>
4045      * IPv6 address of the interface inside Google Cloud Platform.
4046      * </pre>
4047      *
4048      * <code>optional string ipv6_nexthop_address = 27968211;</code>
4049      *
4050      * @param value The bytes for ipv6NexthopAddress to set.
4051      * @return This builder for chaining.
4052      */
setIpv6NexthopAddressBytes(com.google.protobuf.ByteString value)4053     public Builder setIpv6NexthopAddressBytes(com.google.protobuf.ByteString value) {
4054       if (value == null) {
4055         throw new NullPointerException();
4056       }
4057       checkByteStringIsUtf8(value);
4058       ipv6NexthopAddress_ = value;
4059       bitField0_ |= 0x00000200;
4060       onChanged();
4061       return this;
4062     }
4063 
4064     private java.lang.Object managementType_ = "";
4065     /**
4066      *
4067      *
4068      * <pre>
4069      * [Output Only] The resource that configures and manages this BGP peer. - MANAGED_BY_USER is the default value and can be managed by you or other users - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.
4070      * Check the ManagementType enum for the list of possible values.
4071      * </pre>
4072      *
4073      * <code>optional string management_type = 173703606;</code>
4074      *
4075      * @return Whether the managementType field is set.
4076      */
hasManagementType()4077     public boolean hasManagementType() {
4078       return ((bitField0_ & 0x00000400) != 0);
4079     }
4080     /**
4081      *
4082      *
4083      * <pre>
4084      * [Output Only] The resource that configures and manages this BGP peer. - MANAGED_BY_USER is the default value and can be managed by you or other users - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.
4085      * Check the ManagementType enum for the list of possible values.
4086      * </pre>
4087      *
4088      * <code>optional string management_type = 173703606;</code>
4089      *
4090      * @return The managementType.
4091      */
getManagementType()4092     public java.lang.String getManagementType() {
4093       java.lang.Object ref = managementType_;
4094       if (!(ref instanceof java.lang.String)) {
4095         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
4096         java.lang.String s = bs.toStringUtf8();
4097         managementType_ = s;
4098         return s;
4099       } else {
4100         return (java.lang.String) ref;
4101       }
4102     }
4103     /**
4104      *
4105      *
4106      * <pre>
4107      * [Output Only] The resource that configures and manages this BGP peer. - MANAGED_BY_USER is the default value and can be managed by you or other users - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.
4108      * Check the ManagementType enum for the list of possible values.
4109      * </pre>
4110      *
4111      * <code>optional string management_type = 173703606;</code>
4112      *
4113      * @return The bytes for managementType.
4114      */
getManagementTypeBytes()4115     public com.google.protobuf.ByteString getManagementTypeBytes() {
4116       java.lang.Object ref = managementType_;
4117       if (ref instanceof String) {
4118         com.google.protobuf.ByteString b =
4119             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
4120         managementType_ = b;
4121         return b;
4122       } else {
4123         return (com.google.protobuf.ByteString) ref;
4124       }
4125     }
4126     /**
4127      *
4128      *
4129      * <pre>
4130      * [Output Only] The resource that configures and manages this BGP peer. - MANAGED_BY_USER is the default value and can be managed by you or other users - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.
4131      * Check the ManagementType enum for the list of possible values.
4132      * </pre>
4133      *
4134      * <code>optional string management_type = 173703606;</code>
4135      *
4136      * @param value The managementType to set.
4137      * @return This builder for chaining.
4138      */
setManagementType(java.lang.String value)4139     public Builder setManagementType(java.lang.String value) {
4140       if (value == null) {
4141         throw new NullPointerException();
4142       }
4143       managementType_ = value;
4144       bitField0_ |= 0x00000400;
4145       onChanged();
4146       return this;
4147     }
4148     /**
4149      *
4150      *
4151      * <pre>
4152      * [Output Only] The resource that configures and manages this BGP peer. - MANAGED_BY_USER is the default value and can be managed by you or other users - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.
4153      * Check the ManagementType enum for the list of possible values.
4154      * </pre>
4155      *
4156      * <code>optional string management_type = 173703606;</code>
4157      *
4158      * @return This builder for chaining.
4159      */
clearManagementType()4160     public Builder clearManagementType() {
4161       managementType_ = getDefaultInstance().getManagementType();
4162       bitField0_ = (bitField0_ & ~0x00000400);
4163       onChanged();
4164       return this;
4165     }
4166     /**
4167      *
4168      *
4169      * <pre>
4170      * [Output Only] The resource that configures and manages this BGP peer. - MANAGED_BY_USER is the default value and can be managed by you or other users - MANAGED_BY_ATTACHMENT is a BGP peer that is configured and managed by Cloud Interconnect, specifically by an InterconnectAttachment of type PARTNER. Google automatically creates, updates, and deletes this type of BGP peer when the PARTNER InterconnectAttachment is created, updated, or deleted.
4171      * Check the ManagementType enum for the list of possible values.
4172      * </pre>
4173      *
4174      * <code>optional string management_type = 173703606;</code>
4175      *
4176      * @param value The bytes for managementType to set.
4177      * @return This builder for chaining.
4178      */
setManagementTypeBytes(com.google.protobuf.ByteString value)4179     public Builder setManagementTypeBytes(com.google.protobuf.ByteString value) {
4180       if (value == null) {
4181         throw new NullPointerException();
4182       }
4183       checkByteStringIsUtf8(value);
4184       managementType_ = value;
4185       bitField0_ |= 0x00000400;
4186       onChanged();
4187       return this;
4188     }
4189 
4190     private java.lang.Object md5AuthenticationKeyName_ = "";
4191     /**
4192      *
4193      *
4194      * <pre>
4195      * Present if MD5 authentication is enabled for the peering. Must be the name of one of the entries in the Router.md5_authentication_keys. The field must comply with RFC1035.
4196      * </pre>
4197      *
4198      * <code>optional string md5_authentication_key_name = 281075345;</code>
4199      *
4200      * @return Whether the md5AuthenticationKeyName field is set.
4201      */
hasMd5AuthenticationKeyName()4202     public boolean hasMd5AuthenticationKeyName() {
4203       return ((bitField0_ & 0x00000800) != 0);
4204     }
4205     /**
4206      *
4207      *
4208      * <pre>
4209      * Present if MD5 authentication is enabled for the peering. Must be the name of one of the entries in the Router.md5_authentication_keys. The field must comply with RFC1035.
4210      * </pre>
4211      *
4212      * <code>optional string md5_authentication_key_name = 281075345;</code>
4213      *
4214      * @return The md5AuthenticationKeyName.
4215      */
getMd5AuthenticationKeyName()4216     public java.lang.String getMd5AuthenticationKeyName() {
4217       java.lang.Object ref = md5AuthenticationKeyName_;
4218       if (!(ref instanceof java.lang.String)) {
4219         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
4220         java.lang.String s = bs.toStringUtf8();
4221         md5AuthenticationKeyName_ = s;
4222         return s;
4223       } else {
4224         return (java.lang.String) ref;
4225       }
4226     }
4227     /**
4228      *
4229      *
4230      * <pre>
4231      * Present if MD5 authentication is enabled for the peering. Must be the name of one of the entries in the Router.md5_authentication_keys. The field must comply with RFC1035.
4232      * </pre>
4233      *
4234      * <code>optional string md5_authentication_key_name = 281075345;</code>
4235      *
4236      * @return The bytes for md5AuthenticationKeyName.
4237      */
getMd5AuthenticationKeyNameBytes()4238     public com.google.protobuf.ByteString getMd5AuthenticationKeyNameBytes() {
4239       java.lang.Object ref = md5AuthenticationKeyName_;
4240       if (ref instanceof String) {
4241         com.google.protobuf.ByteString b =
4242             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
4243         md5AuthenticationKeyName_ = b;
4244         return b;
4245       } else {
4246         return (com.google.protobuf.ByteString) ref;
4247       }
4248     }
4249     /**
4250      *
4251      *
4252      * <pre>
4253      * Present if MD5 authentication is enabled for the peering. Must be the name of one of the entries in the Router.md5_authentication_keys. The field must comply with RFC1035.
4254      * </pre>
4255      *
4256      * <code>optional string md5_authentication_key_name = 281075345;</code>
4257      *
4258      * @param value The md5AuthenticationKeyName to set.
4259      * @return This builder for chaining.
4260      */
setMd5AuthenticationKeyName(java.lang.String value)4261     public Builder setMd5AuthenticationKeyName(java.lang.String value) {
4262       if (value == null) {
4263         throw new NullPointerException();
4264       }
4265       md5AuthenticationKeyName_ = value;
4266       bitField0_ |= 0x00000800;
4267       onChanged();
4268       return this;
4269     }
4270     /**
4271      *
4272      *
4273      * <pre>
4274      * Present if MD5 authentication is enabled for the peering. Must be the name of one of the entries in the Router.md5_authentication_keys. The field must comply with RFC1035.
4275      * </pre>
4276      *
4277      * <code>optional string md5_authentication_key_name = 281075345;</code>
4278      *
4279      * @return This builder for chaining.
4280      */
clearMd5AuthenticationKeyName()4281     public Builder clearMd5AuthenticationKeyName() {
4282       md5AuthenticationKeyName_ = getDefaultInstance().getMd5AuthenticationKeyName();
4283       bitField0_ = (bitField0_ & ~0x00000800);
4284       onChanged();
4285       return this;
4286     }
4287     /**
4288      *
4289      *
4290      * <pre>
4291      * Present if MD5 authentication is enabled for the peering. Must be the name of one of the entries in the Router.md5_authentication_keys. The field must comply with RFC1035.
4292      * </pre>
4293      *
4294      * <code>optional string md5_authentication_key_name = 281075345;</code>
4295      *
4296      * @param value The bytes for md5AuthenticationKeyName to set.
4297      * @return This builder for chaining.
4298      */
setMd5AuthenticationKeyNameBytes(com.google.protobuf.ByteString value)4299     public Builder setMd5AuthenticationKeyNameBytes(com.google.protobuf.ByteString value) {
4300       if (value == null) {
4301         throw new NullPointerException();
4302       }
4303       checkByteStringIsUtf8(value);
4304       md5AuthenticationKeyName_ = value;
4305       bitField0_ |= 0x00000800;
4306       onChanged();
4307       return this;
4308     }
4309 
4310     private java.lang.Object name_ = "";
4311     /**
4312      *
4313      *
4314      * <pre>
4315      * Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
4316      * </pre>
4317      *
4318      * <code>optional string name = 3373707;</code>
4319      *
4320      * @return Whether the name field is set.
4321      */
hasName()4322     public boolean hasName() {
4323       return ((bitField0_ & 0x00001000) != 0);
4324     }
4325     /**
4326      *
4327      *
4328      * <pre>
4329      * Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
4330      * </pre>
4331      *
4332      * <code>optional string name = 3373707;</code>
4333      *
4334      * @return The name.
4335      */
getName()4336     public java.lang.String getName() {
4337       java.lang.Object ref = name_;
4338       if (!(ref instanceof java.lang.String)) {
4339         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
4340         java.lang.String s = bs.toStringUtf8();
4341         name_ = s;
4342         return s;
4343       } else {
4344         return (java.lang.String) ref;
4345       }
4346     }
4347     /**
4348      *
4349      *
4350      * <pre>
4351      * Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
4352      * </pre>
4353      *
4354      * <code>optional string name = 3373707;</code>
4355      *
4356      * @return The bytes for name.
4357      */
getNameBytes()4358     public com.google.protobuf.ByteString getNameBytes() {
4359       java.lang.Object ref = name_;
4360       if (ref instanceof String) {
4361         com.google.protobuf.ByteString b =
4362             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
4363         name_ = b;
4364         return b;
4365       } else {
4366         return (com.google.protobuf.ByteString) ref;
4367       }
4368     }
4369     /**
4370      *
4371      *
4372      * <pre>
4373      * Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
4374      * </pre>
4375      *
4376      * <code>optional string name = 3373707;</code>
4377      *
4378      * @param value The name to set.
4379      * @return This builder for chaining.
4380      */
setName(java.lang.String value)4381     public Builder setName(java.lang.String value) {
4382       if (value == null) {
4383         throw new NullPointerException();
4384       }
4385       name_ = value;
4386       bitField0_ |= 0x00001000;
4387       onChanged();
4388       return this;
4389     }
4390     /**
4391      *
4392      *
4393      * <pre>
4394      * Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
4395      * </pre>
4396      *
4397      * <code>optional string name = 3373707;</code>
4398      *
4399      * @return This builder for chaining.
4400      */
clearName()4401     public Builder clearName() {
4402       name_ = getDefaultInstance().getName();
4403       bitField0_ = (bitField0_ & ~0x00001000);
4404       onChanged();
4405       return this;
4406     }
4407     /**
4408      *
4409      *
4410      * <pre>
4411      * Name of this BGP peer. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
4412      * </pre>
4413      *
4414      * <code>optional string name = 3373707;</code>
4415      *
4416      * @param value The bytes for name to set.
4417      * @return This builder for chaining.
4418      */
setNameBytes(com.google.protobuf.ByteString value)4419     public Builder setNameBytes(com.google.protobuf.ByteString value) {
4420       if (value == null) {
4421         throw new NullPointerException();
4422       }
4423       checkByteStringIsUtf8(value);
4424       name_ = value;
4425       bitField0_ |= 0x00001000;
4426       onChanged();
4427       return this;
4428     }
4429 
4430     private int peerAsn_;
4431     /**
4432      *
4433      *
4434      * <pre>
4435      * Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
4436      * </pre>
4437      *
4438      * <code>optional uint32 peer_asn = 69573151;</code>
4439      *
4440      * @return Whether the peerAsn field is set.
4441      */
4442     @java.lang.Override
hasPeerAsn()4443     public boolean hasPeerAsn() {
4444       return ((bitField0_ & 0x00002000) != 0);
4445     }
4446     /**
4447      *
4448      *
4449      * <pre>
4450      * Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
4451      * </pre>
4452      *
4453      * <code>optional uint32 peer_asn = 69573151;</code>
4454      *
4455      * @return The peerAsn.
4456      */
4457     @java.lang.Override
getPeerAsn()4458     public int getPeerAsn() {
4459       return peerAsn_;
4460     }
4461     /**
4462      *
4463      *
4464      * <pre>
4465      * Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
4466      * </pre>
4467      *
4468      * <code>optional uint32 peer_asn = 69573151;</code>
4469      *
4470      * @param value The peerAsn to set.
4471      * @return This builder for chaining.
4472      */
setPeerAsn(int value)4473     public Builder setPeerAsn(int value) {
4474 
4475       peerAsn_ = value;
4476       bitField0_ |= 0x00002000;
4477       onChanged();
4478       return this;
4479     }
4480     /**
4481      *
4482      *
4483      * <pre>
4484      * Peer BGP Autonomous System Number (ASN). Each BGP interface may use a different value.
4485      * </pre>
4486      *
4487      * <code>optional uint32 peer_asn = 69573151;</code>
4488      *
4489      * @return This builder for chaining.
4490      */
clearPeerAsn()4491     public Builder clearPeerAsn() {
4492       bitField0_ = (bitField0_ & ~0x00002000);
4493       peerAsn_ = 0;
4494       onChanged();
4495       return this;
4496     }
4497 
4498     private java.lang.Object peerIpAddress_ = "";
4499     /**
4500      *
4501      *
4502      * <pre>
4503      * IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
4504      * </pre>
4505      *
4506      * <code>optional string peer_ip_address = 207735769;</code>
4507      *
4508      * @return Whether the peerIpAddress field is set.
4509      */
hasPeerIpAddress()4510     public boolean hasPeerIpAddress() {
4511       return ((bitField0_ & 0x00004000) != 0);
4512     }
4513     /**
4514      *
4515      *
4516      * <pre>
4517      * IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
4518      * </pre>
4519      *
4520      * <code>optional string peer_ip_address = 207735769;</code>
4521      *
4522      * @return The peerIpAddress.
4523      */
getPeerIpAddress()4524     public java.lang.String getPeerIpAddress() {
4525       java.lang.Object ref = peerIpAddress_;
4526       if (!(ref instanceof java.lang.String)) {
4527         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
4528         java.lang.String s = bs.toStringUtf8();
4529         peerIpAddress_ = s;
4530         return s;
4531       } else {
4532         return (java.lang.String) ref;
4533       }
4534     }
4535     /**
4536      *
4537      *
4538      * <pre>
4539      * IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
4540      * </pre>
4541      *
4542      * <code>optional string peer_ip_address = 207735769;</code>
4543      *
4544      * @return The bytes for peerIpAddress.
4545      */
getPeerIpAddressBytes()4546     public com.google.protobuf.ByteString getPeerIpAddressBytes() {
4547       java.lang.Object ref = peerIpAddress_;
4548       if (ref instanceof String) {
4549         com.google.protobuf.ByteString b =
4550             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
4551         peerIpAddress_ = b;
4552         return b;
4553       } else {
4554         return (com.google.protobuf.ByteString) ref;
4555       }
4556     }
4557     /**
4558      *
4559      *
4560      * <pre>
4561      * IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
4562      * </pre>
4563      *
4564      * <code>optional string peer_ip_address = 207735769;</code>
4565      *
4566      * @param value The peerIpAddress to set.
4567      * @return This builder for chaining.
4568      */
setPeerIpAddress(java.lang.String value)4569     public Builder setPeerIpAddress(java.lang.String value) {
4570       if (value == null) {
4571         throw new NullPointerException();
4572       }
4573       peerIpAddress_ = value;
4574       bitField0_ |= 0x00004000;
4575       onChanged();
4576       return this;
4577     }
4578     /**
4579      *
4580      *
4581      * <pre>
4582      * IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
4583      * </pre>
4584      *
4585      * <code>optional string peer_ip_address = 207735769;</code>
4586      *
4587      * @return This builder for chaining.
4588      */
clearPeerIpAddress()4589     public Builder clearPeerIpAddress() {
4590       peerIpAddress_ = getDefaultInstance().getPeerIpAddress();
4591       bitField0_ = (bitField0_ & ~0x00004000);
4592       onChanged();
4593       return this;
4594     }
4595     /**
4596      *
4597      *
4598      * <pre>
4599      * IP address of the BGP interface outside Google Cloud Platform. Only IPv4 is supported.
4600      * </pre>
4601      *
4602      * <code>optional string peer_ip_address = 207735769;</code>
4603      *
4604      * @param value The bytes for peerIpAddress to set.
4605      * @return This builder for chaining.
4606      */
setPeerIpAddressBytes(com.google.protobuf.ByteString value)4607     public Builder setPeerIpAddressBytes(com.google.protobuf.ByteString value) {
4608       if (value == null) {
4609         throw new NullPointerException();
4610       }
4611       checkByteStringIsUtf8(value);
4612       peerIpAddress_ = value;
4613       bitField0_ |= 0x00004000;
4614       onChanged();
4615       return this;
4616     }
4617 
4618     private java.lang.Object peerIpv6NexthopAddress_ = "";
4619     /**
4620      *
4621      *
4622      * <pre>
4623      * IPv6 address of the BGP interface outside Google Cloud Platform.
4624      * </pre>
4625      *
4626      * <code>optional string peer_ipv6_nexthop_address = 491486608;</code>
4627      *
4628      * @return Whether the peerIpv6NexthopAddress field is set.
4629      */
hasPeerIpv6NexthopAddress()4630     public boolean hasPeerIpv6NexthopAddress() {
4631       return ((bitField0_ & 0x00008000) != 0);
4632     }
4633     /**
4634      *
4635      *
4636      * <pre>
4637      * IPv6 address of the BGP interface outside Google Cloud Platform.
4638      * </pre>
4639      *
4640      * <code>optional string peer_ipv6_nexthop_address = 491486608;</code>
4641      *
4642      * @return The peerIpv6NexthopAddress.
4643      */
getPeerIpv6NexthopAddress()4644     public java.lang.String getPeerIpv6NexthopAddress() {
4645       java.lang.Object ref = peerIpv6NexthopAddress_;
4646       if (!(ref instanceof java.lang.String)) {
4647         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
4648         java.lang.String s = bs.toStringUtf8();
4649         peerIpv6NexthopAddress_ = s;
4650         return s;
4651       } else {
4652         return (java.lang.String) ref;
4653       }
4654     }
4655     /**
4656      *
4657      *
4658      * <pre>
4659      * IPv6 address of the BGP interface outside Google Cloud Platform.
4660      * </pre>
4661      *
4662      * <code>optional string peer_ipv6_nexthop_address = 491486608;</code>
4663      *
4664      * @return The bytes for peerIpv6NexthopAddress.
4665      */
getPeerIpv6NexthopAddressBytes()4666     public com.google.protobuf.ByteString getPeerIpv6NexthopAddressBytes() {
4667       java.lang.Object ref = peerIpv6NexthopAddress_;
4668       if (ref instanceof String) {
4669         com.google.protobuf.ByteString b =
4670             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
4671         peerIpv6NexthopAddress_ = b;
4672         return b;
4673       } else {
4674         return (com.google.protobuf.ByteString) ref;
4675       }
4676     }
4677     /**
4678      *
4679      *
4680      * <pre>
4681      * IPv6 address of the BGP interface outside Google Cloud Platform.
4682      * </pre>
4683      *
4684      * <code>optional string peer_ipv6_nexthop_address = 491486608;</code>
4685      *
4686      * @param value The peerIpv6NexthopAddress to set.
4687      * @return This builder for chaining.
4688      */
setPeerIpv6NexthopAddress(java.lang.String value)4689     public Builder setPeerIpv6NexthopAddress(java.lang.String value) {
4690       if (value == null) {
4691         throw new NullPointerException();
4692       }
4693       peerIpv6NexthopAddress_ = value;
4694       bitField0_ |= 0x00008000;
4695       onChanged();
4696       return this;
4697     }
4698     /**
4699      *
4700      *
4701      * <pre>
4702      * IPv6 address of the BGP interface outside Google Cloud Platform.
4703      * </pre>
4704      *
4705      * <code>optional string peer_ipv6_nexthop_address = 491486608;</code>
4706      *
4707      * @return This builder for chaining.
4708      */
clearPeerIpv6NexthopAddress()4709     public Builder clearPeerIpv6NexthopAddress() {
4710       peerIpv6NexthopAddress_ = getDefaultInstance().getPeerIpv6NexthopAddress();
4711       bitField0_ = (bitField0_ & ~0x00008000);
4712       onChanged();
4713       return this;
4714     }
4715     /**
4716      *
4717      *
4718      * <pre>
4719      * IPv6 address of the BGP interface outside Google Cloud Platform.
4720      * </pre>
4721      *
4722      * <code>optional string peer_ipv6_nexthop_address = 491486608;</code>
4723      *
4724      * @param value The bytes for peerIpv6NexthopAddress to set.
4725      * @return This builder for chaining.
4726      */
setPeerIpv6NexthopAddressBytes(com.google.protobuf.ByteString value)4727     public Builder setPeerIpv6NexthopAddressBytes(com.google.protobuf.ByteString value) {
4728       if (value == null) {
4729         throw new NullPointerException();
4730       }
4731       checkByteStringIsUtf8(value);
4732       peerIpv6NexthopAddress_ = value;
4733       bitField0_ |= 0x00008000;
4734       onChanged();
4735       return this;
4736     }
4737 
4738     private java.lang.Object routerApplianceInstance_ = "";
4739     /**
4740      *
4741      *
4742      * <pre>
4743      * URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.
4744      * </pre>
4745      *
4746      * <code>optional string router_appliance_instance = 468312989;</code>
4747      *
4748      * @return Whether the routerApplianceInstance field is set.
4749      */
hasRouterApplianceInstance()4750     public boolean hasRouterApplianceInstance() {
4751       return ((bitField0_ & 0x00010000) != 0);
4752     }
4753     /**
4754      *
4755      *
4756      * <pre>
4757      * URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.
4758      * </pre>
4759      *
4760      * <code>optional string router_appliance_instance = 468312989;</code>
4761      *
4762      * @return The routerApplianceInstance.
4763      */
getRouterApplianceInstance()4764     public java.lang.String getRouterApplianceInstance() {
4765       java.lang.Object ref = routerApplianceInstance_;
4766       if (!(ref instanceof java.lang.String)) {
4767         com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
4768         java.lang.String s = bs.toStringUtf8();
4769         routerApplianceInstance_ = s;
4770         return s;
4771       } else {
4772         return (java.lang.String) ref;
4773       }
4774     }
4775     /**
4776      *
4777      *
4778      * <pre>
4779      * URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.
4780      * </pre>
4781      *
4782      * <code>optional string router_appliance_instance = 468312989;</code>
4783      *
4784      * @return The bytes for routerApplianceInstance.
4785      */
getRouterApplianceInstanceBytes()4786     public com.google.protobuf.ByteString getRouterApplianceInstanceBytes() {
4787       java.lang.Object ref = routerApplianceInstance_;
4788       if (ref instanceof String) {
4789         com.google.protobuf.ByteString b =
4790             com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
4791         routerApplianceInstance_ = b;
4792         return b;
4793       } else {
4794         return (com.google.protobuf.ByteString) ref;
4795       }
4796     }
4797     /**
4798      *
4799      *
4800      * <pre>
4801      * URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.
4802      * </pre>
4803      *
4804      * <code>optional string router_appliance_instance = 468312989;</code>
4805      *
4806      * @param value The routerApplianceInstance to set.
4807      * @return This builder for chaining.
4808      */
setRouterApplianceInstance(java.lang.String value)4809     public Builder setRouterApplianceInstance(java.lang.String value) {
4810       if (value == null) {
4811         throw new NullPointerException();
4812       }
4813       routerApplianceInstance_ = value;
4814       bitField0_ |= 0x00010000;
4815       onChanged();
4816       return this;
4817     }
4818     /**
4819      *
4820      *
4821      * <pre>
4822      * URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.
4823      * </pre>
4824      *
4825      * <code>optional string router_appliance_instance = 468312989;</code>
4826      *
4827      * @return This builder for chaining.
4828      */
clearRouterApplianceInstance()4829     public Builder clearRouterApplianceInstance() {
4830       routerApplianceInstance_ = getDefaultInstance().getRouterApplianceInstance();
4831       bitField0_ = (bitField0_ & ~0x00010000);
4832       onChanged();
4833       return this;
4834     }
4835     /**
4836      *
4837      *
4838      * <pre>
4839      * URI of the VM instance that is used as third-party router appliances such as Next Gen Firewalls, Virtual Routers, or Router Appliances. The VM instance must be located in zones contained in the same region as this Cloud Router. The VM instance is the peer side of the BGP session.
4840      * </pre>
4841      *
4842      * <code>optional string router_appliance_instance = 468312989;</code>
4843      *
4844      * @param value The bytes for routerApplianceInstance to set.
4845      * @return This builder for chaining.
4846      */
setRouterApplianceInstanceBytes(com.google.protobuf.ByteString value)4847     public Builder setRouterApplianceInstanceBytes(com.google.protobuf.ByteString value) {
4848       if (value == null) {
4849         throw new NullPointerException();
4850       }
4851       checkByteStringIsUtf8(value);
4852       routerApplianceInstance_ = value;
4853       bitField0_ |= 0x00010000;
4854       onChanged();
4855       return this;
4856     }
4857 
4858     @java.lang.Override
setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)4859     public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
4860       return super.setUnknownFields(unknownFields);
4861     }
4862 
4863     @java.lang.Override
mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)4864     public final Builder mergeUnknownFields(
4865         final com.google.protobuf.UnknownFieldSet unknownFields) {
4866       return super.mergeUnknownFields(unknownFields);
4867     }
4868 
4869     // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.RouterBgpPeer)
4870   }
4871 
4872   // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.RouterBgpPeer)
4873   private static final com.google.cloud.compute.v1.RouterBgpPeer DEFAULT_INSTANCE;
4874 
4875   static {
4876     DEFAULT_INSTANCE = new com.google.cloud.compute.v1.RouterBgpPeer();
4877   }
4878 
getDefaultInstance()4879   public static com.google.cloud.compute.v1.RouterBgpPeer getDefaultInstance() {
4880     return DEFAULT_INSTANCE;
4881   }
4882 
4883   private static final com.google.protobuf.Parser<RouterBgpPeer> PARSER =
4884       new com.google.protobuf.AbstractParser<RouterBgpPeer>() {
4885         @java.lang.Override
4886         public RouterBgpPeer parsePartialFrom(
4887             com.google.protobuf.CodedInputStream input,
4888             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
4889             throws com.google.protobuf.InvalidProtocolBufferException {
4890           Builder builder = newBuilder();
4891           try {
4892             builder.mergeFrom(input, extensionRegistry);
4893           } catch (com.google.protobuf.InvalidProtocolBufferException e) {
4894             throw e.setUnfinishedMessage(builder.buildPartial());
4895           } catch (com.google.protobuf.UninitializedMessageException e) {
4896             throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
4897           } catch (java.io.IOException e) {
4898             throw new com.google.protobuf.InvalidProtocolBufferException(e)
4899                 .setUnfinishedMessage(builder.buildPartial());
4900           }
4901           return builder.buildPartial();
4902         }
4903       };
4904 
parser()4905   public static com.google.protobuf.Parser<RouterBgpPeer> parser() {
4906     return PARSER;
4907   }
4908 
4909   @java.lang.Override
getParserForType()4910   public com.google.protobuf.Parser<RouterBgpPeer> getParserForType() {
4911     return PARSER;
4912   }
4913 
4914   @java.lang.Override
getDefaultInstanceForType()4915   public com.google.cloud.compute.v1.RouterBgpPeer getDefaultInstanceForType() {
4916     return DEFAULT_INSTANCE;
4917   }
4918 }
4919