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.ExchangedPeeringRoute} 28 */ 29 public final class ExchangedPeeringRoute extends com.google.protobuf.GeneratedMessageV3 30 implements 31 // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.ExchangedPeeringRoute) 32 ExchangedPeeringRouteOrBuilder { 33 private static final long serialVersionUID = 0L; 34 // Use ExchangedPeeringRoute.newBuilder() to construct. ExchangedPeeringRoute(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)35 private ExchangedPeeringRoute(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 36 super(builder); 37 } 38 ExchangedPeeringRoute()39 private ExchangedPeeringRoute() { 40 destRange_ = ""; 41 nextHopRegion_ = ""; 42 type_ = ""; 43 } 44 45 @java.lang.Override 46 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)47 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 48 return new ExchangedPeeringRoute(); 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_ExchangedPeeringRoute_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_ExchangedPeeringRoute_fieldAccessorTable 66 .ensureFieldAccessorsInitialized( 67 com.google.cloud.compute.v1.ExchangedPeeringRoute.class, 68 com.google.cloud.compute.v1.ExchangedPeeringRoute.Builder.class); 69 } 70 71 /** 72 * 73 * 74 * <pre> 75 * The type of the peering route. 76 * </pre> 77 * 78 * Protobuf enum {@code google.cloud.compute.v1.ExchangedPeeringRoute.Type} 79 */ 80 public enum Type 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_TYPE = 0;</code> 89 */ 90 UNDEFINED_TYPE(0), 91 /** 92 * 93 * 94 * <pre> 95 * For routes exported from local network. 96 * </pre> 97 * 98 * <code>DYNAMIC_PEERING_ROUTE = 469794858;</code> 99 */ 100 DYNAMIC_PEERING_ROUTE(469794858), 101 /** 102 * 103 * 104 * <pre> 105 * The peering route. 106 * </pre> 107 * 108 * <code>STATIC_PEERING_ROUTE = 473407545;</code> 109 */ 110 STATIC_PEERING_ROUTE(473407545), 111 /** 112 * 113 * 114 * <pre> 115 * The peering route corresponding to subnetwork range. 116 * </pre> 117 * 118 * <code>SUBNET_PEERING_ROUTE = 465782504;</code> 119 */ 120 SUBNET_PEERING_ROUTE(465782504), 121 UNRECOGNIZED(-1), 122 ; 123 124 /** 125 * 126 * 127 * <pre> 128 * A value indicating that the enum field is not set. 129 * </pre> 130 * 131 * <code>UNDEFINED_TYPE = 0;</code> 132 */ 133 public static final int UNDEFINED_TYPE_VALUE = 0; 134 /** 135 * 136 * 137 * <pre> 138 * For routes exported from local network. 139 * </pre> 140 * 141 * <code>DYNAMIC_PEERING_ROUTE = 469794858;</code> 142 */ 143 public static final int DYNAMIC_PEERING_ROUTE_VALUE = 469794858; 144 /** 145 * 146 * 147 * <pre> 148 * The peering route. 149 * </pre> 150 * 151 * <code>STATIC_PEERING_ROUTE = 473407545;</code> 152 */ 153 public static final int STATIC_PEERING_ROUTE_VALUE = 473407545; 154 /** 155 * 156 * 157 * <pre> 158 * The peering route corresponding to subnetwork range. 159 * </pre> 160 * 161 * <code>SUBNET_PEERING_ROUTE = 465782504;</code> 162 */ 163 public static final int SUBNET_PEERING_ROUTE_VALUE = 465782504; 164 getNumber()165 public final int getNumber() { 166 if (this == UNRECOGNIZED) { 167 throw new java.lang.IllegalArgumentException( 168 "Can't get the number of an unknown enum value."); 169 } 170 return value; 171 } 172 173 /** 174 * @param value The numeric wire value of the corresponding enum entry. 175 * @return The enum associated with the given numeric wire value. 176 * @deprecated Use {@link #forNumber(int)} instead. 177 */ 178 @java.lang.Deprecated valueOf(int value)179 public static Type valueOf(int value) { 180 return forNumber(value); 181 } 182 183 /** 184 * @param value The numeric wire value of the corresponding enum entry. 185 * @return The enum associated with the given numeric wire value. 186 */ forNumber(int value)187 public static Type forNumber(int value) { 188 switch (value) { 189 case 0: 190 return UNDEFINED_TYPE; 191 case 469794858: 192 return DYNAMIC_PEERING_ROUTE; 193 case 473407545: 194 return STATIC_PEERING_ROUTE; 195 case 465782504: 196 return SUBNET_PEERING_ROUTE; 197 default: 198 return null; 199 } 200 } 201 internalGetValueMap()202 public static com.google.protobuf.Internal.EnumLiteMap<Type> internalGetValueMap() { 203 return internalValueMap; 204 } 205 206 private static final com.google.protobuf.Internal.EnumLiteMap<Type> internalValueMap = 207 new com.google.protobuf.Internal.EnumLiteMap<Type>() { 208 public Type findValueByNumber(int number) { 209 return Type.forNumber(number); 210 } 211 }; 212 getValueDescriptor()213 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 214 if (this == UNRECOGNIZED) { 215 throw new java.lang.IllegalStateException( 216 "Can't get the descriptor of an unrecognized enum value."); 217 } 218 return getDescriptor().getValues().get(ordinal()); 219 } 220 getDescriptorForType()221 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 222 return getDescriptor(); 223 } 224 getDescriptor()225 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 226 return com.google.cloud.compute.v1.ExchangedPeeringRoute.getDescriptor() 227 .getEnumTypes() 228 .get(0); 229 } 230 231 private static final Type[] VALUES = values(); 232 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)233 public static Type valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 234 if (desc.getType() != getDescriptor()) { 235 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 236 } 237 if (desc.getIndex() == -1) { 238 return UNRECOGNIZED; 239 } 240 return VALUES[desc.getIndex()]; 241 } 242 243 private final int value; 244 Type(int value)245 private Type(int value) { 246 this.value = value; 247 } 248 249 // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.ExchangedPeeringRoute.Type) 250 } 251 252 private int bitField0_; 253 public static final int DEST_RANGE_FIELD_NUMBER = 381327712; 254 255 @SuppressWarnings("serial") 256 private volatile java.lang.Object destRange_ = ""; 257 /** 258 * 259 * 260 * <pre> 261 * The destination range of the route. 262 * </pre> 263 * 264 * <code>optional string dest_range = 381327712;</code> 265 * 266 * @return Whether the destRange field is set. 267 */ 268 @java.lang.Override hasDestRange()269 public boolean hasDestRange() { 270 return ((bitField0_ & 0x00000001) != 0); 271 } 272 /** 273 * 274 * 275 * <pre> 276 * The destination range of the route. 277 * </pre> 278 * 279 * <code>optional string dest_range = 381327712;</code> 280 * 281 * @return The destRange. 282 */ 283 @java.lang.Override getDestRange()284 public java.lang.String getDestRange() { 285 java.lang.Object ref = destRange_; 286 if (ref instanceof java.lang.String) { 287 return (java.lang.String) ref; 288 } else { 289 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 290 java.lang.String s = bs.toStringUtf8(); 291 destRange_ = s; 292 return s; 293 } 294 } 295 /** 296 * 297 * 298 * <pre> 299 * The destination range of the route. 300 * </pre> 301 * 302 * <code>optional string dest_range = 381327712;</code> 303 * 304 * @return The bytes for destRange. 305 */ 306 @java.lang.Override getDestRangeBytes()307 public com.google.protobuf.ByteString getDestRangeBytes() { 308 java.lang.Object ref = destRange_; 309 if (ref instanceof java.lang.String) { 310 com.google.protobuf.ByteString b = 311 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 312 destRange_ = b; 313 return b; 314 } else { 315 return (com.google.protobuf.ByteString) ref; 316 } 317 } 318 319 public static final int IMPORTED_FIELD_NUMBER = 114502404; 320 private boolean imported_ = false; 321 /** 322 * 323 * 324 * <pre> 325 * True if the peering route has been imported from a peer. The actual import happens if the field networkPeering.importCustomRoutes is true for this network, and networkPeering.exportCustomRoutes is true for the peer network, and the import does not result in a route conflict. 326 * </pre> 327 * 328 * <code>optional bool imported = 114502404;</code> 329 * 330 * @return Whether the imported field is set. 331 */ 332 @java.lang.Override hasImported()333 public boolean hasImported() { 334 return ((bitField0_ & 0x00000002) != 0); 335 } 336 /** 337 * 338 * 339 * <pre> 340 * True if the peering route has been imported from a peer. The actual import happens if the field networkPeering.importCustomRoutes is true for this network, and networkPeering.exportCustomRoutes is true for the peer network, and the import does not result in a route conflict. 341 * </pre> 342 * 343 * <code>optional bool imported = 114502404;</code> 344 * 345 * @return The imported. 346 */ 347 @java.lang.Override getImported()348 public boolean getImported() { 349 return imported_; 350 } 351 352 public static final int NEXT_HOP_REGION_FIELD_NUMBER = 122577014; 353 354 @SuppressWarnings("serial") 355 private volatile java.lang.Object nextHopRegion_ = ""; 356 /** 357 * 358 * 359 * <pre> 360 * The region of peering route next hop, only applies to dynamic routes. 361 * </pre> 362 * 363 * <code>optional string next_hop_region = 122577014;</code> 364 * 365 * @return Whether the nextHopRegion field is set. 366 */ 367 @java.lang.Override hasNextHopRegion()368 public boolean hasNextHopRegion() { 369 return ((bitField0_ & 0x00000004) != 0); 370 } 371 /** 372 * 373 * 374 * <pre> 375 * The region of peering route next hop, only applies to dynamic routes. 376 * </pre> 377 * 378 * <code>optional string next_hop_region = 122577014;</code> 379 * 380 * @return The nextHopRegion. 381 */ 382 @java.lang.Override getNextHopRegion()383 public java.lang.String getNextHopRegion() { 384 java.lang.Object ref = nextHopRegion_; 385 if (ref instanceof java.lang.String) { 386 return (java.lang.String) ref; 387 } else { 388 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 389 java.lang.String s = bs.toStringUtf8(); 390 nextHopRegion_ = s; 391 return s; 392 } 393 } 394 /** 395 * 396 * 397 * <pre> 398 * The region of peering route next hop, only applies to dynamic routes. 399 * </pre> 400 * 401 * <code>optional string next_hop_region = 122577014;</code> 402 * 403 * @return The bytes for nextHopRegion. 404 */ 405 @java.lang.Override getNextHopRegionBytes()406 public com.google.protobuf.ByteString getNextHopRegionBytes() { 407 java.lang.Object ref = nextHopRegion_; 408 if (ref instanceof java.lang.String) { 409 com.google.protobuf.ByteString b = 410 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 411 nextHopRegion_ = b; 412 return b; 413 } else { 414 return (com.google.protobuf.ByteString) ref; 415 } 416 } 417 418 public static final int PRIORITY_FIELD_NUMBER = 445151652; 419 private int priority_ = 0; 420 /** 421 * 422 * 423 * <pre> 424 * The priority of the peering route. 425 * </pre> 426 * 427 * <code>optional uint32 priority = 445151652;</code> 428 * 429 * @return Whether the priority field is set. 430 */ 431 @java.lang.Override hasPriority()432 public boolean hasPriority() { 433 return ((bitField0_ & 0x00000008) != 0); 434 } 435 /** 436 * 437 * 438 * <pre> 439 * The priority of the peering route. 440 * </pre> 441 * 442 * <code>optional uint32 priority = 445151652;</code> 443 * 444 * @return The priority. 445 */ 446 @java.lang.Override getPriority()447 public int getPriority() { 448 return priority_; 449 } 450 451 public static final int TYPE_FIELD_NUMBER = 3575610; 452 453 @SuppressWarnings("serial") 454 private volatile java.lang.Object type_ = ""; 455 /** 456 * 457 * 458 * <pre> 459 * The type of the peering route. 460 * Check the Type enum for the list of possible values. 461 * </pre> 462 * 463 * <code>optional string type = 3575610;</code> 464 * 465 * @return Whether the type field is set. 466 */ 467 @java.lang.Override hasType()468 public boolean hasType() { 469 return ((bitField0_ & 0x00000010) != 0); 470 } 471 /** 472 * 473 * 474 * <pre> 475 * The type of the peering route. 476 * Check the Type enum for the list of possible values. 477 * </pre> 478 * 479 * <code>optional string type = 3575610;</code> 480 * 481 * @return The type. 482 */ 483 @java.lang.Override getType()484 public java.lang.String getType() { 485 java.lang.Object ref = type_; 486 if (ref instanceof java.lang.String) { 487 return (java.lang.String) ref; 488 } else { 489 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 490 java.lang.String s = bs.toStringUtf8(); 491 type_ = s; 492 return s; 493 } 494 } 495 /** 496 * 497 * 498 * <pre> 499 * The type of the peering route. 500 * Check the Type enum for the list of possible values. 501 * </pre> 502 * 503 * <code>optional string type = 3575610;</code> 504 * 505 * @return The bytes for type. 506 */ 507 @java.lang.Override getTypeBytes()508 public com.google.protobuf.ByteString getTypeBytes() { 509 java.lang.Object ref = type_; 510 if (ref instanceof java.lang.String) { 511 com.google.protobuf.ByteString b = 512 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 513 type_ = b; 514 return b; 515 } else { 516 return (com.google.protobuf.ByteString) ref; 517 } 518 } 519 520 private byte memoizedIsInitialized = -1; 521 522 @java.lang.Override isInitialized()523 public final boolean isInitialized() { 524 byte isInitialized = memoizedIsInitialized; 525 if (isInitialized == 1) return true; 526 if (isInitialized == 0) return false; 527 528 memoizedIsInitialized = 1; 529 return true; 530 } 531 532 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)533 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 534 if (((bitField0_ & 0x00000010) != 0)) { 535 com.google.protobuf.GeneratedMessageV3.writeString(output, 3575610, type_); 536 } 537 if (((bitField0_ & 0x00000002) != 0)) { 538 output.writeBool(114502404, imported_); 539 } 540 if (((bitField0_ & 0x00000004) != 0)) { 541 com.google.protobuf.GeneratedMessageV3.writeString(output, 122577014, nextHopRegion_); 542 } 543 if (((bitField0_ & 0x00000001) != 0)) { 544 com.google.protobuf.GeneratedMessageV3.writeString(output, 381327712, destRange_); 545 } 546 if (((bitField0_ & 0x00000008) != 0)) { 547 output.writeUInt32(445151652, priority_); 548 } 549 getUnknownFields().writeTo(output); 550 } 551 552 @java.lang.Override getSerializedSize()553 public int getSerializedSize() { 554 int size = memoizedSize; 555 if (size != -1) return size; 556 557 size = 0; 558 if (((bitField0_ & 0x00000010) != 0)) { 559 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3575610, type_); 560 } 561 if (((bitField0_ & 0x00000002) != 0)) { 562 size += com.google.protobuf.CodedOutputStream.computeBoolSize(114502404, imported_); 563 } 564 if (((bitField0_ & 0x00000004) != 0)) { 565 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(122577014, nextHopRegion_); 566 } 567 if (((bitField0_ & 0x00000001) != 0)) { 568 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(381327712, destRange_); 569 } 570 if (((bitField0_ & 0x00000008) != 0)) { 571 size += com.google.protobuf.CodedOutputStream.computeUInt32Size(445151652, priority_); 572 } 573 size += getUnknownFields().getSerializedSize(); 574 memoizedSize = size; 575 return size; 576 } 577 578 @java.lang.Override equals(final java.lang.Object obj)579 public boolean equals(final java.lang.Object obj) { 580 if (obj == this) { 581 return true; 582 } 583 if (!(obj instanceof com.google.cloud.compute.v1.ExchangedPeeringRoute)) { 584 return super.equals(obj); 585 } 586 com.google.cloud.compute.v1.ExchangedPeeringRoute other = 587 (com.google.cloud.compute.v1.ExchangedPeeringRoute) obj; 588 589 if (hasDestRange() != other.hasDestRange()) return false; 590 if (hasDestRange()) { 591 if (!getDestRange().equals(other.getDestRange())) return false; 592 } 593 if (hasImported() != other.hasImported()) return false; 594 if (hasImported()) { 595 if (getImported() != other.getImported()) return false; 596 } 597 if (hasNextHopRegion() != other.hasNextHopRegion()) return false; 598 if (hasNextHopRegion()) { 599 if (!getNextHopRegion().equals(other.getNextHopRegion())) return false; 600 } 601 if (hasPriority() != other.hasPriority()) return false; 602 if (hasPriority()) { 603 if (getPriority() != other.getPriority()) return false; 604 } 605 if (hasType() != other.hasType()) return false; 606 if (hasType()) { 607 if (!getType().equals(other.getType())) return false; 608 } 609 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 610 return true; 611 } 612 613 @java.lang.Override hashCode()614 public int hashCode() { 615 if (memoizedHashCode != 0) { 616 return memoizedHashCode; 617 } 618 int hash = 41; 619 hash = (19 * hash) + getDescriptor().hashCode(); 620 if (hasDestRange()) { 621 hash = (37 * hash) + DEST_RANGE_FIELD_NUMBER; 622 hash = (53 * hash) + getDestRange().hashCode(); 623 } 624 if (hasImported()) { 625 hash = (37 * hash) + IMPORTED_FIELD_NUMBER; 626 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getImported()); 627 } 628 if (hasNextHopRegion()) { 629 hash = (37 * hash) + NEXT_HOP_REGION_FIELD_NUMBER; 630 hash = (53 * hash) + getNextHopRegion().hashCode(); 631 } 632 if (hasPriority()) { 633 hash = (37 * hash) + PRIORITY_FIELD_NUMBER; 634 hash = (53 * hash) + getPriority(); 635 } 636 if (hasType()) { 637 hash = (37 * hash) + TYPE_FIELD_NUMBER; 638 hash = (53 * hash) + getType().hashCode(); 639 } 640 hash = (29 * hash) + getUnknownFields().hashCode(); 641 memoizedHashCode = hash; 642 return hash; 643 } 644 parseFrom( java.nio.ByteBuffer data)645 public static com.google.cloud.compute.v1.ExchangedPeeringRoute parseFrom( 646 java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { 647 return PARSER.parseFrom(data); 648 } 649 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)650 public static com.google.cloud.compute.v1.ExchangedPeeringRoute parseFrom( 651 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 652 throws com.google.protobuf.InvalidProtocolBufferException { 653 return PARSER.parseFrom(data, extensionRegistry); 654 } 655 parseFrom( com.google.protobuf.ByteString data)656 public static com.google.cloud.compute.v1.ExchangedPeeringRoute parseFrom( 657 com.google.protobuf.ByteString data) 658 throws com.google.protobuf.InvalidProtocolBufferException { 659 return PARSER.parseFrom(data); 660 } 661 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)662 public static com.google.cloud.compute.v1.ExchangedPeeringRoute parseFrom( 663 com.google.protobuf.ByteString data, 664 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 665 throws com.google.protobuf.InvalidProtocolBufferException { 666 return PARSER.parseFrom(data, extensionRegistry); 667 } 668 parseFrom(byte[] data)669 public static com.google.cloud.compute.v1.ExchangedPeeringRoute parseFrom(byte[] data) 670 throws com.google.protobuf.InvalidProtocolBufferException { 671 return PARSER.parseFrom(data); 672 } 673 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)674 public static com.google.cloud.compute.v1.ExchangedPeeringRoute parseFrom( 675 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 676 throws com.google.protobuf.InvalidProtocolBufferException { 677 return PARSER.parseFrom(data, extensionRegistry); 678 } 679 parseFrom( java.io.InputStream input)680 public static com.google.cloud.compute.v1.ExchangedPeeringRoute parseFrom( 681 java.io.InputStream input) throws java.io.IOException { 682 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 683 } 684 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)685 public static com.google.cloud.compute.v1.ExchangedPeeringRoute parseFrom( 686 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 687 throws java.io.IOException { 688 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 689 PARSER, input, extensionRegistry); 690 } 691 parseDelimitedFrom( java.io.InputStream input)692 public static com.google.cloud.compute.v1.ExchangedPeeringRoute parseDelimitedFrom( 693 java.io.InputStream input) throws java.io.IOException { 694 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 695 } 696 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)697 public static com.google.cloud.compute.v1.ExchangedPeeringRoute parseDelimitedFrom( 698 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 699 throws java.io.IOException { 700 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 701 PARSER, input, extensionRegistry); 702 } 703 parseFrom( com.google.protobuf.CodedInputStream input)704 public static com.google.cloud.compute.v1.ExchangedPeeringRoute parseFrom( 705 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 706 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 707 } 708 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)709 public static com.google.cloud.compute.v1.ExchangedPeeringRoute parseFrom( 710 com.google.protobuf.CodedInputStream input, 711 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 712 throws java.io.IOException { 713 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 714 PARSER, input, extensionRegistry); 715 } 716 717 @java.lang.Override newBuilderForType()718 public Builder newBuilderForType() { 719 return newBuilder(); 720 } 721 newBuilder()722 public static Builder newBuilder() { 723 return DEFAULT_INSTANCE.toBuilder(); 724 } 725 newBuilder(com.google.cloud.compute.v1.ExchangedPeeringRoute prototype)726 public static Builder newBuilder(com.google.cloud.compute.v1.ExchangedPeeringRoute prototype) { 727 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 728 } 729 730 @java.lang.Override toBuilder()731 public Builder toBuilder() { 732 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 733 } 734 735 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)736 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 737 Builder builder = new Builder(parent); 738 return builder; 739 } 740 /** 741 * 742 * 743 * <pre> 744 * </pre> 745 * 746 * Protobuf type {@code google.cloud.compute.v1.ExchangedPeeringRoute} 747 */ 748 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 749 implements 750 // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.ExchangedPeeringRoute) 751 com.google.cloud.compute.v1.ExchangedPeeringRouteOrBuilder { getDescriptor()752 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 753 return com.google.cloud.compute.v1.Compute 754 .internal_static_google_cloud_compute_v1_ExchangedPeeringRoute_descriptor; 755 } 756 757 @java.lang.Override 758 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()759 internalGetFieldAccessorTable() { 760 return com.google.cloud.compute.v1.Compute 761 .internal_static_google_cloud_compute_v1_ExchangedPeeringRoute_fieldAccessorTable 762 .ensureFieldAccessorsInitialized( 763 com.google.cloud.compute.v1.ExchangedPeeringRoute.class, 764 com.google.cloud.compute.v1.ExchangedPeeringRoute.Builder.class); 765 } 766 767 // Construct using com.google.cloud.compute.v1.ExchangedPeeringRoute.newBuilder() Builder()768 private Builder() {} 769 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)770 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 771 super(parent); 772 } 773 774 @java.lang.Override clear()775 public Builder clear() { 776 super.clear(); 777 bitField0_ = 0; 778 destRange_ = ""; 779 imported_ = false; 780 nextHopRegion_ = ""; 781 priority_ = 0; 782 type_ = ""; 783 return this; 784 } 785 786 @java.lang.Override getDescriptorForType()787 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 788 return com.google.cloud.compute.v1.Compute 789 .internal_static_google_cloud_compute_v1_ExchangedPeeringRoute_descriptor; 790 } 791 792 @java.lang.Override getDefaultInstanceForType()793 public com.google.cloud.compute.v1.ExchangedPeeringRoute getDefaultInstanceForType() { 794 return com.google.cloud.compute.v1.ExchangedPeeringRoute.getDefaultInstance(); 795 } 796 797 @java.lang.Override build()798 public com.google.cloud.compute.v1.ExchangedPeeringRoute build() { 799 com.google.cloud.compute.v1.ExchangedPeeringRoute result = buildPartial(); 800 if (!result.isInitialized()) { 801 throw newUninitializedMessageException(result); 802 } 803 return result; 804 } 805 806 @java.lang.Override buildPartial()807 public com.google.cloud.compute.v1.ExchangedPeeringRoute buildPartial() { 808 com.google.cloud.compute.v1.ExchangedPeeringRoute result = 809 new com.google.cloud.compute.v1.ExchangedPeeringRoute(this); 810 if (bitField0_ != 0) { 811 buildPartial0(result); 812 } 813 onBuilt(); 814 return result; 815 } 816 buildPartial0(com.google.cloud.compute.v1.ExchangedPeeringRoute result)817 private void buildPartial0(com.google.cloud.compute.v1.ExchangedPeeringRoute result) { 818 int from_bitField0_ = bitField0_; 819 int to_bitField0_ = 0; 820 if (((from_bitField0_ & 0x00000001) != 0)) { 821 result.destRange_ = destRange_; 822 to_bitField0_ |= 0x00000001; 823 } 824 if (((from_bitField0_ & 0x00000002) != 0)) { 825 result.imported_ = imported_; 826 to_bitField0_ |= 0x00000002; 827 } 828 if (((from_bitField0_ & 0x00000004) != 0)) { 829 result.nextHopRegion_ = nextHopRegion_; 830 to_bitField0_ |= 0x00000004; 831 } 832 if (((from_bitField0_ & 0x00000008) != 0)) { 833 result.priority_ = priority_; 834 to_bitField0_ |= 0x00000008; 835 } 836 if (((from_bitField0_ & 0x00000010) != 0)) { 837 result.type_ = type_; 838 to_bitField0_ |= 0x00000010; 839 } 840 result.bitField0_ |= to_bitField0_; 841 } 842 843 @java.lang.Override clone()844 public Builder clone() { 845 return super.clone(); 846 } 847 848 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)849 public Builder setField( 850 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 851 return super.setField(field, value); 852 } 853 854 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)855 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 856 return super.clearField(field); 857 } 858 859 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)860 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 861 return super.clearOneof(oneof); 862 } 863 864 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)865 public Builder setRepeatedField( 866 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 867 return super.setRepeatedField(field, index, value); 868 } 869 870 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)871 public Builder addRepeatedField( 872 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 873 return super.addRepeatedField(field, value); 874 } 875 876 @java.lang.Override mergeFrom(com.google.protobuf.Message other)877 public Builder mergeFrom(com.google.protobuf.Message other) { 878 if (other instanceof com.google.cloud.compute.v1.ExchangedPeeringRoute) { 879 return mergeFrom((com.google.cloud.compute.v1.ExchangedPeeringRoute) other); 880 } else { 881 super.mergeFrom(other); 882 return this; 883 } 884 } 885 mergeFrom(com.google.cloud.compute.v1.ExchangedPeeringRoute other)886 public Builder mergeFrom(com.google.cloud.compute.v1.ExchangedPeeringRoute other) { 887 if (other == com.google.cloud.compute.v1.ExchangedPeeringRoute.getDefaultInstance()) 888 return this; 889 if (other.hasDestRange()) { 890 destRange_ = other.destRange_; 891 bitField0_ |= 0x00000001; 892 onChanged(); 893 } 894 if (other.hasImported()) { 895 setImported(other.getImported()); 896 } 897 if (other.hasNextHopRegion()) { 898 nextHopRegion_ = other.nextHopRegion_; 899 bitField0_ |= 0x00000004; 900 onChanged(); 901 } 902 if (other.hasPriority()) { 903 setPriority(other.getPriority()); 904 } 905 if (other.hasType()) { 906 type_ = other.type_; 907 bitField0_ |= 0x00000010; 908 onChanged(); 909 } 910 this.mergeUnknownFields(other.getUnknownFields()); 911 onChanged(); 912 return this; 913 } 914 915 @java.lang.Override isInitialized()916 public final boolean isInitialized() { 917 return true; 918 } 919 920 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)921 public Builder mergeFrom( 922 com.google.protobuf.CodedInputStream input, 923 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 924 throws java.io.IOException { 925 if (extensionRegistry == null) { 926 throw new java.lang.NullPointerException(); 927 } 928 try { 929 boolean done = false; 930 while (!done) { 931 int tag = input.readTag(); 932 switch (tag) { 933 case 0: 934 done = true; 935 break; 936 case 28604882: 937 { 938 type_ = input.readStringRequireUtf8(); 939 bitField0_ |= 0x00000010; 940 break; 941 } // case 28604882 942 case 916019232: 943 { 944 imported_ = input.readBool(); 945 bitField0_ |= 0x00000002; 946 break; 947 } // case 916019232 948 case 980616114: 949 { 950 nextHopRegion_ = input.readStringRequireUtf8(); 951 bitField0_ |= 0x00000004; 952 break; 953 } // case 980616114 954 case -1244345598: 955 { 956 destRange_ = input.readStringRequireUtf8(); 957 bitField0_ |= 0x00000001; 958 break; 959 } // case -1244345598 960 case -733754080: 961 { 962 priority_ = input.readUInt32(); 963 bitField0_ |= 0x00000008; 964 break; 965 } // case -733754080 966 default: 967 { 968 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 969 done = true; // was an endgroup tag 970 } 971 break; 972 } // default: 973 } // switch (tag) 974 } // while (!done) 975 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 976 throw e.unwrapIOException(); 977 } finally { 978 onChanged(); 979 } // finally 980 return this; 981 } 982 983 private int bitField0_; 984 985 private java.lang.Object destRange_ = ""; 986 /** 987 * 988 * 989 * <pre> 990 * The destination range of the route. 991 * </pre> 992 * 993 * <code>optional string dest_range = 381327712;</code> 994 * 995 * @return Whether the destRange field is set. 996 */ hasDestRange()997 public boolean hasDestRange() { 998 return ((bitField0_ & 0x00000001) != 0); 999 } 1000 /** 1001 * 1002 * 1003 * <pre> 1004 * The destination range of the route. 1005 * </pre> 1006 * 1007 * <code>optional string dest_range = 381327712;</code> 1008 * 1009 * @return The destRange. 1010 */ getDestRange()1011 public java.lang.String getDestRange() { 1012 java.lang.Object ref = destRange_; 1013 if (!(ref instanceof java.lang.String)) { 1014 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1015 java.lang.String s = bs.toStringUtf8(); 1016 destRange_ = s; 1017 return s; 1018 } else { 1019 return (java.lang.String) ref; 1020 } 1021 } 1022 /** 1023 * 1024 * 1025 * <pre> 1026 * The destination range of the route. 1027 * </pre> 1028 * 1029 * <code>optional string dest_range = 381327712;</code> 1030 * 1031 * @return The bytes for destRange. 1032 */ getDestRangeBytes()1033 public com.google.protobuf.ByteString getDestRangeBytes() { 1034 java.lang.Object ref = destRange_; 1035 if (ref instanceof String) { 1036 com.google.protobuf.ByteString b = 1037 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1038 destRange_ = b; 1039 return b; 1040 } else { 1041 return (com.google.protobuf.ByteString) ref; 1042 } 1043 } 1044 /** 1045 * 1046 * 1047 * <pre> 1048 * The destination range of the route. 1049 * </pre> 1050 * 1051 * <code>optional string dest_range = 381327712;</code> 1052 * 1053 * @param value The destRange to set. 1054 * @return This builder for chaining. 1055 */ setDestRange(java.lang.String value)1056 public Builder setDestRange(java.lang.String value) { 1057 if (value == null) { 1058 throw new NullPointerException(); 1059 } 1060 destRange_ = value; 1061 bitField0_ |= 0x00000001; 1062 onChanged(); 1063 return this; 1064 } 1065 /** 1066 * 1067 * 1068 * <pre> 1069 * The destination range of the route. 1070 * </pre> 1071 * 1072 * <code>optional string dest_range = 381327712;</code> 1073 * 1074 * @return This builder for chaining. 1075 */ clearDestRange()1076 public Builder clearDestRange() { 1077 destRange_ = getDefaultInstance().getDestRange(); 1078 bitField0_ = (bitField0_ & ~0x00000001); 1079 onChanged(); 1080 return this; 1081 } 1082 /** 1083 * 1084 * 1085 * <pre> 1086 * The destination range of the route. 1087 * </pre> 1088 * 1089 * <code>optional string dest_range = 381327712;</code> 1090 * 1091 * @param value The bytes for destRange to set. 1092 * @return This builder for chaining. 1093 */ setDestRangeBytes(com.google.protobuf.ByteString value)1094 public Builder setDestRangeBytes(com.google.protobuf.ByteString value) { 1095 if (value == null) { 1096 throw new NullPointerException(); 1097 } 1098 checkByteStringIsUtf8(value); 1099 destRange_ = value; 1100 bitField0_ |= 0x00000001; 1101 onChanged(); 1102 return this; 1103 } 1104 1105 private boolean imported_; 1106 /** 1107 * 1108 * 1109 * <pre> 1110 * True if the peering route has been imported from a peer. The actual import happens if the field networkPeering.importCustomRoutes is true for this network, and networkPeering.exportCustomRoutes is true for the peer network, and the import does not result in a route conflict. 1111 * </pre> 1112 * 1113 * <code>optional bool imported = 114502404;</code> 1114 * 1115 * @return Whether the imported field is set. 1116 */ 1117 @java.lang.Override hasImported()1118 public boolean hasImported() { 1119 return ((bitField0_ & 0x00000002) != 0); 1120 } 1121 /** 1122 * 1123 * 1124 * <pre> 1125 * True if the peering route has been imported from a peer. The actual import happens if the field networkPeering.importCustomRoutes is true for this network, and networkPeering.exportCustomRoutes is true for the peer network, and the import does not result in a route conflict. 1126 * </pre> 1127 * 1128 * <code>optional bool imported = 114502404;</code> 1129 * 1130 * @return The imported. 1131 */ 1132 @java.lang.Override getImported()1133 public boolean getImported() { 1134 return imported_; 1135 } 1136 /** 1137 * 1138 * 1139 * <pre> 1140 * True if the peering route has been imported from a peer. The actual import happens if the field networkPeering.importCustomRoutes is true for this network, and networkPeering.exportCustomRoutes is true for the peer network, and the import does not result in a route conflict. 1141 * </pre> 1142 * 1143 * <code>optional bool imported = 114502404;</code> 1144 * 1145 * @param value The imported to set. 1146 * @return This builder for chaining. 1147 */ setImported(boolean value)1148 public Builder setImported(boolean value) { 1149 1150 imported_ = value; 1151 bitField0_ |= 0x00000002; 1152 onChanged(); 1153 return this; 1154 } 1155 /** 1156 * 1157 * 1158 * <pre> 1159 * True if the peering route has been imported from a peer. The actual import happens if the field networkPeering.importCustomRoutes is true for this network, and networkPeering.exportCustomRoutes is true for the peer network, and the import does not result in a route conflict. 1160 * </pre> 1161 * 1162 * <code>optional bool imported = 114502404;</code> 1163 * 1164 * @return This builder for chaining. 1165 */ clearImported()1166 public Builder clearImported() { 1167 bitField0_ = (bitField0_ & ~0x00000002); 1168 imported_ = false; 1169 onChanged(); 1170 return this; 1171 } 1172 1173 private java.lang.Object nextHopRegion_ = ""; 1174 /** 1175 * 1176 * 1177 * <pre> 1178 * The region of peering route next hop, only applies to dynamic routes. 1179 * </pre> 1180 * 1181 * <code>optional string next_hop_region = 122577014;</code> 1182 * 1183 * @return Whether the nextHopRegion field is set. 1184 */ hasNextHopRegion()1185 public boolean hasNextHopRegion() { 1186 return ((bitField0_ & 0x00000004) != 0); 1187 } 1188 /** 1189 * 1190 * 1191 * <pre> 1192 * The region of peering route next hop, only applies to dynamic routes. 1193 * </pre> 1194 * 1195 * <code>optional string next_hop_region = 122577014;</code> 1196 * 1197 * @return The nextHopRegion. 1198 */ getNextHopRegion()1199 public java.lang.String getNextHopRegion() { 1200 java.lang.Object ref = nextHopRegion_; 1201 if (!(ref instanceof java.lang.String)) { 1202 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1203 java.lang.String s = bs.toStringUtf8(); 1204 nextHopRegion_ = s; 1205 return s; 1206 } else { 1207 return (java.lang.String) ref; 1208 } 1209 } 1210 /** 1211 * 1212 * 1213 * <pre> 1214 * The region of peering route next hop, only applies to dynamic routes. 1215 * </pre> 1216 * 1217 * <code>optional string next_hop_region = 122577014;</code> 1218 * 1219 * @return The bytes for nextHopRegion. 1220 */ getNextHopRegionBytes()1221 public com.google.protobuf.ByteString getNextHopRegionBytes() { 1222 java.lang.Object ref = nextHopRegion_; 1223 if (ref instanceof String) { 1224 com.google.protobuf.ByteString b = 1225 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1226 nextHopRegion_ = b; 1227 return b; 1228 } else { 1229 return (com.google.protobuf.ByteString) ref; 1230 } 1231 } 1232 /** 1233 * 1234 * 1235 * <pre> 1236 * The region of peering route next hop, only applies to dynamic routes. 1237 * </pre> 1238 * 1239 * <code>optional string next_hop_region = 122577014;</code> 1240 * 1241 * @param value The nextHopRegion to set. 1242 * @return This builder for chaining. 1243 */ setNextHopRegion(java.lang.String value)1244 public Builder setNextHopRegion(java.lang.String value) { 1245 if (value == null) { 1246 throw new NullPointerException(); 1247 } 1248 nextHopRegion_ = value; 1249 bitField0_ |= 0x00000004; 1250 onChanged(); 1251 return this; 1252 } 1253 /** 1254 * 1255 * 1256 * <pre> 1257 * The region of peering route next hop, only applies to dynamic routes. 1258 * </pre> 1259 * 1260 * <code>optional string next_hop_region = 122577014;</code> 1261 * 1262 * @return This builder for chaining. 1263 */ clearNextHopRegion()1264 public Builder clearNextHopRegion() { 1265 nextHopRegion_ = getDefaultInstance().getNextHopRegion(); 1266 bitField0_ = (bitField0_ & ~0x00000004); 1267 onChanged(); 1268 return this; 1269 } 1270 /** 1271 * 1272 * 1273 * <pre> 1274 * The region of peering route next hop, only applies to dynamic routes. 1275 * </pre> 1276 * 1277 * <code>optional string next_hop_region = 122577014;</code> 1278 * 1279 * @param value The bytes for nextHopRegion to set. 1280 * @return This builder for chaining. 1281 */ setNextHopRegionBytes(com.google.protobuf.ByteString value)1282 public Builder setNextHopRegionBytes(com.google.protobuf.ByteString value) { 1283 if (value == null) { 1284 throw new NullPointerException(); 1285 } 1286 checkByteStringIsUtf8(value); 1287 nextHopRegion_ = value; 1288 bitField0_ |= 0x00000004; 1289 onChanged(); 1290 return this; 1291 } 1292 1293 private int priority_; 1294 /** 1295 * 1296 * 1297 * <pre> 1298 * The priority of the peering route. 1299 * </pre> 1300 * 1301 * <code>optional uint32 priority = 445151652;</code> 1302 * 1303 * @return Whether the priority field is set. 1304 */ 1305 @java.lang.Override hasPriority()1306 public boolean hasPriority() { 1307 return ((bitField0_ & 0x00000008) != 0); 1308 } 1309 /** 1310 * 1311 * 1312 * <pre> 1313 * The priority of the peering route. 1314 * </pre> 1315 * 1316 * <code>optional uint32 priority = 445151652;</code> 1317 * 1318 * @return The priority. 1319 */ 1320 @java.lang.Override getPriority()1321 public int getPriority() { 1322 return priority_; 1323 } 1324 /** 1325 * 1326 * 1327 * <pre> 1328 * The priority of the peering route. 1329 * </pre> 1330 * 1331 * <code>optional uint32 priority = 445151652;</code> 1332 * 1333 * @param value The priority to set. 1334 * @return This builder for chaining. 1335 */ setPriority(int value)1336 public Builder setPriority(int value) { 1337 1338 priority_ = value; 1339 bitField0_ |= 0x00000008; 1340 onChanged(); 1341 return this; 1342 } 1343 /** 1344 * 1345 * 1346 * <pre> 1347 * The priority of the peering route. 1348 * </pre> 1349 * 1350 * <code>optional uint32 priority = 445151652;</code> 1351 * 1352 * @return This builder for chaining. 1353 */ clearPriority()1354 public Builder clearPriority() { 1355 bitField0_ = (bitField0_ & ~0x00000008); 1356 priority_ = 0; 1357 onChanged(); 1358 return this; 1359 } 1360 1361 private java.lang.Object type_ = ""; 1362 /** 1363 * 1364 * 1365 * <pre> 1366 * The type of the peering route. 1367 * Check the Type enum for the list of possible values. 1368 * </pre> 1369 * 1370 * <code>optional string type = 3575610;</code> 1371 * 1372 * @return Whether the type field is set. 1373 */ hasType()1374 public boolean hasType() { 1375 return ((bitField0_ & 0x00000010) != 0); 1376 } 1377 /** 1378 * 1379 * 1380 * <pre> 1381 * The type of the peering route. 1382 * Check the Type enum for the list of possible values. 1383 * </pre> 1384 * 1385 * <code>optional string type = 3575610;</code> 1386 * 1387 * @return The type. 1388 */ getType()1389 public java.lang.String getType() { 1390 java.lang.Object ref = type_; 1391 if (!(ref instanceof java.lang.String)) { 1392 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1393 java.lang.String s = bs.toStringUtf8(); 1394 type_ = s; 1395 return s; 1396 } else { 1397 return (java.lang.String) ref; 1398 } 1399 } 1400 /** 1401 * 1402 * 1403 * <pre> 1404 * The type of the peering route. 1405 * Check the Type enum for the list of possible values. 1406 * </pre> 1407 * 1408 * <code>optional string type = 3575610;</code> 1409 * 1410 * @return The bytes for type. 1411 */ getTypeBytes()1412 public com.google.protobuf.ByteString getTypeBytes() { 1413 java.lang.Object ref = type_; 1414 if (ref instanceof String) { 1415 com.google.protobuf.ByteString b = 1416 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1417 type_ = b; 1418 return b; 1419 } else { 1420 return (com.google.protobuf.ByteString) ref; 1421 } 1422 } 1423 /** 1424 * 1425 * 1426 * <pre> 1427 * The type of the peering route. 1428 * Check the Type enum for the list of possible values. 1429 * </pre> 1430 * 1431 * <code>optional string type = 3575610;</code> 1432 * 1433 * @param value The type to set. 1434 * @return This builder for chaining. 1435 */ setType(java.lang.String value)1436 public Builder setType(java.lang.String value) { 1437 if (value == null) { 1438 throw new NullPointerException(); 1439 } 1440 type_ = value; 1441 bitField0_ |= 0x00000010; 1442 onChanged(); 1443 return this; 1444 } 1445 /** 1446 * 1447 * 1448 * <pre> 1449 * The type of the peering route. 1450 * Check the Type enum for the list of possible values. 1451 * </pre> 1452 * 1453 * <code>optional string type = 3575610;</code> 1454 * 1455 * @return This builder for chaining. 1456 */ clearType()1457 public Builder clearType() { 1458 type_ = getDefaultInstance().getType(); 1459 bitField0_ = (bitField0_ & ~0x00000010); 1460 onChanged(); 1461 return this; 1462 } 1463 /** 1464 * 1465 * 1466 * <pre> 1467 * The type of the peering route. 1468 * Check the Type enum for the list of possible values. 1469 * </pre> 1470 * 1471 * <code>optional string type = 3575610;</code> 1472 * 1473 * @param value The bytes for type to set. 1474 * @return This builder for chaining. 1475 */ setTypeBytes(com.google.protobuf.ByteString value)1476 public Builder setTypeBytes(com.google.protobuf.ByteString value) { 1477 if (value == null) { 1478 throw new NullPointerException(); 1479 } 1480 checkByteStringIsUtf8(value); 1481 type_ = value; 1482 bitField0_ |= 0x00000010; 1483 onChanged(); 1484 return this; 1485 } 1486 1487 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)1488 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 1489 return super.setUnknownFields(unknownFields); 1490 } 1491 1492 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1493 public final Builder mergeUnknownFields( 1494 final com.google.protobuf.UnknownFieldSet unknownFields) { 1495 return super.mergeUnknownFields(unknownFields); 1496 } 1497 1498 // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.ExchangedPeeringRoute) 1499 } 1500 1501 // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.ExchangedPeeringRoute) 1502 private static final com.google.cloud.compute.v1.ExchangedPeeringRoute DEFAULT_INSTANCE; 1503 1504 static { 1505 DEFAULT_INSTANCE = new com.google.cloud.compute.v1.ExchangedPeeringRoute(); 1506 } 1507 getDefaultInstance()1508 public static com.google.cloud.compute.v1.ExchangedPeeringRoute getDefaultInstance() { 1509 return DEFAULT_INSTANCE; 1510 } 1511 1512 private static final com.google.protobuf.Parser<ExchangedPeeringRoute> PARSER = 1513 new com.google.protobuf.AbstractParser<ExchangedPeeringRoute>() { 1514 @java.lang.Override 1515 public ExchangedPeeringRoute parsePartialFrom( 1516 com.google.protobuf.CodedInputStream input, 1517 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1518 throws com.google.protobuf.InvalidProtocolBufferException { 1519 Builder builder = newBuilder(); 1520 try { 1521 builder.mergeFrom(input, extensionRegistry); 1522 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1523 throw e.setUnfinishedMessage(builder.buildPartial()); 1524 } catch (com.google.protobuf.UninitializedMessageException e) { 1525 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 1526 } catch (java.io.IOException e) { 1527 throw new com.google.protobuf.InvalidProtocolBufferException(e) 1528 .setUnfinishedMessage(builder.buildPartial()); 1529 } 1530 return builder.buildPartial(); 1531 } 1532 }; 1533 parser()1534 public static com.google.protobuf.Parser<ExchangedPeeringRoute> parser() { 1535 return PARSER; 1536 } 1537 1538 @java.lang.Override getParserForType()1539 public com.google.protobuf.Parser<ExchangedPeeringRoute> getParserForType() { 1540 return PARSER; 1541 } 1542 1543 @java.lang.Override getDefaultInstanceForType()1544 public com.google.cloud.compute.v1.ExchangedPeeringRoute getDefaultInstanceForType() { 1545 return DEFAULT_INSTANCE; 1546 } 1547 } 1548