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