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.RouterBgp} 28 */ 29 public final class RouterBgp extends com.google.protobuf.GeneratedMessageV3 30 implements 31 // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.RouterBgp) 32 RouterBgpOrBuilder { 33 private static final long serialVersionUID = 0L; 34 // Use RouterBgp.newBuilder() to construct. RouterBgp(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)35 private RouterBgp(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 36 super(builder); 37 } 38 RouterBgp()39 private RouterBgp() { 40 advertiseMode_ = ""; 41 advertisedGroups_ = com.google.protobuf.LazyStringArrayList.EMPTY; 42 advertisedIpRanges_ = java.util.Collections.emptyList(); 43 } 44 45 @java.lang.Override 46 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)47 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 48 return new RouterBgp(); 49 } 50 51 @java.lang.Override getUnknownFields()52 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 53 return this.unknownFields; 54 } 55 getDescriptor()56 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 57 return com.google.cloud.compute.v1.Compute 58 .internal_static_google_cloud_compute_v1_RouterBgp_descriptor; 59 } 60 61 @java.lang.Override 62 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()63 internalGetFieldAccessorTable() { 64 return com.google.cloud.compute.v1.Compute 65 .internal_static_google_cloud_compute_v1_RouterBgp_fieldAccessorTable 66 .ensureFieldAccessorsInitialized( 67 com.google.cloud.compute.v1.RouterBgp.class, 68 com.google.cloud.compute.v1.RouterBgp.Builder.class); 69 } 70 71 /** 72 * 73 * 74 * <pre> 75 * User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM. 76 * </pre> 77 * 78 * Protobuf enum {@code google.cloud.compute.v1.RouterBgp.AdvertiseMode} 79 */ 80 public enum AdvertiseMode implements com.google.protobuf.ProtocolMessageEnum { 81 /** 82 * 83 * 84 * <pre> 85 * A value indicating that the enum field is not set. 86 * </pre> 87 * 88 * <code>UNDEFINED_ADVERTISE_MODE = 0;</code> 89 */ 90 UNDEFINED_ADVERTISE_MODE(0), 91 /** <code>CUSTOM = 388595569;</code> */ 92 CUSTOM(388595569), 93 /** <code>DEFAULT = 115302945;</code> */ 94 DEFAULT(115302945), 95 UNRECOGNIZED(-1), 96 ; 97 98 /** 99 * 100 * 101 * <pre> 102 * A value indicating that the enum field is not set. 103 * </pre> 104 * 105 * <code>UNDEFINED_ADVERTISE_MODE = 0;</code> 106 */ 107 public static final int UNDEFINED_ADVERTISE_MODE_VALUE = 0; 108 /** <code>CUSTOM = 388595569;</code> */ 109 public static final int CUSTOM_VALUE = 388595569; 110 /** <code>DEFAULT = 115302945;</code> */ 111 public static final int DEFAULT_VALUE = 115302945; 112 getNumber()113 public final int getNumber() { 114 if (this == UNRECOGNIZED) { 115 throw new java.lang.IllegalArgumentException( 116 "Can't get the number of an unknown enum value."); 117 } 118 return value; 119 } 120 121 /** 122 * @param value The numeric wire value of the corresponding enum entry. 123 * @return The enum associated with the given numeric wire value. 124 * @deprecated Use {@link #forNumber(int)} instead. 125 */ 126 @java.lang.Deprecated valueOf(int value)127 public static AdvertiseMode valueOf(int value) { 128 return forNumber(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 */ forNumber(int value)135 public static AdvertiseMode forNumber(int value) { 136 switch (value) { 137 case 0: 138 return UNDEFINED_ADVERTISE_MODE; 139 case 388595569: 140 return CUSTOM; 141 case 115302945: 142 return DEFAULT; 143 default: 144 return null; 145 } 146 } 147 internalGetValueMap()148 public static com.google.protobuf.Internal.EnumLiteMap<AdvertiseMode> internalGetValueMap() { 149 return internalValueMap; 150 } 151 152 private static final com.google.protobuf.Internal.EnumLiteMap<AdvertiseMode> internalValueMap = 153 new com.google.protobuf.Internal.EnumLiteMap<AdvertiseMode>() { 154 public AdvertiseMode findValueByNumber(int number) { 155 return AdvertiseMode.forNumber(number); 156 } 157 }; 158 getValueDescriptor()159 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 160 if (this == UNRECOGNIZED) { 161 throw new java.lang.IllegalStateException( 162 "Can't get the descriptor of an unrecognized enum value."); 163 } 164 return getDescriptor().getValues().get(ordinal()); 165 } 166 getDescriptorForType()167 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 168 return getDescriptor(); 169 } 170 getDescriptor()171 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 172 return com.google.cloud.compute.v1.RouterBgp.getDescriptor().getEnumTypes().get(0); 173 } 174 175 private static final AdvertiseMode[] VALUES = values(); 176 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)177 public static AdvertiseMode valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 178 if (desc.getType() != getDescriptor()) { 179 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 180 } 181 if (desc.getIndex() == -1) { 182 return UNRECOGNIZED; 183 } 184 return VALUES[desc.getIndex()]; 185 } 186 187 private final int value; 188 AdvertiseMode(int value)189 private AdvertiseMode(int value) { 190 this.value = value; 191 } 192 193 // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.RouterBgp.AdvertiseMode) 194 } 195 196 /** 197 * 198 * 199 * <pre> 200 * </pre> 201 * 202 * Protobuf enum {@code google.cloud.compute.v1.RouterBgp.AdvertisedGroups} 203 */ 204 public enum AdvertisedGroups implements com.google.protobuf.ProtocolMessageEnum { 205 /** 206 * 207 * 208 * <pre> 209 * A value indicating that the enum field is not set. 210 * </pre> 211 * 212 * <code>UNDEFINED_ADVERTISED_GROUPS = 0;</code> 213 */ 214 UNDEFINED_ADVERTISED_GROUPS(0), 215 /** 216 * 217 * 218 * <pre> 219 * Advertise all available subnets (including peer VPC subnets). 220 * </pre> 221 * 222 * <code>ALL_SUBNETS = 3622872;</code> 223 */ 224 ALL_SUBNETS(3622872), 225 UNRECOGNIZED(-1), 226 ; 227 228 /** 229 * 230 * 231 * <pre> 232 * A value indicating that the enum field is not set. 233 * </pre> 234 * 235 * <code>UNDEFINED_ADVERTISED_GROUPS = 0;</code> 236 */ 237 public static final int UNDEFINED_ADVERTISED_GROUPS_VALUE = 0; 238 /** 239 * 240 * 241 * <pre> 242 * Advertise all available subnets (including peer VPC subnets). 243 * </pre> 244 * 245 * <code>ALL_SUBNETS = 3622872;</code> 246 */ 247 public static final int ALL_SUBNETS_VALUE = 3622872; 248 getNumber()249 public final int getNumber() { 250 if (this == UNRECOGNIZED) { 251 throw new java.lang.IllegalArgumentException( 252 "Can't get the number of an unknown enum value."); 253 } 254 return value; 255 } 256 257 /** 258 * @param value The numeric wire value of the corresponding enum entry. 259 * @return The enum associated with the given numeric wire value. 260 * @deprecated Use {@link #forNumber(int)} instead. 261 */ 262 @java.lang.Deprecated valueOf(int value)263 public static AdvertisedGroups valueOf(int value) { 264 return forNumber(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 */ forNumber(int value)271 public static AdvertisedGroups forNumber(int value) { 272 switch (value) { 273 case 0: 274 return UNDEFINED_ADVERTISED_GROUPS; 275 case 3622872: 276 return ALL_SUBNETS; 277 default: 278 return null; 279 } 280 } 281 internalGetValueMap()282 public static com.google.protobuf.Internal.EnumLiteMap<AdvertisedGroups> internalGetValueMap() { 283 return internalValueMap; 284 } 285 286 private static final com.google.protobuf.Internal.EnumLiteMap<AdvertisedGroups> 287 internalValueMap = 288 new com.google.protobuf.Internal.EnumLiteMap<AdvertisedGroups>() { 289 public AdvertisedGroups findValueByNumber(int number) { 290 return AdvertisedGroups.forNumber(number); 291 } 292 }; 293 getValueDescriptor()294 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 295 if (this == UNRECOGNIZED) { 296 throw new java.lang.IllegalStateException( 297 "Can't get the descriptor of an unrecognized enum value."); 298 } 299 return getDescriptor().getValues().get(ordinal()); 300 } 301 getDescriptorForType()302 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 303 return getDescriptor(); 304 } 305 getDescriptor()306 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 307 return com.google.cloud.compute.v1.RouterBgp.getDescriptor().getEnumTypes().get(1); 308 } 309 310 private static final AdvertisedGroups[] VALUES = values(); 311 valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc)312 public static AdvertisedGroups valueOf( 313 com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 314 if (desc.getType() != getDescriptor()) { 315 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 316 } 317 if (desc.getIndex() == -1) { 318 return UNRECOGNIZED; 319 } 320 return VALUES[desc.getIndex()]; 321 } 322 323 private final int value; 324 AdvertisedGroups(int value)325 private AdvertisedGroups(int value) { 326 this.value = value; 327 } 328 329 // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.RouterBgp.AdvertisedGroups) 330 } 331 332 private int bitField0_; 333 public static final int ADVERTISE_MODE_FIELD_NUMBER = 312134331; 334 335 @SuppressWarnings("serial") 336 private volatile java.lang.Object advertiseMode_ = ""; 337 /** 338 * 339 * 340 * <pre> 341 * User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM. 342 * Check the AdvertiseMode enum for the list of possible values. 343 * </pre> 344 * 345 * <code>optional string advertise_mode = 312134331;</code> 346 * 347 * @return Whether the advertiseMode field is set. 348 */ 349 @java.lang.Override hasAdvertiseMode()350 public boolean hasAdvertiseMode() { 351 return ((bitField0_ & 0x00000001) != 0); 352 } 353 /** 354 * 355 * 356 * <pre> 357 * User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM. 358 * Check the AdvertiseMode enum for the list of possible values. 359 * </pre> 360 * 361 * <code>optional string advertise_mode = 312134331;</code> 362 * 363 * @return The advertiseMode. 364 */ 365 @java.lang.Override getAdvertiseMode()366 public java.lang.String getAdvertiseMode() { 367 java.lang.Object ref = advertiseMode_; 368 if (ref instanceof java.lang.String) { 369 return (java.lang.String) ref; 370 } else { 371 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 372 java.lang.String s = bs.toStringUtf8(); 373 advertiseMode_ = s; 374 return s; 375 } 376 } 377 /** 378 * 379 * 380 * <pre> 381 * User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM. 382 * Check the AdvertiseMode enum for the list of possible values. 383 * </pre> 384 * 385 * <code>optional string advertise_mode = 312134331;</code> 386 * 387 * @return The bytes for advertiseMode. 388 */ 389 @java.lang.Override getAdvertiseModeBytes()390 public com.google.protobuf.ByteString getAdvertiseModeBytes() { 391 java.lang.Object ref = advertiseMode_; 392 if (ref instanceof java.lang.String) { 393 com.google.protobuf.ByteString b = 394 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 395 advertiseMode_ = b; 396 return b; 397 } else { 398 return (com.google.protobuf.ByteString) ref; 399 } 400 } 401 402 public static final int ADVERTISED_GROUPS_FIELD_NUMBER = 21065526; 403 404 @SuppressWarnings("serial") 405 private com.google.protobuf.LazyStringList advertisedGroups_; 406 /** 407 * 408 * 409 * <pre> 410 * User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. 411 * Check the AdvertisedGroups enum for the list of possible values. 412 * </pre> 413 * 414 * <code>repeated string advertised_groups = 21065526;</code> 415 * 416 * @return A list containing the advertisedGroups. 417 */ getAdvertisedGroupsList()418 public com.google.protobuf.ProtocolStringList getAdvertisedGroupsList() { 419 return advertisedGroups_; 420 } 421 /** 422 * 423 * 424 * <pre> 425 * User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. 426 * Check the AdvertisedGroups enum for the list of possible values. 427 * </pre> 428 * 429 * <code>repeated string advertised_groups = 21065526;</code> 430 * 431 * @return The count of advertisedGroups. 432 */ getAdvertisedGroupsCount()433 public int getAdvertisedGroupsCount() { 434 return advertisedGroups_.size(); 435 } 436 /** 437 * 438 * 439 * <pre> 440 * User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. 441 * Check the AdvertisedGroups enum for the list of possible values. 442 * </pre> 443 * 444 * <code>repeated string advertised_groups = 21065526;</code> 445 * 446 * @param index The index of the element to return. 447 * @return The advertisedGroups at the given index. 448 */ getAdvertisedGroups(int index)449 public java.lang.String getAdvertisedGroups(int index) { 450 return advertisedGroups_.get(index); 451 } 452 /** 453 * 454 * 455 * <pre> 456 * User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. 457 * Check the AdvertisedGroups enum for the list of possible values. 458 * </pre> 459 * 460 * <code>repeated string advertised_groups = 21065526;</code> 461 * 462 * @param index The index of the value to return. 463 * @return The bytes of the advertisedGroups at the given index. 464 */ getAdvertisedGroupsBytes(int index)465 public com.google.protobuf.ByteString getAdvertisedGroupsBytes(int index) { 466 return advertisedGroups_.getByteString(index); 467 } 468 469 public static final int ADVERTISED_IP_RANGES_FIELD_NUMBER = 35449932; 470 471 @SuppressWarnings("serial") 472 private java.util.List<com.google.cloud.compute.v1.RouterAdvertisedIpRange> advertisedIpRanges_; 473 /** 474 * 475 * 476 * <pre> 477 * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. 478 * </pre> 479 * 480 * <code> 481 * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932; 482 * </code> 483 */ 484 @java.lang.Override 485 public java.util.List<com.google.cloud.compute.v1.RouterAdvertisedIpRange> getAdvertisedIpRangesList()486 getAdvertisedIpRangesList() { 487 return advertisedIpRanges_; 488 } 489 /** 490 * 491 * 492 * <pre> 493 * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. 494 * </pre> 495 * 496 * <code> 497 * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932; 498 * </code> 499 */ 500 @java.lang.Override 501 public java.util.List<? extends com.google.cloud.compute.v1.RouterAdvertisedIpRangeOrBuilder> getAdvertisedIpRangesOrBuilderList()502 getAdvertisedIpRangesOrBuilderList() { 503 return advertisedIpRanges_; 504 } 505 /** 506 * 507 * 508 * <pre> 509 * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. 510 * </pre> 511 * 512 * <code> 513 * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932; 514 * </code> 515 */ 516 @java.lang.Override getAdvertisedIpRangesCount()517 public int getAdvertisedIpRangesCount() { 518 return advertisedIpRanges_.size(); 519 } 520 /** 521 * 522 * 523 * <pre> 524 * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. 525 * </pre> 526 * 527 * <code> 528 * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932; 529 * </code> 530 */ 531 @java.lang.Override getAdvertisedIpRanges(int index)532 public com.google.cloud.compute.v1.RouterAdvertisedIpRange getAdvertisedIpRanges(int index) { 533 return advertisedIpRanges_.get(index); 534 } 535 /** 536 * 537 * 538 * <pre> 539 * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. 540 * </pre> 541 * 542 * <code> 543 * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932; 544 * </code> 545 */ 546 @java.lang.Override 547 public com.google.cloud.compute.v1.RouterAdvertisedIpRangeOrBuilder getAdvertisedIpRangesOrBuilder(int index)548 getAdvertisedIpRangesOrBuilder(int index) { 549 return advertisedIpRanges_.get(index); 550 } 551 552 public static final int ASN_FIELD_NUMBER = 96892; 553 private int asn_ = 0; 554 /** 555 * 556 * 557 * <pre> 558 * Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN. 559 * </pre> 560 * 561 * <code>optional uint32 asn = 96892;</code> 562 * 563 * @return Whether the asn field is set. 564 */ 565 @java.lang.Override hasAsn()566 public boolean hasAsn() { 567 return ((bitField0_ & 0x00000002) != 0); 568 } 569 /** 570 * 571 * 572 * <pre> 573 * Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN. 574 * </pre> 575 * 576 * <code>optional uint32 asn = 96892;</code> 577 * 578 * @return The asn. 579 */ 580 @java.lang.Override getAsn()581 public int getAsn() { 582 return asn_; 583 } 584 585 public static final int KEEPALIVE_INTERVAL_FIELD_NUMBER = 276771516; 586 private int keepaliveInterval_ = 0; 587 /** 588 * 589 * 590 * <pre> 591 * The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 20 and 60. The default is 20. 592 * </pre> 593 * 594 * <code>optional uint32 keepalive_interval = 276771516;</code> 595 * 596 * @return Whether the keepaliveInterval field is set. 597 */ 598 @java.lang.Override hasKeepaliveInterval()599 public boolean hasKeepaliveInterval() { 600 return ((bitField0_ & 0x00000004) != 0); 601 } 602 /** 603 * 604 * 605 * <pre> 606 * The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 20 and 60. The default is 20. 607 * </pre> 608 * 609 * <code>optional uint32 keepalive_interval = 276771516;</code> 610 * 611 * @return The keepaliveInterval. 612 */ 613 @java.lang.Override getKeepaliveInterval()614 public int getKeepaliveInterval() { 615 return keepaliveInterval_; 616 } 617 618 private byte memoizedIsInitialized = -1; 619 620 @java.lang.Override isInitialized()621 public final boolean isInitialized() { 622 byte isInitialized = memoizedIsInitialized; 623 if (isInitialized == 1) return true; 624 if (isInitialized == 0) return false; 625 626 memoizedIsInitialized = 1; 627 return true; 628 } 629 630 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)631 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 632 if (((bitField0_ & 0x00000002) != 0)) { 633 output.writeUInt32(96892, asn_); 634 } 635 for (int i = 0; i < advertisedGroups_.size(); i++) { 636 com.google.protobuf.GeneratedMessageV3.writeString( 637 output, 21065526, advertisedGroups_.getRaw(i)); 638 } 639 for (int i = 0; i < advertisedIpRanges_.size(); i++) { 640 output.writeMessage(35449932, advertisedIpRanges_.get(i)); 641 } 642 if (((bitField0_ & 0x00000004) != 0)) { 643 output.writeUInt32(276771516, keepaliveInterval_); 644 } 645 if (((bitField0_ & 0x00000001) != 0)) { 646 com.google.protobuf.GeneratedMessageV3.writeString(output, 312134331, advertiseMode_); 647 } 648 getUnknownFields().writeTo(output); 649 } 650 651 @java.lang.Override getSerializedSize()652 public int getSerializedSize() { 653 int size = memoizedSize; 654 if (size != -1) return size; 655 656 size = 0; 657 if (((bitField0_ & 0x00000002) != 0)) { 658 size += com.google.protobuf.CodedOutputStream.computeUInt32Size(96892, asn_); 659 } 660 { 661 int dataSize = 0; 662 for (int i = 0; i < advertisedGroups_.size(); i++) { 663 dataSize += computeStringSizeNoTag(advertisedGroups_.getRaw(i)); 664 } 665 size += dataSize; 666 size += 4 * getAdvertisedGroupsList().size(); 667 } 668 for (int i = 0; i < advertisedIpRanges_.size(); i++) { 669 size += 670 com.google.protobuf.CodedOutputStream.computeMessageSize( 671 35449932, advertisedIpRanges_.get(i)); 672 } 673 if (((bitField0_ & 0x00000004) != 0)) { 674 size += 675 com.google.protobuf.CodedOutputStream.computeUInt32Size(276771516, keepaliveInterval_); 676 } 677 if (((bitField0_ & 0x00000001) != 0)) { 678 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(312134331, advertiseMode_); 679 } 680 size += getUnknownFields().getSerializedSize(); 681 memoizedSize = size; 682 return size; 683 } 684 685 @java.lang.Override equals(final java.lang.Object obj)686 public boolean equals(final java.lang.Object obj) { 687 if (obj == this) { 688 return true; 689 } 690 if (!(obj instanceof com.google.cloud.compute.v1.RouterBgp)) { 691 return super.equals(obj); 692 } 693 com.google.cloud.compute.v1.RouterBgp other = (com.google.cloud.compute.v1.RouterBgp) obj; 694 695 if (hasAdvertiseMode() != other.hasAdvertiseMode()) return false; 696 if (hasAdvertiseMode()) { 697 if (!getAdvertiseMode().equals(other.getAdvertiseMode())) return false; 698 } 699 if (!getAdvertisedGroupsList().equals(other.getAdvertisedGroupsList())) return false; 700 if (!getAdvertisedIpRangesList().equals(other.getAdvertisedIpRangesList())) return false; 701 if (hasAsn() != other.hasAsn()) return false; 702 if (hasAsn()) { 703 if (getAsn() != other.getAsn()) return false; 704 } 705 if (hasKeepaliveInterval() != other.hasKeepaliveInterval()) return false; 706 if (hasKeepaliveInterval()) { 707 if (getKeepaliveInterval() != other.getKeepaliveInterval()) return false; 708 } 709 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 710 return true; 711 } 712 713 @java.lang.Override hashCode()714 public int hashCode() { 715 if (memoizedHashCode != 0) { 716 return memoizedHashCode; 717 } 718 int hash = 41; 719 hash = (19 * hash) + getDescriptor().hashCode(); 720 if (hasAdvertiseMode()) { 721 hash = (37 * hash) + ADVERTISE_MODE_FIELD_NUMBER; 722 hash = (53 * hash) + getAdvertiseMode().hashCode(); 723 } 724 if (getAdvertisedGroupsCount() > 0) { 725 hash = (37 * hash) + ADVERTISED_GROUPS_FIELD_NUMBER; 726 hash = (53 * hash) + getAdvertisedGroupsList().hashCode(); 727 } 728 if (getAdvertisedIpRangesCount() > 0) { 729 hash = (37 * hash) + ADVERTISED_IP_RANGES_FIELD_NUMBER; 730 hash = (53 * hash) + getAdvertisedIpRangesList().hashCode(); 731 } 732 if (hasAsn()) { 733 hash = (37 * hash) + ASN_FIELD_NUMBER; 734 hash = (53 * hash) + getAsn(); 735 } 736 if (hasKeepaliveInterval()) { 737 hash = (37 * hash) + KEEPALIVE_INTERVAL_FIELD_NUMBER; 738 hash = (53 * hash) + getKeepaliveInterval(); 739 } 740 hash = (29 * hash) + getUnknownFields().hashCode(); 741 memoizedHashCode = hash; 742 return hash; 743 } 744 parseFrom(java.nio.ByteBuffer data)745 public static com.google.cloud.compute.v1.RouterBgp parseFrom(java.nio.ByteBuffer data) 746 throws com.google.protobuf.InvalidProtocolBufferException { 747 return PARSER.parseFrom(data); 748 } 749 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)750 public static com.google.cloud.compute.v1.RouterBgp parseFrom( 751 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 752 throws com.google.protobuf.InvalidProtocolBufferException { 753 return PARSER.parseFrom(data, extensionRegistry); 754 } 755 parseFrom(com.google.protobuf.ByteString data)756 public static com.google.cloud.compute.v1.RouterBgp parseFrom(com.google.protobuf.ByteString data) 757 throws com.google.protobuf.InvalidProtocolBufferException { 758 return PARSER.parseFrom(data); 759 } 760 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)761 public static com.google.cloud.compute.v1.RouterBgp parseFrom( 762 com.google.protobuf.ByteString data, 763 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 764 throws com.google.protobuf.InvalidProtocolBufferException { 765 return PARSER.parseFrom(data, extensionRegistry); 766 } 767 parseFrom(byte[] data)768 public static com.google.cloud.compute.v1.RouterBgp parseFrom(byte[] data) 769 throws com.google.protobuf.InvalidProtocolBufferException { 770 return PARSER.parseFrom(data); 771 } 772 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)773 public static com.google.cloud.compute.v1.RouterBgp parseFrom( 774 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 775 throws com.google.protobuf.InvalidProtocolBufferException { 776 return PARSER.parseFrom(data, extensionRegistry); 777 } 778 parseFrom(java.io.InputStream input)779 public static com.google.cloud.compute.v1.RouterBgp parseFrom(java.io.InputStream input) 780 throws java.io.IOException { 781 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 782 } 783 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)784 public static com.google.cloud.compute.v1.RouterBgp parseFrom( 785 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 786 throws java.io.IOException { 787 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 788 PARSER, input, extensionRegistry); 789 } 790 parseDelimitedFrom(java.io.InputStream input)791 public static com.google.cloud.compute.v1.RouterBgp parseDelimitedFrom(java.io.InputStream input) 792 throws java.io.IOException { 793 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 794 } 795 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)796 public static com.google.cloud.compute.v1.RouterBgp parseDelimitedFrom( 797 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 798 throws java.io.IOException { 799 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 800 PARSER, input, extensionRegistry); 801 } 802 parseFrom( com.google.protobuf.CodedInputStream input)803 public static com.google.cloud.compute.v1.RouterBgp parseFrom( 804 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 805 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 806 } 807 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)808 public static com.google.cloud.compute.v1.RouterBgp parseFrom( 809 com.google.protobuf.CodedInputStream input, 810 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 811 throws java.io.IOException { 812 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 813 PARSER, input, extensionRegistry); 814 } 815 816 @java.lang.Override newBuilderForType()817 public Builder newBuilderForType() { 818 return newBuilder(); 819 } 820 newBuilder()821 public static Builder newBuilder() { 822 return DEFAULT_INSTANCE.toBuilder(); 823 } 824 newBuilder(com.google.cloud.compute.v1.RouterBgp prototype)825 public static Builder newBuilder(com.google.cloud.compute.v1.RouterBgp prototype) { 826 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 827 } 828 829 @java.lang.Override toBuilder()830 public Builder toBuilder() { 831 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 832 } 833 834 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)835 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 836 Builder builder = new Builder(parent); 837 return builder; 838 } 839 /** 840 * 841 * 842 * <pre> 843 * </pre> 844 * 845 * Protobuf type {@code google.cloud.compute.v1.RouterBgp} 846 */ 847 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 848 implements 849 // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.RouterBgp) 850 com.google.cloud.compute.v1.RouterBgpOrBuilder { getDescriptor()851 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 852 return com.google.cloud.compute.v1.Compute 853 .internal_static_google_cloud_compute_v1_RouterBgp_descriptor; 854 } 855 856 @java.lang.Override 857 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()858 internalGetFieldAccessorTable() { 859 return com.google.cloud.compute.v1.Compute 860 .internal_static_google_cloud_compute_v1_RouterBgp_fieldAccessorTable 861 .ensureFieldAccessorsInitialized( 862 com.google.cloud.compute.v1.RouterBgp.class, 863 com.google.cloud.compute.v1.RouterBgp.Builder.class); 864 } 865 866 // Construct using com.google.cloud.compute.v1.RouterBgp.newBuilder() Builder()867 private Builder() {} 868 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)869 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 870 super(parent); 871 } 872 873 @java.lang.Override clear()874 public Builder clear() { 875 super.clear(); 876 bitField0_ = 0; 877 advertiseMode_ = ""; 878 advertisedGroups_ = com.google.protobuf.LazyStringArrayList.EMPTY; 879 bitField0_ = (bitField0_ & ~0x00000002); 880 if (advertisedIpRangesBuilder_ == null) { 881 advertisedIpRanges_ = java.util.Collections.emptyList(); 882 } else { 883 advertisedIpRanges_ = null; 884 advertisedIpRangesBuilder_.clear(); 885 } 886 bitField0_ = (bitField0_ & ~0x00000004); 887 asn_ = 0; 888 keepaliveInterval_ = 0; 889 return this; 890 } 891 892 @java.lang.Override getDescriptorForType()893 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 894 return com.google.cloud.compute.v1.Compute 895 .internal_static_google_cloud_compute_v1_RouterBgp_descriptor; 896 } 897 898 @java.lang.Override getDefaultInstanceForType()899 public com.google.cloud.compute.v1.RouterBgp getDefaultInstanceForType() { 900 return com.google.cloud.compute.v1.RouterBgp.getDefaultInstance(); 901 } 902 903 @java.lang.Override build()904 public com.google.cloud.compute.v1.RouterBgp build() { 905 com.google.cloud.compute.v1.RouterBgp result = buildPartial(); 906 if (!result.isInitialized()) { 907 throw newUninitializedMessageException(result); 908 } 909 return result; 910 } 911 912 @java.lang.Override buildPartial()913 public com.google.cloud.compute.v1.RouterBgp buildPartial() { 914 com.google.cloud.compute.v1.RouterBgp result = 915 new com.google.cloud.compute.v1.RouterBgp(this); 916 buildPartialRepeatedFields(result); 917 if (bitField0_ != 0) { 918 buildPartial0(result); 919 } 920 onBuilt(); 921 return result; 922 } 923 buildPartialRepeatedFields(com.google.cloud.compute.v1.RouterBgp result)924 private void buildPartialRepeatedFields(com.google.cloud.compute.v1.RouterBgp result) { 925 if (((bitField0_ & 0x00000002) != 0)) { 926 advertisedGroups_ = advertisedGroups_.getUnmodifiableView(); 927 bitField0_ = (bitField0_ & ~0x00000002); 928 } 929 result.advertisedGroups_ = advertisedGroups_; 930 if (advertisedIpRangesBuilder_ == null) { 931 if (((bitField0_ & 0x00000004) != 0)) { 932 advertisedIpRanges_ = java.util.Collections.unmodifiableList(advertisedIpRanges_); 933 bitField0_ = (bitField0_ & ~0x00000004); 934 } 935 result.advertisedIpRanges_ = advertisedIpRanges_; 936 } else { 937 result.advertisedIpRanges_ = advertisedIpRangesBuilder_.build(); 938 } 939 } 940 buildPartial0(com.google.cloud.compute.v1.RouterBgp result)941 private void buildPartial0(com.google.cloud.compute.v1.RouterBgp result) { 942 int from_bitField0_ = bitField0_; 943 int to_bitField0_ = 0; 944 if (((from_bitField0_ & 0x00000001) != 0)) { 945 result.advertiseMode_ = advertiseMode_; 946 to_bitField0_ |= 0x00000001; 947 } 948 if (((from_bitField0_ & 0x00000008) != 0)) { 949 result.asn_ = asn_; 950 to_bitField0_ |= 0x00000002; 951 } 952 if (((from_bitField0_ & 0x00000010) != 0)) { 953 result.keepaliveInterval_ = keepaliveInterval_; 954 to_bitField0_ |= 0x00000004; 955 } 956 result.bitField0_ |= to_bitField0_; 957 } 958 959 @java.lang.Override clone()960 public Builder clone() { 961 return super.clone(); 962 } 963 964 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)965 public Builder setField( 966 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 967 return super.setField(field, value); 968 } 969 970 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)971 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 972 return super.clearField(field); 973 } 974 975 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)976 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 977 return super.clearOneof(oneof); 978 } 979 980 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)981 public Builder setRepeatedField( 982 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 983 return super.setRepeatedField(field, index, value); 984 } 985 986 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)987 public Builder addRepeatedField( 988 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 989 return super.addRepeatedField(field, value); 990 } 991 992 @java.lang.Override mergeFrom(com.google.protobuf.Message other)993 public Builder mergeFrom(com.google.protobuf.Message other) { 994 if (other instanceof com.google.cloud.compute.v1.RouterBgp) { 995 return mergeFrom((com.google.cloud.compute.v1.RouterBgp) other); 996 } else { 997 super.mergeFrom(other); 998 return this; 999 } 1000 } 1001 mergeFrom(com.google.cloud.compute.v1.RouterBgp other)1002 public Builder mergeFrom(com.google.cloud.compute.v1.RouterBgp other) { 1003 if (other == com.google.cloud.compute.v1.RouterBgp.getDefaultInstance()) return this; 1004 if (other.hasAdvertiseMode()) { 1005 advertiseMode_ = other.advertiseMode_; 1006 bitField0_ |= 0x00000001; 1007 onChanged(); 1008 } 1009 if (!other.advertisedGroups_.isEmpty()) { 1010 if (advertisedGroups_.isEmpty()) { 1011 advertisedGroups_ = other.advertisedGroups_; 1012 bitField0_ = (bitField0_ & ~0x00000002); 1013 } else { 1014 ensureAdvertisedGroupsIsMutable(); 1015 advertisedGroups_.addAll(other.advertisedGroups_); 1016 } 1017 onChanged(); 1018 } 1019 if (advertisedIpRangesBuilder_ == null) { 1020 if (!other.advertisedIpRanges_.isEmpty()) { 1021 if (advertisedIpRanges_.isEmpty()) { 1022 advertisedIpRanges_ = other.advertisedIpRanges_; 1023 bitField0_ = (bitField0_ & ~0x00000004); 1024 } else { 1025 ensureAdvertisedIpRangesIsMutable(); 1026 advertisedIpRanges_.addAll(other.advertisedIpRanges_); 1027 } 1028 onChanged(); 1029 } 1030 } else { 1031 if (!other.advertisedIpRanges_.isEmpty()) { 1032 if (advertisedIpRangesBuilder_.isEmpty()) { 1033 advertisedIpRangesBuilder_.dispose(); 1034 advertisedIpRangesBuilder_ = null; 1035 advertisedIpRanges_ = other.advertisedIpRanges_; 1036 bitField0_ = (bitField0_ & ~0x00000004); 1037 advertisedIpRangesBuilder_ = 1038 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 1039 ? getAdvertisedIpRangesFieldBuilder() 1040 : null; 1041 } else { 1042 advertisedIpRangesBuilder_.addAllMessages(other.advertisedIpRanges_); 1043 } 1044 } 1045 } 1046 if (other.hasAsn()) { 1047 setAsn(other.getAsn()); 1048 } 1049 if (other.hasKeepaliveInterval()) { 1050 setKeepaliveInterval(other.getKeepaliveInterval()); 1051 } 1052 this.mergeUnknownFields(other.getUnknownFields()); 1053 onChanged(); 1054 return this; 1055 } 1056 1057 @java.lang.Override isInitialized()1058 public final boolean isInitialized() { 1059 return true; 1060 } 1061 1062 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1063 public Builder mergeFrom( 1064 com.google.protobuf.CodedInputStream input, 1065 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1066 throws java.io.IOException { 1067 if (extensionRegistry == null) { 1068 throw new java.lang.NullPointerException(); 1069 } 1070 try { 1071 boolean done = false; 1072 while (!done) { 1073 int tag = input.readTag(); 1074 switch (tag) { 1075 case 0: 1076 done = true; 1077 break; 1078 case 775136: 1079 { 1080 asn_ = input.readUInt32(); 1081 bitField0_ |= 0x00000008; 1082 break; 1083 } // case 775136 1084 case 168524210: 1085 { 1086 java.lang.String s = input.readStringRequireUtf8(); 1087 ensureAdvertisedGroupsIsMutable(); 1088 advertisedGroups_.add(s); 1089 break; 1090 } // case 168524210 1091 case 283599458: 1092 { 1093 com.google.cloud.compute.v1.RouterAdvertisedIpRange m = 1094 input.readMessage( 1095 com.google.cloud.compute.v1.RouterAdvertisedIpRange.parser(), 1096 extensionRegistry); 1097 if (advertisedIpRangesBuilder_ == null) { 1098 ensureAdvertisedIpRangesIsMutable(); 1099 advertisedIpRanges_.add(m); 1100 } else { 1101 advertisedIpRangesBuilder_.addMessage(m); 1102 } 1103 break; 1104 } // case 283599458 1105 case -2080795168: 1106 { 1107 keepaliveInterval_ = input.readUInt32(); 1108 bitField0_ |= 0x00000010; 1109 break; 1110 } // case -2080795168 1111 case -1797892646: 1112 { 1113 advertiseMode_ = input.readStringRequireUtf8(); 1114 bitField0_ |= 0x00000001; 1115 break; 1116 } // case -1797892646 1117 default: 1118 { 1119 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1120 done = true; // was an endgroup tag 1121 } 1122 break; 1123 } // default: 1124 } // switch (tag) 1125 } // while (!done) 1126 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1127 throw e.unwrapIOException(); 1128 } finally { 1129 onChanged(); 1130 } // finally 1131 return this; 1132 } 1133 1134 private int bitField0_; 1135 1136 private java.lang.Object advertiseMode_ = ""; 1137 /** 1138 * 1139 * 1140 * <pre> 1141 * User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM. 1142 * Check the AdvertiseMode enum for the list of possible values. 1143 * </pre> 1144 * 1145 * <code>optional string advertise_mode = 312134331;</code> 1146 * 1147 * @return Whether the advertiseMode field is set. 1148 */ hasAdvertiseMode()1149 public boolean hasAdvertiseMode() { 1150 return ((bitField0_ & 0x00000001) != 0); 1151 } 1152 /** 1153 * 1154 * 1155 * <pre> 1156 * User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM. 1157 * Check the AdvertiseMode enum for the list of possible values. 1158 * </pre> 1159 * 1160 * <code>optional string advertise_mode = 312134331;</code> 1161 * 1162 * @return The advertiseMode. 1163 */ getAdvertiseMode()1164 public java.lang.String getAdvertiseMode() { 1165 java.lang.Object ref = advertiseMode_; 1166 if (!(ref instanceof java.lang.String)) { 1167 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1168 java.lang.String s = bs.toStringUtf8(); 1169 advertiseMode_ = s; 1170 return s; 1171 } else { 1172 return (java.lang.String) ref; 1173 } 1174 } 1175 /** 1176 * 1177 * 1178 * <pre> 1179 * User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM. 1180 * Check the AdvertiseMode enum for the list of possible values. 1181 * </pre> 1182 * 1183 * <code>optional string advertise_mode = 312134331;</code> 1184 * 1185 * @return The bytes for advertiseMode. 1186 */ getAdvertiseModeBytes()1187 public com.google.protobuf.ByteString getAdvertiseModeBytes() { 1188 java.lang.Object ref = advertiseMode_; 1189 if (ref instanceof String) { 1190 com.google.protobuf.ByteString b = 1191 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1192 advertiseMode_ = b; 1193 return b; 1194 } else { 1195 return (com.google.protobuf.ByteString) ref; 1196 } 1197 } 1198 /** 1199 * 1200 * 1201 * <pre> 1202 * User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM. 1203 * Check the AdvertiseMode enum for the list of possible values. 1204 * </pre> 1205 * 1206 * <code>optional string advertise_mode = 312134331;</code> 1207 * 1208 * @param value The advertiseMode to set. 1209 * @return This builder for chaining. 1210 */ setAdvertiseMode(java.lang.String value)1211 public Builder setAdvertiseMode(java.lang.String value) { 1212 if (value == null) { 1213 throw new NullPointerException(); 1214 } 1215 advertiseMode_ = value; 1216 bitField0_ |= 0x00000001; 1217 onChanged(); 1218 return this; 1219 } 1220 /** 1221 * 1222 * 1223 * <pre> 1224 * User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM. 1225 * Check the AdvertiseMode enum for the list of possible values. 1226 * </pre> 1227 * 1228 * <code>optional string advertise_mode = 312134331;</code> 1229 * 1230 * @return This builder for chaining. 1231 */ clearAdvertiseMode()1232 public Builder clearAdvertiseMode() { 1233 advertiseMode_ = getDefaultInstance().getAdvertiseMode(); 1234 bitField0_ = (bitField0_ & ~0x00000001); 1235 onChanged(); 1236 return this; 1237 } 1238 /** 1239 * 1240 * 1241 * <pre> 1242 * User-specified flag to indicate which mode to use for advertisement. The options are DEFAULT or CUSTOM. 1243 * Check the AdvertiseMode enum for the list of possible values. 1244 * </pre> 1245 * 1246 * <code>optional string advertise_mode = 312134331;</code> 1247 * 1248 * @param value The bytes for advertiseMode to set. 1249 * @return This builder for chaining. 1250 */ setAdvertiseModeBytes(com.google.protobuf.ByteString value)1251 public Builder setAdvertiseModeBytes(com.google.protobuf.ByteString value) { 1252 if (value == null) { 1253 throw new NullPointerException(); 1254 } 1255 checkByteStringIsUtf8(value); 1256 advertiseMode_ = value; 1257 bitField0_ |= 0x00000001; 1258 onChanged(); 1259 return this; 1260 } 1261 1262 private com.google.protobuf.LazyStringList advertisedGroups_ = 1263 com.google.protobuf.LazyStringArrayList.EMPTY; 1264 ensureAdvertisedGroupsIsMutable()1265 private void ensureAdvertisedGroupsIsMutable() { 1266 if (!((bitField0_ & 0x00000002) != 0)) { 1267 advertisedGroups_ = new com.google.protobuf.LazyStringArrayList(advertisedGroups_); 1268 bitField0_ |= 0x00000002; 1269 } 1270 } 1271 /** 1272 * 1273 * 1274 * <pre> 1275 * User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. 1276 * Check the AdvertisedGroups enum for the list of possible values. 1277 * </pre> 1278 * 1279 * <code>repeated string advertised_groups = 21065526;</code> 1280 * 1281 * @return A list containing the advertisedGroups. 1282 */ getAdvertisedGroupsList()1283 public com.google.protobuf.ProtocolStringList getAdvertisedGroupsList() { 1284 return advertisedGroups_.getUnmodifiableView(); 1285 } 1286 /** 1287 * 1288 * 1289 * <pre> 1290 * User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. 1291 * Check the AdvertisedGroups enum for the list of possible values. 1292 * </pre> 1293 * 1294 * <code>repeated string advertised_groups = 21065526;</code> 1295 * 1296 * @return The count of advertisedGroups. 1297 */ getAdvertisedGroupsCount()1298 public int getAdvertisedGroupsCount() { 1299 return advertisedGroups_.size(); 1300 } 1301 /** 1302 * 1303 * 1304 * <pre> 1305 * User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. 1306 * Check the AdvertisedGroups enum for the list of possible values. 1307 * </pre> 1308 * 1309 * <code>repeated string advertised_groups = 21065526;</code> 1310 * 1311 * @param index The index of the element to return. 1312 * @return The advertisedGroups at the given index. 1313 */ getAdvertisedGroups(int index)1314 public java.lang.String getAdvertisedGroups(int index) { 1315 return advertisedGroups_.get(index); 1316 } 1317 /** 1318 * 1319 * 1320 * <pre> 1321 * User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. 1322 * Check the AdvertisedGroups enum for the list of possible values. 1323 * </pre> 1324 * 1325 * <code>repeated string advertised_groups = 21065526;</code> 1326 * 1327 * @param index The index of the value to return. 1328 * @return The bytes of the advertisedGroups at the given index. 1329 */ getAdvertisedGroupsBytes(int index)1330 public com.google.protobuf.ByteString getAdvertisedGroupsBytes(int index) { 1331 return advertisedGroups_.getByteString(index); 1332 } 1333 /** 1334 * 1335 * 1336 * <pre> 1337 * User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. 1338 * Check the AdvertisedGroups enum for the list of possible values. 1339 * </pre> 1340 * 1341 * <code>repeated string advertised_groups = 21065526;</code> 1342 * 1343 * @param index The index to set the value at. 1344 * @param value The advertisedGroups to set. 1345 * @return This builder for chaining. 1346 */ setAdvertisedGroups(int index, java.lang.String value)1347 public Builder setAdvertisedGroups(int index, java.lang.String value) { 1348 if (value == null) { 1349 throw new NullPointerException(); 1350 } 1351 ensureAdvertisedGroupsIsMutable(); 1352 advertisedGroups_.set(index, value); 1353 onChanged(); 1354 return this; 1355 } 1356 /** 1357 * 1358 * 1359 * <pre> 1360 * User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. 1361 * Check the AdvertisedGroups enum for the list of possible values. 1362 * </pre> 1363 * 1364 * <code>repeated string advertised_groups = 21065526;</code> 1365 * 1366 * @param value The advertisedGroups to add. 1367 * @return This builder for chaining. 1368 */ addAdvertisedGroups(java.lang.String value)1369 public Builder addAdvertisedGroups(java.lang.String value) { 1370 if (value == null) { 1371 throw new NullPointerException(); 1372 } 1373 ensureAdvertisedGroupsIsMutable(); 1374 advertisedGroups_.add(value); 1375 onChanged(); 1376 return this; 1377 } 1378 /** 1379 * 1380 * 1381 * <pre> 1382 * User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. 1383 * Check the AdvertisedGroups enum for the list of possible values. 1384 * </pre> 1385 * 1386 * <code>repeated string advertised_groups = 21065526;</code> 1387 * 1388 * @param values The advertisedGroups to add. 1389 * @return This builder for chaining. 1390 */ addAllAdvertisedGroups(java.lang.Iterable<java.lang.String> values)1391 public Builder addAllAdvertisedGroups(java.lang.Iterable<java.lang.String> values) { 1392 ensureAdvertisedGroupsIsMutable(); 1393 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, advertisedGroups_); 1394 onChanged(); 1395 return this; 1396 } 1397 /** 1398 * 1399 * 1400 * <pre> 1401 * User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. 1402 * Check the AdvertisedGroups enum for the list of possible values. 1403 * </pre> 1404 * 1405 * <code>repeated string advertised_groups = 21065526;</code> 1406 * 1407 * @return This builder for chaining. 1408 */ clearAdvertisedGroups()1409 public Builder clearAdvertisedGroups() { 1410 advertisedGroups_ = com.google.protobuf.LazyStringArrayList.EMPTY; 1411 bitField0_ = (bitField0_ & ~0x00000002); 1412 onChanged(); 1413 return this; 1414 } 1415 /** 1416 * 1417 * 1418 * <pre> 1419 * User-specified list of prefix groups to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These groups will be advertised in addition to any specified prefixes. Leave this field blank to advertise no custom groups. 1420 * Check the AdvertisedGroups enum for the list of possible values. 1421 * </pre> 1422 * 1423 * <code>repeated string advertised_groups = 21065526;</code> 1424 * 1425 * @param value The bytes of the advertisedGroups to add. 1426 * @return This builder for chaining. 1427 */ addAdvertisedGroupsBytes(com.google.protobuf.ByteString value)1428 public Builder addAdvertisedGroupsBytes(com.google.protobuf.ByteString value) { 1429 if (value == null) { 1430 throw new NullPointerException(); 1431 } 1432 checkByteStringIsUtf8(value); 1433 ensureAdvertisedGroupsIsMutable(); 1434 advertisedGroups_.add(value); 1435 onChanged(); 1436 return this; 1437 } 1438 1439 private java.util.List<com.google.cloud.compute.v1.RouterAdvertisedIpRange> 1440 advertisedIpRanges_ = java.util.Collections.emptyList(); 1441 ensureAdvertisedIpRangesIsMutable()1442 private void ensureAdvertisedIpRangesIsMutable() { 1443 if (!((bitField0_ & 0x00000004) != 0)) { 1444 advertisedIpRanges_ = 1445 new java.util.ArrayList<com.google.cloud.compute.v1.RouterAdvertisedIpRange>( 1446 advertisedIpRanges_); 1447 bitField0_ |= 0x00000004; 1448 } 1449 } 1450 1451 private com.google.protobuf.RepeatedFieldBuilderV3< 1452 com.google.cloud.compute.v1.RouterAdvertisedIpRange, 1453 com.google.cloud.compute.v1.RouterAdvertisedIpRange.Builder, 1454 com.google.cloud.compute.v1.RouterAdvertisedIpRangeOrBuilder> 1455 advertisedIpRangesBuilder_; 1456 1457 /** 1458 * 1459 * 1460 * <pre> 1461 * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. 1462 * </pre> 1463 * 1464 * <code> 1465 * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932; 1466 * </code> 1467 */ 1468 public java.util.List<com.google.cloud.compute.v1.RouterAdvertisedIpRange> getAdvertisedIpRangesList()1469 getAdvertisedIpRangesList() { 1470 if (advertisedIpRangesBuilder_ == null) { 1471 return java.util.Collections.unmodifiableList(advertisedIpRanges_); 1472 } else { 1473 return advertisedIpRangesBuilder_.getMessageList(); 1474 } 1475 } 1476 /** 1477 * 1478 * 1479 * <pre> 1480 * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. 1481 * </pre> 1482 * 1483 * <code> 1484 * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932; 1485 * </code> 1486 */ getAdvertisedIpRangesCount()1487 public int getAdvertisedIpRangesCount() { 1488 if (advertisedIpRangesBuilder_ == null) { 1489 return advertisedIpRanges_.size(); 1490 } else { 1491 return advertisedIpRangesBuilder_.getCount(); 1492 } 1493 } 1494 /** 1495 * 1496 * 1497 * <pre> 1498 * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. 1499 * </pre> 1500 * 1501 * <code> 1502 * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932; 1503 * </code> 1504 */ getAdvertisedIpRanges(int index)1505 public com.google.cloud.compute.v1.RouterAdvertisedIpRange getAdvertisedIpRanges(int index) { 1506 if (advertisedIpRangesBuilder_ == null) { 1507 return advertisedIpRanges_.get(index); 1508 } else { 1509 return advertisedIpRangesBuilder_.getMessage(index); 1510 } 1511 } 1512 /** 1513 * 1514 * 1515 * <pre> 1516 * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. 1517 * </pre> 1518 * 1519 * <code> 1520 * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932; 1521 * </code> 1522 */ setAdvertisedIpRanges( int index, com.google.cloud.compute.v1.RouterAdvertisedIpRange value)1523 public Builder setAdvertisedIpRanges( 1524 int index, com.google.cloud.compute.v1.RouterAdvertisedIpRange value) { 1525 if (advertisedIpRangesBuilder_ == null) { 1526 if (value == null) { 1527 throw new NullPointerException(); 1528 } 1529 ensureAdvertisedIpRangesIsMutable(); 1530 advertisedIpRanges_.set(index, value); 1531 onChanged(); 1532 } else { 1533 advertisedIpRangesBuilder_.setMessage(index, value); 1534 } 1535 return this; 1536 } 1537 /** 1538 * 1539 * 1540 * <pre> 1541 * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. 1542 * </pre> 1543 * 1544 * <code> 1545 * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932; 1546 * </code> 1547 */ setAdvertisedIpRanges( int index, com.google.cloud.compute.v1.RouterAdvertisedIpRange.Builder builderForValue)1548 public Builder setAdvertisedIpRanges( 1549 int index, com.google.cloud.compute.v1.RouterAdvertisedIpRange.Builder builderForValue) { 1550 if (advertisedIpRangesBuilder_ == null) { 1551 ensureAdvertisedIpRangesIsMutable(); 1552 advertisedIpRanges_.set(index, builderForValue.build()); 1553 onChanged(); 1554 } else { 1555 advertisedIpRangesBuilder_.setMessage(index, builderForValue.build()); 1556 } 1557 return this; 1558 } 1559 /** 1560 * 1561 * 1562 * <pre> 1563 * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. 1564 * </pre> 1565 * 1566 * <code> 1567 * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932; 1568 * </code> 1569 */ addAdvertisedIpRanges( com.google.cloud.compute.v1.RouterAdvertisedIpRange value)1570 public Builder addAdvertisedIpRanges( 1571 com.google.cloud.compute.v1.RouterAdvertisedIpRange value) { 1572 if (advertisedIpRangesBuilder_ == null) { 1573 if (value == null) { 1574 throw new NullPointerException(); 1575 } 1576 ensureAdvertisedIpRangesIsMutable(); 1577 advertisedIpRanges_.add(value); 1578 onChanged(); 1579 } else { 1580 advertisedIpRangesBuilder_.addMessage(value); 1581 } 1582 return this; 1583 } 1584 /** 1585 * 1586 * 1587 * <pre> 1588 * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. 1589 * </pre> 1590 * 1591 * <code> 1592 * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932; 1593 * </code> 1594 */ addAdvertisedIpRanges( int index, com.google.cloud.compute.v1.RouterAdvertisedIpRange value)1595 public Builder addAdvertisedIpRanges( 1596 int index, com.google.cloud.compute.v1.RouterAdvertisedIpRange value) { 1597 if (advertisedIpRangesBuilder_ == null) { 1598 if (value == null) { 1599 throw new NullPointerException(); 1600 } 1601 ensureAdvertisedIpRangesIsMutable(); 1602 advertisedIpRanges_.add(index, value); 1603 onChanged(); 1604 } else { 1605 advertisedIpRangesBuilder_.addMessage(index, value); 1606 } 1607 return this; 1608 } 1609 /** 1610 * 1611 * 1612 * <pre> 1613 * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. 1614 * </pre> 1615 * 1616 * <code> 1617 * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932; 1618 * </code> 1619 */ addAdvertisedIpRanges( com.google.cloud.compute.v1.RouterAdvertisedIpRange.Builder builderForValue)1620 public Builder addAdvertisedIpRanges( 1621 com.google.cloud.compute.v1.RouterAdvertisedIpRange.Builder builderForValue) { 1622 if (advertisedIpRangesBuilder_ == null) { 1623 ensureAdvertisedIpRangesIsMutable(); 1624 advertisedIpRanges_.add(builderForValue.build()); 1625 onChanged(); 1626 } else { 1627 advertisedIpRangesBuilder_.addMessage(builderForValue.build()); 1628 } 1629 return this; 1630 } 1631 /** 1632 * 1633 * 1634 * <pre> 1635 * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. 1636 * </pre> 1637 * 1638 * <code> 1639 * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932; 1640 * </code> 1641 */ addAdvertisedIpRanges( int index, com.google.cloud.compute.v1.RouterAdvertisedIpRange.Builder builderForValue)1642 public Builder addAdvertisedIpRanges( 1643 int index, com.google.cloud.compute.v1.RouterAdvertisedIpRange.Builder builderForValue) { 1644 if (advertisedIpRangesBuilder_ == null) { 1645 ensureAdvertisedIpRangesIsMutable(); 1646 advertisedIpRanges_.add(index, builderForValue.build()); 1647 onChanged(); 1648 } else { 1649 advertisedIpRangesBuilder_.addMessage(index, builderForValue.build()); 1650 } 1651 return this; 1652 } 1653 /** 1654 * 1655 * 1656 * <pre> 1657 * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. 1658 * </pre> 1659 * 1660 * <code> 1661 * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932; 1662 * </code> 1663 */ addAllAdvertisedIpRanges( java.lang.Iterable<? extends com.google.cloud.compute.v1.RouterAdvertisedIpRange> values)1664 public Builder addAllAdvertisedIpRanges( 1665 java.lang.Iterable<? extends com.google.cloud.compute.v1.RouterAdvertisedIpRange> values) { 1666 if (advertisedIpRangesBuilder_ == null) { 1667 ensureAdvertisedIpRangesIsMutable(); 1668 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, advertisedIpRanges_); 1669 onChanged(); 1670 } else { 1671 advertisedIpRangesBuilder_.addAllMessages(values); 1672 } 1673 return this; 1674 } 1675 /** 1676 * 1677 * 1678 * <pre> 1679 * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. 1680 * </pre> 1681 * 1682 * <code> 1683 * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932; 1684 * </code> 1685 */ clearAdvertisedIpRanges()1686 public Builder clearAdvertisedIpRanges() { 1687 if (advertisedIpRangesBuilder_ == null) { 1688 advertisedIpRanges_ = java.util.Collections.emptyList(); 1689 bitField0_ = (bitField0_ & ~0x00000004); 1690 onChanged(); 1691 } else { 1692 advertisedIpRangesBuilder_.clear(); 1693 } 1694 return this; 1695 } 1696 /** 1697 * 1698 * 1699 * <pre> 1700 * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. 1701 * </pre> 1702 * 1703 * <code> 1704 * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932; 1705 * </code> 1706 */ removeAdvertisedIpRanges(int index)1707 public Builder removeAdvertisedIpRanges(int index) { 1708 if (advertisedIpRangesBuilder_ == null) { 1709 ensureAdvertisedIpRangesIsMutable(); 1710 advertisedIpRanges_.remove(index); 1711 onChanged(); 1712 } else { 1713 advertisedIpRangesBuilder_.remove(index); 1714 } 1715 return this; 1716 } 1717 /** 1718 * 1719 * 1720 * <pre> 1721 * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. 1722 * </pre> 1723 * 1724 * <code> 1725 * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932; 1726 * </code> 1727 */ getAdvertisedIpRangesBuilder( int index)1728 public com.google.cloud.compute.v1.RouterAdvertisedIpRange.Builder getAdvertisedIpRangesBuilder( 1729 int index) { 1730 return getAdvertisedIpRangesFieldBuilder().getBuilder(index); 1731 } 1732 /** 1733 * 1734 * 1735 * <pre> 1736 * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. 1737 * </pre> 1738 * 1739 * <code> 1740 * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932; 1741 * </code> 1742 */ 1743 public com.google.cloud.compute.v1.RouterAdvertisedIpRangeOrBuilder getAdvertisedIpRangesOrBuilder(int index)1744 getAdvertisedIpRangesOrBuilder(int index) { 1745 if (advertisedIpRangesBuilder_ == null) { 1746 return advertisedIpRanges_.get(index); 1747 } else { 1748 return advertisedIpRangesBuilder_.getMessageOrBuilder(index); 1749 } 1750 } 1751 /** 1752 * 1753 * 1754 * <pre> 1755 * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. 1756 * </pre> 1757 * 1758 * <code> 1759 * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932; 1760 * </code> 1761 */ 1762 public java.util.List<? extends com.google.cloud.compute.v1.RouterAdvertisedIpRangeOrBuilder> getAdvertisedIpRangesOrBuilderList()1763 getAdvertisedIpRangesOrBuilderList() { 1764 if (advertisedIpRangesBuilder_ != null) { 1765 return advertisedIpRangesBuilder_.getMessageOrBuilderList(); 1766 } else { 1767 return java.util.Collections.unmodifiableList(advertisedIpRanges_); 1768 } 1769 } 1770 /** 1771 * 1772 * 1773 * <pre> 1774 * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. 1775 * </pre> 1776 * 1777 * <code> 1778 * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932; 1779 * </code> 1780 */ 1781 public com.google.cloud.compute.v1.RouterAdvertisedIpRange.Builder addAdvertisedIpRangesBuilder()1782 addAdvertisedIpRangesBuilder() { 1783 return getAdvertisedIpRangesFieldBuilder() 1784 .addBuilder(com.google.cloud.compute.v1.RouterAdvertisedIpRange.getDefaultInstance()); 1785 } 1786 /** 1787 * 1788 * 1789 * <pre> 1790 * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. 1791 * </pre> 1792 * 1793 * <code> 1794 * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932; 1795 * </code> 1796 */ addAdvertisedIpRangesBuilder( int index)1797 public com.google.cloud.compute.v1.RouterAdvertisedIpRange.Builder addAdvertisedIpRangesBuilder( 1798 int index) { 1799 return getAdvertisedIpRangesFieldBuilder() 1800 .addBuilder( 1801 index, com.google.cloud.compute.v1.RouterAdvertisedIpRange.getDefaultInstance()); 1802 } 1803 /** 1804 * 1805 * 1806 * <pre> 1807 * User-specified list of individual IP ranges to advertise in custom mode. This field can only be populated if advertise_mode is CUSTOM and is advertised to all peers of the router. These IP ranges will be advertised in addition to any specified groups. Leave this field blank to advertise no custom IP ranges. 1808 * </pre> 1809 * 1810 * <code> 1811 * repeated .google.cloud.compute.v1.RouterAdvertisedIpRange advertised_ip_ranges = 35449932; 1812 * </code> 1813 */ 1814 public java.util.List<com.google.cloud.compute.v1.RouterAdvertisedIpRange.Builder> getAdvertisedIpRangesBuilderList()1815 getAdvertisedIpRangesBuilderList() { 1816 return getAdvertisedIpRangesFieldBuilder().getBuilderList(); 1817 } 1818 1819 private com.google.protobuf.RepeatedFieldBuilderV3< 1820 com.google.cloud.compute.v1.RouterAdvertisedIpRange, 1821 com.google.cloud.compute.v1.RouterAdvertisedIpRange.Builder, 1822 com.google.cloud.compute.v1.RouterAdvertisedIpRangeOrBuilder> getAdvertisedIpRangesFieldBuilder()1823 getAdvertisedIpRangesFieldBuilder() { 1824 if (advertisedIpRangesBuilder_ == null) { 1825 advertisedIpRangesBuilder_ = 1826 new com.google.protobuf.RepeatedFieldBuilderV3< 1827 com.google.cloud.compute.v1.RouterAdvertisedIpRange, 1828 com.google.cloud.compute.v1.RouterAdvertisedIpRange.Builder, 1829 com.google.cloud.compute.v1.RouterAdvertisedIpRangeOrBuilder>( 1830 advertisedIpRanges_, 1831 ((bitField0_ & 0x00000004) != 0), 1832 getParentForChildren(), 1833 isClean()); 1834 advertisedIpRanges_ = null; 1835 } 1836 return advertisedIpRangesBuilder_; 1837 } 1838 1839 private int asn_; 1840 /** 1841 * 1842 * 1843 * <pre> 1844 * Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN. 1845 * </pre> 1846 * 1847 * <code>optional uint32 asn = 96892;</code> 1848 * 1849 * @return Whether the asn field is set. 1850 */ 1851 @java.lang.Override hasAsn()1852 public boolean hasAsn() { 1853 return ((bitField0_ & 0x00000008) != 0); 1854 } 1855 /** 1856 * 1857 * 1858 * <pre> 1859 * Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN. 1860 * </pre> 1861 * 1862 * <code>optional uint32 asn = 96892;</code> 1863 * 1864 * @return The asn. 1865 */ 1866 @java.lang.Override getAsn()1867 public int getAsn() { 1868 return asn_; 1869 } 1870 /** 1871 * 1872 * 1873 * <pre> 1874 * Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN. 1875 * </pre> 1876 * 1877 * <code>optional uint32 asn = 96892;</code> 1878 * 1879 * @param value The asn to set. 1880 * @return This builder for chaining. 1881 */ setAsn(int value)1882 public Builder setAsn(int value) { 1883 1884 asn_ = value; 1885 bitField0_ |= 0x00000008; 1886 onChanged(); 1887 return this; 1888 } 1889 /** 1890 * 1891 * 1892 * <pre> 1893 * Local BGP Autonomous System Number (ASN). Must be an RFC6996 private ASN, either 16-bit or 32-bit. The value will be fixed for this router resource. All VPN tunnels that link to this router will have the same local ASN. 1894 * </pre> 1895 * 1896 * <code>optional uint32 asn = 96892;</code> 1897 * 1898 * @return This builder for chaining. 1899 */ clearAsn()1900 public Builder clearAsn() { 1901 bitField0_ = (bitField0_ & ~0x00000008); 1902 asn_ = 0; 1903 onChanged(); 1904 return this; 1905 } 1906 1907 private int keepaliveInterval_; 1908 /** 1909 * 1910 * 1911 * <pre> 1912 * The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 20 and 60. The default is 20. 1913 * </pre> 1914 * 1915 * <code>optional uint32 keepalive_interval = 276771516;</code> 1916 * 1917 * @return Whether the keepaliveInterval field is set. 1918 */ 1919 @java.lang.Override hasKeepaliveInterval()1920 public boolean hasKeepaliveInterval() { 1921 return ((bitField0_ & 0x00000010) != 0); 1922 } 1923 /** 1924 * 1925 * 1926 * <pre> 1927 * The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 20 and 60. The default is 20. 1928 * </pre> 1929 * 1930 * <code>optional uint32 keepalive_interval = 276771516;</code> 1931 * 1932 * @return The keepaliveInterval. 1933 */ 1934 @java.lang.Override getKeepaliveInterval()1935 public int getKeepaliveInterval() { 1936 return keepaliveInterval_; 1937 } 1938 /** 1939 * 1940 * 1941 * <pre> 1942 * The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 20 and 60. The default is 20. 1943 * </pre> 1944 * 1945 * <code>optional uint32 keepalive_interval = 276771516;</code> 1946 * 1947 * @param value The keepaliveInterval to set. 1948 * @return This builder for chaining. 1949 */ setKeepaliveInterval(int value)1950 public Builder setKeepaliveInterval(int value) { 1951 1952 keepaliveInterval_ = value; 1953 bitField0_ |= 0x00000010; 1954 onChanged(); 1955 return this; 1956 } 1957 /** 1958 * 1959 * 1960 * <pre> 1961 * The interval in seconds between BGP keepalive messages that are sent to the peer. Hold time is three times the interval at which keepalive messages are sent, and the hold time is the maximum number of seconds allowed to elapse between successive keepalive messages that BGP receives from a peer. BGP will use the smaller of either the local hold time value or the peer's hold time value as the hold time for the BGP connection between the two peers. If set, this value must be between 20 and 60. The default is 20. 1962 * </pre> 1963 * 1964 * <code>optional uint32 keepalive_interval = 276771516;</code> 1965 * 1966 * @return This builder for chaining. 1967 */ clearKeepaliveInterval()1968 public Builder clearKeepaliveInterval() { 1969 bitField0_ = (bitField0_ & ~0x00000010); 1970 keepaliveInterval_ = 0; 1971 onChanged(); 1972 return this; 1973 } 1974 1975 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1976 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1977 return super.setUnknownFields(unknownFields); 1978 } 1979 1980 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1981 public final Builder mergeUnknownFields( 1982 final com.google.protobuf.UnknownFieldSet unknownFields) { 1983 return super.mergeUnknownFields(unknownFields); 1984 } 1985 1986 // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.RouterBgp) 1987 } 1988 1989 // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.RouterBgp) 1990 private static final com.google.cloud.compute.v1.RouterBgp DEFAULT_INSTANCE; 1991 1992 static { 1993 DEFAULT_INSTANCE = new com.google.cloud.compute.v1.RouterBgp(); 1994 } 1995 getDefaultInstance()1996 public static com.google.cloud.compute.v1.RouterBgp getDefaultInstance() { 1997 return DEFAULT_INSTANCE; 1998 } 1999 2000 private static final com.google.protobuf.Parser<RouterBgp> PARSER = 2001 new com.google.protobuf.AbstractParser<RouterBgp>() { 2002 @java.lang.Override 2003 public RouterBgp parsePartialFrom( 2004 com.google.protobuf.CodedInputStream input, 2005 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 2006 throws com.google.protobuf.InvalidProtocolBufferException { 2007 Builder builder = newBuilder(); 2008 try { 2009 builder.mergeFrom(input, extensionRegistry); 2010 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 2011 throw e.setUnfinishedMessage(builder.buildPartial()); 2012 } catch (com.google.protobuf.UninitializedMessageException e) { 2013 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 2014 } catch (java.io.IOException e) { 2015 throw new com.google.protobuf.InvalidProtocolBufferException(e) 2016 .setUnfinishedMessage(builder.buildPartial()); 2017 } 2018 return builder.buildPartial(); 2019 } 2020 }; 2021 parser()2022 public static com.google.protobuf.Parser<RouterBgp> parser() { 2023 return PARSER; 2024 } 2025 2026 @java.lang.Override getParserForType()2027 public com.google.protobuf.Parser<RouterBgp> getParserForType() { 2028 return PARSER; 2029 } 2030 2031 @java.lang.Override getDefaultInstanceForType()2032 public com.google.cloud.compute.v1.RouterBgp getDefaultInstanceForType() { 2033 return DEFAULT_INSTANCE; 2034 } 2035 } 2036