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 * Represents an external VPN gateway. External VPN gateway is the on-premises VPN gateway(s) or another cloud provider's VPN gateway that connects to your Google Cloud VPN gateway. To create a highly available VPN from Google Cloud Platform to your VPN gateway or another cloud provider's VPN gateway, you must create a external VPN gateway resource with information about the other gateway. For more information about using external VPN gateways, see Creating an HA VPN gateway and tunnel pair to a peer VPN. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.compute.v1.ExternalVpnGateway} 29 */ 30 public final class ExternalVpnGateway extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.ExternalVpnGateway) 33 ExternalVpnGatewayOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use ExternalVpnGateway.newBuilder() to construct. ExternalVpnGateway(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private ExternalVpnGateway(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 ExternalVpnGateway()40 private ExternalVpnGateway() { 41 creationTimestamp_ = ""; 42 description_ = ""; 43 interfaces_ = java.util.Collections.emptyList(); 44 kind_ = ""; 45 labelFingerprint_ = ""; 46 name_ = ""; 47 redundancyType_ = ""; 48 selfLink_ = ""; 49 } 50 51 @java.lang.Override 52 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)53 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 54 return new ExternalVpnGateway(); 55 } 56 57 @java.lang.Override getUnknownFields()58 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 59 return this.unknownFields; 60 } 61 getDescriptor()62 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 63 return com.google.cloud.compute.v1.Compute 64 .internal_static_google_cloud_compute_v1_ExternalVpnGateway_descriptor; 65 } 66 67 @SuppressWarnings({"rawtypes"}) 68 @java.lang.Override internalGetMapField(int number)69 protected com.google.protobuf.MapField internalGetMapField(int number) { 70 switch (number) { 71 case 500195327: 72 return internalGetLabels(); 73 default: 74 throw new RuntimeException("Invalid map field number: " + number); 75 } 76 } 77 78 @java.lang.Override 79 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()80 internalGetFieldAccessorTable() { 81 return com.google.cloud.compute.v1.Compute 82 .internal_static_google_cloud_compute_v1_ExternalVpnGateway_fieldAccessorTable 83 .ensureFieldAccessorsInitialized( 84 com.google.cloud.compute.v1.ExternalVpnGateway.class, 85 com.google.cloud.compute.v1.ExternalVpnGateway.Builder.class); 86 } 87 88 /** 89 * 90 * 91 * <pre> 92 * Indicates the user-supplied redundancy type of this external VPN gateway. 93 * </pre> 94 * 95 * Protobuf enum {@code google.cloud.compute.v1.ExternalVpnGateway.RedundancyType} 96 */ 97 public enum RedundancyType implements com.google.protobuf.ProtocolMessageEnum { 98 /** 99 * 100 * 101 * <pre> 102 * A value indicating that the enum field is not set. 103 * </pre> 104 * 105 * <code>UNDEFINED_REDUNDANCY_TYPE = 0;</code> 106 */ 107 UNDEFINED_REDUNDANCY_TYPE(0), 108 /** 109 * 110 * 111 * <pre> 112 * The external VPN gateway has four public IP addresses; at the time of writing this API, the AWS virtual private gateway is an example which has four public IP addresses for high availability connections; there should be two VPN connections in the AWS virtual private gateway , each AWS VPN connection has two public IP addresses; please make sure to put two public IP addresses from one AWS VPN connection into interfaces 0 and 1 of this external VPN gateway, and put the other two public IP addresses from another AWS VPN connection into interfaces 2 and 3 of this external VPN gateway. When displaying highly available configuration status for the VPN tunnels connected to FOUR_IPS_REDUNDANCY external VPN gateway, Google will always detect whether interfaces 0 and 1 are connected on one interface of HA Cloud VPN gateway, and detect whether interfaces 2 and 3 are connected to another interface of the HA Cloud VPN gateway. 113 * </pre> 114 * 115 * <code>FOUR_IPS_REDUNDANCY = 520087913;</code> 116 */ 117 FOUR_IPS_REDUNDANCY(520087913), 118 /** 119 * 120 * 121 * <pre> 122 * The external VPN gateway has only one public IP address which internally provide redundancy or failover. 123 * </pre> 124 * 125 * <code>SINGLE_IP_INTERNALLY_REDUNDANT = 133914873;</code> 126 */ 127 SINGLE_IP_INTERNALLY_REDUNDANT(133914873), 128 /** 129 * 130 * 131 * <pre> 132 * The external VPN gateway has two public IP addresses which are redundant with each other, the following two types of setup on your on-premises side would have this type of redundancy: (1) Two separate on-premises gateways, each with one public IP address, the two on-premises gateways are redundant with each other. (2) A single on-premise gateway with two public IP addresses that are redundant with eatch other. 133 * </pre> 134 * 135 * <code>TWO_IPS_REDUNDANCY = 367049635;</code> 136 */ 137 TWO_IPS_REDUNDANCY(367049635), 138 UNRECOGNIZED(-1), 139 ; 140 141 /** 142 * 143 * 144 * <pre> 145 * A value indicating that the enum field is not set. 146 * </pre> 147 * 148 * <code>UNDEFINED_REDUNDANCY_TYPE = 0;</code> 149 */ 150 public static final int UNDEFINED_REDUNDANCY_TYPE_VALUE = 0; 151 /** 152 * 153 * 154 * <pre> 155 * The external VPN gateway has four public IP addresses; at the time of writing this API, the AWS virtual private gateway is an example which has four public IP addresses for high availability connections; there should be two VPN connections in the AWS virtual private gateway , each AWS VPN connection has two public IP addresses; please make sure to put two public IP addresses from one AWS VPN connection into interfaces 0 and 1 of this external VPN gateway, and put the other two public IP addresses from another AWS VPN connection into interfaces 2 and 3 of this external VPN gateway. When displaying highly available configuration status for the VPN tunnels connected to FOUR_IPS_REDUNDANCY external VPN gateway, Google will always detect whether interfaces 0 and 1 are connected on one interface of HA Cloud VPN gateway, and detect whether interfaces 2 and 3 are connected to another interface of the HA Cloud VPN gateway. 156 * </pre> 157 * 158 * <code>FOUR_IPS_REDUNDANCY = 520087913;</code> 159 */ 160 public static final int FOUR_IPS_REDUNDANCY_VALUE = 520087913; 161 /** 162 * 163 * 164 * <pre> 165 * The external VPN gateway has only one public IP address which internally provide redundancy or failover. 166 * </pre> 167 * 168 * <code>SINGLE_IP_INTERNALLY_REDUNDANT = 133914873;</code> 169 */ 170 public static final int SINGLE_IP_INTERNALLY_REDUNDANT_VALUE = 133914873; 171 /** 172 * 173 * 174 * <pre> 175 * The external VPN gateway has two public IP addresses which are redundant with each other, the following two types of setup on your on-premises side would have this type of redundancy: (1) Two separate on-premises gateways, each with one public IP address, the two on-premises gateways are redundant with each other. (2) A single on-premise gateway with two public IP addresses that are redundant with eatch other. 176 * </pre> 177 * 178 * <code>TWO_IPS_REDUNDANCY = 367049635;</code> 179 */ 180 public static final int TWO_IPS_REDUNDANCY_VALUE = 367049635; 181 getNumber()182 public final int getNumber() { 183 if (this == UNRECOGNIZED) { 184 throw new java.lang.IllegalArgumentException( 185 "Can't get the number of an unknown enum value."); 186 } 187 return value; 188 } 189 190 /** 191 * @param value The numeric wire value of the corresponding enum entry. 192 * @return The enum associated with the given numeric wire value. 193 * @deprecated Use {@link #forNumber(int)} instead. 194 */ 195 @java.lang.Deprecated valueOf(int value)196 public static RedundancyType valueOf(int value) { 197 return forNumber(value); 198 } 199 200 /** 201 * @param value The numeric wire value of the corresponding enum entry. 202 * @return The enum associated with the given numeric wire value. 203 */ forNumber(int value)204 public static RedundancyType forNumber(int value) { 205 switch (value) { 206 case 0: 207 return UNDEFINED_REDUNDANCY_TYPE; 208 case 520087913: 209 return FOUR_IPS_REDUNDANCY; 210 case 133914873: 211 return SINGLE_IP_INTERNALLY_REDUNDANT; 212 case 367049635: 213 return TWO_IPS_REDUNDANCY; 214 default: 215 return null; 216 } 217 } 218 internalGetValueMap()219 public static com.google.protobuf.Internal.EnumLiteMap<RedundancyType> internalGetValueMap() { 220 return internalValueMap; 221 } 222 223 private static final com.google.protobuf.Internal.EnumLiteMap<RedundancyType> internalValueMap = 224 new com.google.protobuf.Internal.EnumLiteMap<RedundancyType>() { 225 public RedundancyType findValueByNumber(int number) { 226 return RedundancyType.forNumber(number); 227 } 228 }; 229 getValueDescriptor()230 public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { 231 if (this == UNRECOGNIZED) { 232 throw new java.lang.IllegalStateException( 233 "Can't get the descriptor of an unrecognized enum value."); 234 } 235 return getDescriptor().getValues().get(ordinal()); 236 } 237 getDescriptorForType()238 public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { 239 return getDescriptor(); 240 } 241 getDescriptor()242 public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { 243 return com.google.cloud.compute.v1.ExternalVpnGateway.getDescriptor().getEnumTypes().get(0); 244 } 245 246 private static final RedundancyType[] VALUES = values(); 247 valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)248 public static RedundancyType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { 249 if (desc.getType() != getDescriptor()) { 250 throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); 251 } 252 if (desc.getIndex() == -1) { 253 return UNRECOGNIZED; 254 } 255 return VALUES[desc.getIndex()]; 256 } 257 258 private final int value; 259 RedundancyType(int value)260 private RedundancyType(int value) { 261 this.value = value; 262 } 263 264 // @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.ExternalVpnGateway.RedundancyType) 265 } 266 267 private int bitField0_; 268 public static final int CREATION_TIMESTAMP_FIELD_NUMBER = 30525366; 269 270 @SuppressWarnings("serial") 271 private volatile java.lang.Object creationTimestamp_ = ""; 272 /** 273 * 274 * 275 * <pre> 276 * [Output Only] Creation timestamp in RFC3339 text format. 277 * </pre> 278 * 279 * <code>optional string creation_timestamp = 30525366;</code> 280 * 281 * @return Whether the creationTimestamp field is set. 282 */ 283 @java.lang.Override hasCreationTimestamp()284 public boolean hasCreationTimestamp() { 285 return ((bitField0_ & 0x00000001) != 0); 286 } 287 /** 288 * 289 * 290 * <pre> 291 * [Output Only] Creation timestamp in RFC3339 text format. 292 * </pre> 293 * 294 * <code>optional string creation_timestamp = 30525366;</code> 295 * 296 * @return The creationTimestamp. 297 */ 298 @java.lang.Override getCreationTimestamp()299 public java.lang.String getCreationTimestamp() { 300 java.lang.Object ref = creationTimestamp_; 301 if (ref instanceof java.lang.String) { 302 return (java.lang.String) ref; 303 } else { 304 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 305 java.lang.String s = bs.toStringUtf8(); 306 creationTimestamp_ = s; 307 return s; 308 } 309 } 310 /** 311 * 312 * 313 * <pre> 314 * [Output Only] Creation timestamp in RFC3339 text format. 315 * </pre> 316 * 317 * <code>optional string creation_timestamp = 30525366;</code> 318 * 319 * @return The bytes for creationTimestamp. 320 */ 321 @java.lang.Override getCreationTimestampBytes()322 public com.google.protobuf.ByteString getCreationTimestampBytes() { 323 java.lang.Object ref = creationTimestamp_; 324 if (ref instanceof java.lang.String) { 325 com.google.protobuf.ByteString b = 326 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 327 creationTimestamp_ = b; 328 return b; 329 } else { 330 return (com.google.protobuf.ByteString) ref; 331 } 332 } 333 334 public static final int DESCRIPTION_FIELD_NUMBER = 422937596; 335 336 @SuppressWarnings("serial") 337 private volatile java.lang.Object description_ = ""; 338 /** 339 * 340 * 341 * <pre> 342 * An optional description of this resource. Provide this property when you create the resource. 343 * </pre> 344 * 345 * <code>optional string description = 422937596;</code> 346 * 347 * @return Whether the description field is set. 348 */ 349 @java.lang.Override hasDescription()350 public boolean hasDescription() { 351 return ((bitField0_ & 0x00000002) != 0); 352 } 353 /** 354 * 355 * 356 * <pre> 357 * An optional description of this resource. Provide this property when you create the resource. 358 * </pre> 359 * 360 * <code>optional string description = 422937596;</code> 361 * 362 * @return The description. 363 */ 364 @java.lang.Override getDescription()365 public java.lang.String getDescription() { 366 java.lang.Object ref = description_; 367 if (ref instanceof java.lang.String) { 368 return (java.lang.String) ref; 369 } else { 370 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 371 java.lang.String s = bs.toStringUtf8(); 372 description_ = s; 373 return s; 374 } 375 } 376 /** 377 * 378 * 379 * <pre> 380 * An optional description of this resource. Provide this property when you create the resource. 381 * </pre> 382 * 383 * <code>optional string description = 422937596;</code> 384 * 385 * @return The bytes for description. 386 */ 387 @java.lang.Override getDescriptionBytes()388 public com.google.protobuf.ByteString getDescriptionBytes() { 389 java.lang.Object ref = description_; 390 if (ref instanceof java.lang.String) { 391 com.google.protobuf.ByteString b = 392 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 393 description_ = b; 394 return b; 395 } else { 396 return (com.google.protobuf.ByteString) ref; 397 } 398 } 399 400 public static final int ID_FIELD_NUMBER = 3355; 401 private long id_ = 0L; 402 /** 403 * 404 * 405 * <pre> 406 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 407 * </pre> 408 * 409 * <code>optional uint64 id = 3355;</code> 410 * 411 * @return Whether the id field is set. 412 */ 413 @java.lang.Override hasId()414 public boolean hasId() { 415 return ((bitField0_ & 0x00000004) != 0); 416 } 417 /** 418 * 419 * 420 * <pre> 421 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 422 * </pre> 423 * 424 * <code>optional uint64 id = 3355;</code> 425 * 426 * @return The id. 427 */ 428 @java.lang.Override getId()429 public long getId() { 430 return id_; 431 } 432 433 public static final int INTERFACES_FIELD_NUMBER = 12073562; 434 435 @SuppressWarnings("serial") 436 private java.util.List<com.google.cloud.compute.v1.ExternalVpnGatewayInterface> interfaces_; 437 /** 438 * 439 * 440 * <pre> 441 * A list of interfaces for this external VPN gateway. If your peer-side gateway is an on-premises gateway and non-AWS cloud providers' gateway, at most two interfaces can be provided for an external VPN gateway. If your peer side is an AWS virtual private gateway, four interfaces should be provided for an external VPN gateway. 442 * </pre> 443 * 444 * <code>repeated .google.cloud.compute.v1.ExternalVpnGatewayInterface interfaces = 12073562; 445 * </code> 446 */ 447 @java.lang.Override 448 public java.util.List<com.google.cloud.compute.v1.ExternalVpnGatewayInterface> getInterfacesList()449 getInterfacesList() { 450 return interfaces_; 451 } 452 /** 453 * 454 * 455 * <pre> 456 * A list of interfaces for this external VPN gateway. If your peer-side gateway is an on-premises gateway and non-AWS cloud providers' gateway, at most two interfaces can be provided for an external VPN gateway. If your peer side is an AWS virtual private gateway, four interfaces should be provided for an external VPN gateway. 457 * </pre> 458 * 459 * <code>repeated .google.cloud.compute.v1.ExternalVpnGatewayInterface interfaces = 12073562; 460 * </code> 461 */ 462 @java.lang.Override 463 public java.util.List<? extends com.google.cloud.compute.v1.ExternalVpnGatewayInterfaceOrBuilder> getInterfacesOrBuilderList()464 getInterfacesOrBuilderList() { 465 return interfaces_; 466 } 467 /** 468 * 469 * 470 * <pre> 471 * A list of interfaces for this external VPN gateway. If your peer-side gateway is an on-premises gateway and non-AWS cloud providers' gateway, at most two interfaces can be provided for an external VPN gateway. If your peer side is an AWS virtual private gateway, four interfaces should be provided for an external VPN gateway. 472 * </pre> 473 * 474 * <code>repeated .google.cloud.compute.v1.ExternalVpnGatewayInterface interfaces = 12073562; 475 * </code> 476 */ 477 @java.lang.Override getInterfacesCount()478 public int getInterfacesCount() { 479 return interfaces_.size(); 480 } 481 /** 482 * 483 * 484 * <pre> 485 * A list of interfaces for this external VPN gateway. If your peer-side gateway is an on-premises gateway and non-AWS cloud providers' gateway, at most two interfaces can be provided for an external VPN gateway. If your peer side is an AWS virtual private gateway, four interfaces should be provided for an external VPN gateway. 486 * </pre> 487 * 488 * <code>repeated .google.cloud.compute.v1.ExternalVpnGatewayInterface interfaces = 12073562; 489 * </code> 490 */ 491 @java.lang.Override getInterfaces(int index)492 public com.google.cloud.compute.v1.ExternalVpnGatewayInterface getInterfaces(int index) { 493 return interfaces_.get(index); 494 } 495 /** 496 * 497 * 498 * <pre> 499 * A list of interfaces for this external VPN gateway. If your peer-side gateway is an on-premises gateway and non-AWS cloud providers' gateway, at most two interfaces can be provided for an external VPN gateway. If your peer side is an AWS virtual private gateway, four interfaces should be provided for an external VPN gateway. 500 * </pre> 501 * 502 * <code>repeated .google.cloud.compute.v1.ExternalVpnGatewayInterface interfaces = 12073562; 503 * </code> 504 */ 505 @java.lang.Override getInterfacesOrBuilder( int index)506 public com.google.cloud.compute.v1.ExternalVpnGatewayInterfaceOrBuilder getInterfacesOrBuilder( 507 int index) { 508 return interfaces_.get(index); 509 } 510 511 public static final int KIND_FIELD_NUMBER = 3292052; 512 513 @SuppressWarnings("serial") 514 private volatile java.lang.Object kind_ = ""; 515 /** 516 * 517 * 518 * <pre> 519 * [Output Only] Type of the resource. Always compute#externalVpnGateway for externalVpnGateways. 520 * </pre> 521 * 522 * <code>optional string kind = 3292052;</code> 523 * 524 * @return Whether the kind field is set. 525 */ 526 @java.lang.Override hasKind()527 public boolean hasKind() { 528 return ((bitField0_ & 0x00000008) != 0); 529 } 530 /** 531 * 532 * 533 * <pre> 534 * [Output Only] Type of the resource. Always compute#externalVpnGateway for externalVpnGateways. 535 * </pre> 536 * 537 * <code>optional string kind = 3292052;</code> 538 * 539 * @return The kind. 540 */ 541 @java.lang.Override getKind()542 public java.lang.String getKind() { 543 java.lang.Object ref = kind_; 544 if (ref instanceof java.lang.String) { 545 return (java.lang.String) ref; 546 } else { 547 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 548 java.lang.String s = bs.toStringUtf8(); 549 kind_ = s; 550 return s; 551 } 552 } 553 /** 554 * 555 * 556 * <pre> 557 * [Output Only] Type of the resource. Always compute#externalVpnGateway for externalVpnGateways. 558 * </pre> 559 * 560 * <code>optional string kind = 3292052;</code> 561 * 562 * @return The bytes for kind. 563 */ 564 @java.lang.Override getKindBytes()565 public com.google.protobuf.ByteString getKindBytes() { 566 java.lang.Object ref = kind_; 567 if (ref instanceof java.lang.String) { 568 com.google.protobuf.ByteString b = 569 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 570 kind_ = b; 571 return b; 572 } else { 573 return (com.google.protobuf.ByteString) ref; 574 } 575 } 576 577 public static final int LABEL_FINGERPRINT_FIELD_NUMBER = 178124825; 578 579 @SuppressWarnings("serial") 580 private volatile java.lang.Object labelFingerprint_ = ""; 581 /** 582 * 583 * 584 * <pre> 585 * A fingerprint for the labels being applied to this ExternalVpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an ExternalVpnGateway. 586 * </pre> 587 * 588 * <code>optional string label_fingerprint = 178124825;</code> 589 * 590 * @return Whether the labelFingerprint field is set. 591 */ 592 @java.lang.Override hasLabelFingerprint()593 public boolean hasLabelFingerprint() { 594 return ((bitField0_ & 0x00000010) != 0); 595 } 596 /** 597 * 598 * 599 * <pre> 600 * A fingerprint for the labels being applied to this ExternalVpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an ExternalVpnGateway. 601 * </pre> 602 * 603 * <code>optional string label_fingerprint = 178124825;</code> 604 * 605 * @return The labelFingerprint. 606 */ 607 @java.lang.Override getLabelFingerprint()608 public java.lang.String getLabelFingerprint() { 609 java.lang.Object ref = labelFingerprint_; 610 if (ref instanceof java.lang.String) { 611 return (java.lang.String) ref; 612 } else { 613 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 614 java.lang.String s = bs.toStringUtf8(); 615 labelFingerprint_ = s; 616 return s; 617 } 618 } 619 /** 620 * 621 * 622 * <pre> 623 * A fingerprint for the labels being applied to this ExternalVpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an ExternalVpnGateway. 624 * </pre> 625 * 626 * <code>optional string label_fingerprint = 178124825;</code> 627 * 628 * @return The bytes for labelFingerprint. 629 */ 630 @java.lang.Override getLabelFingerprintBytes()631 public com.google.protobuf.ByteString getLabelFingerprintBytes() { 632 java.lang.Object ref = labelFingerprint_; 633 if (ref instanceof java.lang.String) { 634 com.google.protobuf.ByteString b = 635 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 636 labelFingerprint_ = b; 637 return b; 638 } else { 639 return (com.google.protobuf.ByteString) ref; 640 } 641 } 642 643 public static final int LABELS_FIELD_NUMBER = 500195327; 644 645 private static final class LabelsDefaultEntryHolder { 646 static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry = 647 com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance( 648 com.google.cloud.compute.v1.Compute 649 .internal_static_google_cloud_compute_v1_ExternalVpnGateway_LabelsEntry_descriptor, 650 com.google.protobuf.WireFormat.FieldType.STRING, 651 "", 652 com.google.protobuf.WireFormat.FieldType.STRING, 653 ""); 654 } 655 656 @SuppressWarnings("serial") 657 private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_; 658 internalGetLabels()659 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() { 660 if (labels_ == null) { 661 return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); 662 } 663 return labels_; 664 } 665 getLabelsCount()666 public int getLabelsCount() { 667 return internalGetLabels().getMap().size(); 668 } 669 /** 670 * 671 * 672 * <pre> 673 * Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty. 674 * </pre> 675 * 676 * <code>map<string, string> labels = 500195327;</code> 677 */ 678 @java.lang.Override containsLabels(java.lang.String key)679 public boolean containsLabels(java.lang.String key) { 680 if (key == null) { 681 throw new NullPointerException("map key"); 682 } 683 return internalGetLabels().getMap().containsKey(key); 684 } 685 /** Use {@link #getLabelsMap()} instead. */ 686 @java.lang.Override 687 @java.lang.Deprecated getLabels()688 public java.util.Map<java.lang.String, java.lang.String> getLabels() { 689 return getLabelsMap(); 690 } 691 /** 692 * 693 * 694 * <pre> 695 * Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty. 696 * </pre> 697 * 698 * <code>map<string, string> labels = 500195327;</code> 699 */ 700 @java.lang.Override getLabelsMap()701 public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() { 702 return internalGetLabels().getMap(); 703 } 704 /** 705 * 706 * 707 * <pre> 708 * Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty. 709 * </pre> 710 * 711 * <code>map<string, string> labels = 500195327;</code> 712 */ 713 @java.lang.Override getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue)714 public /* nullable */ java.lang.String getLabelsOrDefault( 715 java.lang.String key, 716 /* nullable */ 717 java.lang.String defaultValue) { 718 if (key == null) { 719 throw new NullPointerException("map key"); 720 } 721 java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap(); 722 return map.containsKey(key) ? map.get(key) : defaultValue; 723 } 724 /** 725 * 726 * 727 * <pre> 728 * Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty. 729 * </pre> 730 * 731 * <code>map<string, string> labels = 500195327;</code> 732 */ 733 @java.lang.Override getLabelsOrThrow(java.lang.String key)734 public java.lang.String getLabelsOrThrow(java.lang.String key) { 735 if (key == null) { 736 throw new NullPointerException("map key"); 737 } 738 java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap(); 739 if (!map.containsKey(key)) { 740 throw new java.lang.IllegalArgumentException(); 741 } 742 return map.get(key); 743 } 744 745 public static final int NAME_FIELD_NUMBER = 3373707; 746 747 @SuppressWarnings("serial") 748 private volatile java.lang.Object name_ = ""; 749 /** 750 * 751 * 752 * <pre> 753 * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 754 * </pre> 755 * 756 * <code>optional string name = 3373707;</code> 757 * 758 * @return Whether the name field is set. 759 */ 760 @java.lang.Override hasName()761 public boolean hasName() { 762 return ((bitField0_ & 0x00000020) != 0); 763 } 764 /** 765 * 766 * 767 * <pre> 768 * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 769 * </pre> 770 * 771 * <code>optional string name = 3373707;</code> 772 * 773 * @return The name. 774 */ 775 @java.lang.Override getName()776 public java.lang.String getName() { 777 java.lang.Object ref = name_; 778 if (ref instanceof java.lang.String) { 779 return (java.lang.String) ref; 780 } else { 781 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 782 java.lang.String s = bs.toStringUtf8(); 783 name_ = s; 784 return s; 785 } 786 } 787 /** 788 * 789 * 790 * <pre> 791 * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 792 * </pre> 793 * 794 * <code>optional string name = 3373707;</code> 795 * 796 * @return The bytes for name. 797 */ 798 @java.lang.Override getNameBytes()799 public com.google.protobuf.ByteString getNameBytes() { 800 java.lang.Object ref = name_; 801 if (ref instanceof java.lang.String) { 802 com.google.protobuf.ByteString b = 803 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 804 name_ = b; 805 return b; 806 } else { 807 return (com.google.protobuf.ByteString) ref; 808 } 809 } 810 811 public static final int REDUNDANCY_TYPE_FIELD_NUMBER = 271443740; 812 813 @SuppressWarnings("serial") 814 private volatile java.lang.Object redundancyType_ = ""; 815 /** 816 * 817 * 818 * <pre> 819 * Indicates the user-supplied redundancy type of this external VPN gateway. 820 * Check the RedundancyType enum for the list of possible values. 821 * </pre> 822 * 823 * <code>optional string redundancy_type = 271443740;</code> 824 * 825 * @return Whether the redundancyType field is set. 826 */ 827 @java.lang.Override hasRedundancyType()828 public boolean hasRedundancyType() { 829 return ((bitField0_ & 0x00000040) != 0); 830 } 831 /** 832 * 833 * 834 * <pre> 835 * Indicates the user-supplied redundancy type of this external VPN gateway. 836 * Check the RedundancyType enum for the list of possible values. 837 * </pre> 838 * 839 * <code>optional string redundancy_type = 271443740;</code> 840 * 841 * @return The redundancyType. 842 */ 843 @java.lang.Override getRedundancyType()844 public java.lang.String getRedundancyType() { 845 java.lang.Object ref = redundancyType_; 846 if (ref instanceof java.lang.String) { 847 return (java.lang.String) ref; 848 } else { 849 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 850 java.lang.String s = bs.toStringUtf8(); 851 redundancyType_ = s; 852 return s; 853 } 854 } 855 /** 856 * 857 * 858 * <pre> 859 * Indicates the user-supplied redundancy type of this external VPN gateway. 860 * Check the RedundancyType enum for the list of possible values. 861 * </pre> 862 * 863 * <code>optional string redundancy_type = 271443740;</code> 864 * 865 * @return The bytes for redundancyType. 866 */ 867 @java.lang.Override getRedundancyTypeBytes()868 public com.google.protobuf.ByteString getRedundancyTypeBytes() { 869 java.lang.Object ref = redundancyType_; 870 if (ref instanceof java.lang.String) { 871 com.google.protobuf.ByteString b = 872 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 873 redundancyType_ = b; 874 return b; 875 } else { 876 return (com.google.protobuf.ByteString) ref; 877 } 878 } 879 880 public static final int SELF_LINK_FIELD_NUMBER = 456214797; 881 882 @SuppressWarnings("serial") 883 private volatile java.lang.Object selfLink_ = ""; 884 /** 885 * 886 * 887 * <pre> 888 * [Output Only] Server-defined URL for the resource. 889 * </pre> 890 * 891 * <code>optional string self_link = 456214797;</code> 892 * 893 * @return Whether the selfLink field is set. 894 */ 895 @java.lang.Override hasSelfLink()896 public boolean hasSelfLink() { 897 return ((bitField0_ & 0x00000080) != 0); 898 } 899 /** 900 * 901 * 902 * <pre> 903 * [Output Only] Server-defined URL for the resource. 904 * </pre> 905 * 906 * <code>optional string self_link = 456214797;</code> 907 * 908 * @return The selfLink. 909 */ 910 @java.lang.Override getSelfLink()911 public java.lang.String getSelfLink() { 912 java.lang.Object ref = selfLink_; 913 if (ref instanceof java.lang.String) { 914 return (java.lang.String) ref; 915 } else { 916 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 917 java.lang.String s = bs.toStringUtf8(); 918 selfLink_ = s; 919 return s; 920 } 921 } 922 /** 923 * 924 * 925 * <pre> 926 * [Output Only] Server-defined URL for the resource. 927 * </pre> 928 * 929 * <code>optional string self_link = 456214797;</code> 930 * 931 * @return The bytes for selfLink. 932 */ 933 @java.lang.Override getSelfLinkBytes()934 public com.google.protobuf.ByteString getSelfLinkBytes() { 935 java.lang.Object ref = selfLink_; 936 if (ref instanceof java.lang.String) { 937 com.google.protobuf.ByteString b = 938 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 939 selfLink_ = b; 940 return b; 941 } else { 942 return (com.google.protobuf.ByteString) ref; 943 } 944 } 945 946 private byte memoizedIsInitialized = -1; 947 948 @java.lang.Override isInitialized()949 public final boolean isInitialized() { 950 byte isInitialized = memoizedIsInitialized; 951 if (isInitialized == 1) return true; 952 if (isInitialized == 0) return false; 953 954 memoizedIsInitialized = 1; 955 return true; 956 } 957 958 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)959 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 960 if (((bitField0_ & 0x00000004) != 0)) { 961 output.writeUInt64(3355, id_); 962 } 963 if (((bitField0_ & 0x00000008) != 0)) { 964 com.google.protobuf.GeneratedMessageV3.writeString(output, 3292052, kind_); 965 } 966 if (((bitField0_ & 0x00000020) != 0)) { 967 com.google.protobuf.GeneratedMessageV3.writeString(output, 3373707, name_); 968 } 969 for (int i = 0; i < interfaces_.size(); i++) { 970 output.writeMessage(12073562, interfaces_.get(i)); 971 } 972 if (((bitField0_ & 0x00000001) != 0)) { 973 com.google.protobuf.GeneratedMessageV3.writeString(output, 30525366, creationTimestamp_); 974 } 975 if (((bitField0_ & 0x00000010) != 0)) { 976 com.google.protobuf.GeneratedMessageV3.writeString(output, 178124825, labelFingerprint_); 977 } 978 if (((bitField0_ & 0x00000040) != 0)) { 979 com.google.protobuf.GeneratedMessageV3.writeString(output, 271443740, redundancyType_); 980 } 981 if (((bitField0_ & 0x00000002) != 0)) { 982 com.google.protobuf.GeneratedMessageV3.writeString(output, 422937596, description_); 983 } 984 if (((bitField0_ & 0x00000080) != 0)) { 985 com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_); 986 } 987 com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( 988 output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 500195327); 989 getUnknownFields().writeTo(output); 990 } 991 992 @java.lang.Override getSerializedSize()993 public int getSerializedSize() { 994 int size = memoizedSize; 995 if (size != -1) return size; 996 997 size = 0; 998 if (((bitField0_ & 0x00000004) != 0)) { 999 size += com.google.protobuf.CodedOutputStream.computeUInt64Size(3355, id_); 1000 } 1001 if (((bitField0_ & 0x00000008) != 0)) { 1002 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3292052, kind_); 1003 } 1004 if (((bitField0_ & 0x00000020) != 0)) { 1005 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3373707, name_); 1006 } 1007 for (int i = 0; i < interfaces_.size(); i++) { 1008 size += 1009 com.google.protobuf.CodedOutputStream.computeMessageSize(12073562, interfaces_.get(i)); 1010 } 1011 if (((bitField0_ & 0x00000001) != 0)) { 1012 size += 1013 com.google.protobuf.GeneratedMessageV3.computeStringSize(30525366, creationTimestamp_); 1014 } 1015 if (((bitField0_ & 0x00000010) != 0)) { 1016 size += 1017 com.google.protobuf.GeneratedMessageV3.computeStringSize(178124825, labelFingerprint_); 1018 } 1019 if (((bitField0_ & 0x00000040) != 0)) { 1020 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(271443740, redundancyType_); 1021 } 1022 if (((bitField0_ & 0x00000002) != 0)) { 1023 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(422937596, description_); 1024 } 1025 if (((bitField0_ & 0x00000080) != 0)) { 1026 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_); 1027 } 1028 for (java.util.Map.Entry<java.lang.String, java.lang.String> entry : 1029 internalGetLabels().getMap().entrySet()) { 1030 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ = 1031 LabelsDefaultEntryHolder.defaultEntry 1032 .newBuilderForType() 1033 .setKey(entry.getKey()) 1034 .setValue(entry.getValue()) 1035 .build(); 1036 size += com.google.protobuf.CodedOutputStream.computeMessageSize(500195327, labels__); 1037 } 1038 size += getUnknownFields().getSerializedSize(); 1039 memoizedSize = size; 1040 return size; 1041 } 1042 1043 @java.lang.Override equals(final java.lang.Object obj)1044 public boolean equals(final java.lang.Object obj) { 1045 if (obj == this) { 1046 return true; 1047 } 1048 if (!(obj instanceof com.google.cloud.compute.v1.ExternalVpnGateway)) { 1049 return super.equals(obj); 1050 } 1051 com.google.cloud.compute.v1.ExternalVpnGateway other = 1052 (com.google.cloud.compute.v1.ExternalVpnGateway) obj; 1053 1054 if (hasCreationTimestamp() != other.hasCreationTimestamp()) return false; 1055 if (hasCreationTimestamp()) { 1056 if (!getCreationTimestamp().equals(other.getCreationTimestamp())) return false; 1057 } 1058 if (hasDescription() != other.hasDescription()) return false; 1059 if (hasDescription()) { 1060 if (!getDescription().equals(other.getDescription())) return false; 1061 } 1062 if (hasId() != other.hasId()) return false; 1063 if (hasId()) { 1064 if (getId() != other.getId()) return false; 1065 } 1066 if (!getInterfacesList().equals(other.getInterfacesList())) return false; 1067 if (hasKind() != other.hasKind()) return false; 1068 if (hasKind()) { 1069 if (!getKind().equals(other.getKind())) return false; 1070 } 1071 if (hasLabelFingerprint() != other.hasLabelFingerprint()) return false; 1072 if (hasLabelFingerprint()) { 1073 if (!getLabelFingerprint().equals(other.getLabelFingerprint())) return false; 1074 } 1075 if (!internalGetLabels().equals(other.internalGetLabels())) return false; 1076 if (hasName() != other.hasName()) return false; 1077 if (hasName()) { 1078 if (!getName().equals(other.getName())) return false; 1079 } 1080 if (hasRedundancyType() != other.hasRedundancyType()) return false; 1081 if (hasRedundancyType()) { 1082 if (!getRedundancyType().equals(other.getRedundancyType())) return false; 1083 } 1084 if (hasSelfLink() != other.hasSelfLink()) return false; 1085 if (hasSelfLink()) { 1086 if (!getSelfLink().equals(other.getSelfLink())) return false; 1087 } 1088 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 1089 return true; 1090 } 1091 1092 @java.lang.Override hashCode()1093 public int hashCode() { 1094 if (memoizedHashCode != 0) { 1095 return memoizedHashCode; 1096 } 1097 int hash = 41; 1098 hash = (19 * hash) + getDescriptor().hashCode(); 1099 if (hasCreationTimestamp()) { 1100 hash = (37 * hash) + CREATION_TIMESTAMP_FIELD_NUMBER; 1101 hash = (53 * hash) + getCreationTimestamp().hashCode(); 1102 } 1103 if (hasDescription()) { 1104 hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; 1105 hash = (53 * hash) + getDescription().hashCode(); 1106 } 1107 if (hasId()) { 1108 hash = (37 * hash) + ID_FIELD_NUMBER; 1109 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getId()); 1110 } 1111 if (getInterfacesCount() > 0) { 1112 hash = (37 * hash) + INTERFACES_FIELD_NUMBER; 1113 hash = (53 * hash) + getInterfacesList().hashCode(); 1114 } 1115 if (hasKind()) { 1116 hash = (37 * hash) + KIND_FIELD_NUMBER; 1117 hash = (53 * hash) + getKind().hashCode(); 1118 } 1119 if (hasLabelFingerprint()) { 1120 hash = (37 * hash) + LABEL_FINGERPRINT_FIELD_NUMBER; 1121 hash = (53 * hash) + getLabelFingerprint().hashCode(); 1122 } 1123 if (!internalGetLabels().getMap().isEmpty()) { 1124 hash = (37 * hash) + LABELS_FIELD_NUMBER; 1125 hash = (53 * hash) + internalGetLabels().hashCode(); 1126 } 1127 if (hasName()) { 1128 hash = (37 * hash) + NAME_FIELD_NUMBER; 1129 hash = (53 * hash) + getName().hashCode(); 1130 } 1131 if (hasRedundancyType()) { 1132 hash = (37 * hash) + REDUNDANCY_TYPE_FIELD_NUMBER; 1133 hash = (53 * hash) + getRedundancyType().hashCode(); 1134 } 1135 if (hasSelfLink()) { 1136 hash = (37 * hash) + SELF_LINK_FIELD_NUMBER; 1137 hash = (53 * hash) + getSelfLink().hashCode(); 1138 } 1139 hash = (29 * hash) + getUnknownFields().hashCode(); 1140 memoizedHashCode = hash; 1141 return hash; 1142 } 1143 parseFrom(java.nio.ByteBuffer data)1144 public static com.google.cloud.compute.v1.ExternalVpnGateway parseFrom(java.nio.ByteBuffer data) 1145 throws com.google.protobuf.InvalidProtocolBufferException { 1146 return PARSER.parseFrom(data); 1147 } 1148 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1149 public static com.google.cloud.compute.v1.ExternalVpnGateway parseFrom( 1150 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1151 throws com.google.protobuf.InvalidProtocolBufferException { 1152 return PARSER.parseFrom(data, extensionRegistry); 1153 } 1154 parseFrom( com.google.protobuf.ByteString data)1155 public static com.google.cloud.compute.v1.ExternalVpnGateway parseFrom( 1156 com.google.protobuf.ByteString data) 1157 throws com.google.protobuf.InvalidProtocolBufferException { 1158 return PARSER.parseFrom(data); 1159 } 1160 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1161 public static com.google.cloud.compute.v1.ExternalVpnGateway parseFrom( 1162 com.google.protobuf.ByteString data, 1163 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1164 throws com.google.protobuf.InvalidProtocolBufferException { 1165 return PARSER.parseFrom(data, extensionRegistry); 1166 } 1167 parseFrom(byte[] data)1168 public static com.google.cloud.compute.v1.ExternalVpnGateway parseFrom(byte[] data) 1169 throws com.google.protobuf.InvalidProtocolBufferException { 1170 return PARSER.parseFrom(data); 1171 } 1172 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1173 public static com.google.cloud.compute.v1.ExternalVpnGateway parseFrom( 1174 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1175 throws com.google.protobuf.InvalidProtocolBufferException { 1176 return PARSER.parseFrom(data, extensionRegistry); 1177 } 1178 parseFrom(java.io.InputStream input)1179 public static com.google.cloud.compute.v1.ExternalVpnGateway parseFrom(java.io.InputStream input) 1180 throws java.io.IOException { 1181 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1182 } 1183 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1184 public static com.google.cloud.compute.v1.ExternalVpnGateway parseFrom( 1185 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1186 throws java.io.IOException { 1187 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1188 PARSER, input, extensionRegistry); 1189 } 1190 parseDelimitedFrom( java.io.InputStream input)1191 public static com.google.cloud.compute.v1.ExternalVpnGateway parseDelimitedFrom( 1192 java.io.InputStream input) throws java.io.IOException { 1193 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 1194 } 1195 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1196 public static com.google.cloud.compute.v1.ExternalVpnGateway parseDelimitedFrom( 1197 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1198 throws java.io.IOException { 1199 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 1200 PARSER, input, extensionRegistry); 1201 } 1202 parseFrom( com.google.protobuf.CodedInputStream input)1203 public static com.google.cloud.compute.v1.ExternalVpnGateway parseFrom( 1204 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 1205 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 1206 } 1207 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1208 public static com.google.cloud.compute.v1.ExternalVpnGateway parseFrom( 1209 com.google.protobuf.CodedInputStream input, 1210 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1211 throws java.io.IOException { 1212 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 1213 PARSER, input, extensionRegistry); 1214 } 1215 1216 @java.lang.Override newBuilderForType()1217 public Builder newBuilderForType() { 1218 return newBuilder(); 1219 } 1220 newBuilder()1221 public static Builder newBuilder() { 1222 return DEFAULT_INSTANCE.toBuilder(); 1223 } 1224 newBuilder(com.google.cloud.compute.v1.ExternalVpnGateway prototype)1225 public static Builder newBuilder(com.google.cloud.compute.v1.ExternalVpnGateway prototype) { 1226 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 1227 } 1228 1229 @java.lang.Override toBuilder()1230 public Builder toBuilder() { 1231 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 1232 } 1233 1234 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1235 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1236 Builder builder = new Builder(parent); 1237 return builder; 1238 } 1239 /** 1240 * 1241 * 1242 * <pre> 1243 * Represents an external VPN gateway. External VPN gateway is the on-premises VPN gateway(s) or another cloud provider's VPN gateway that connects to your Google Cloud VPN gateway. To create a highly available VPN from Google Cloud Platform to your VPN gateway or another cloud provider's VPN gateway, you must create a external VPN gateway resource with information about the other gateway. For more information about using external VPN gateways, see Creating an HA VPN gateway and tunnel pair to a peer VPN. 1244 * </pre> 1245 * 1246 * Protobuf type {@code google.cloud.compute.v1.ExternalVpnGateway} 1247 */ 1248 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 1249 implements 1250 // @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.ExternalVpnGateway) 1251 com.google.cloud.compute.v1.ExternalVpnGatewayOrBuilder { getDescriptor()1252 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 1253 return com.google.cloud.compute.v1.Compute 1254 .internal_static_google_cloud_compute_v1_ExternalVpnGateway_descriptor; 1255 } 1256 1257 @SuppressWarnings({"rawtypes"}) internalGetMapField(int number)1258 protected com.google.protobuf.MapField internalGetMapField(int number) { 1259 switch (number) { 1260 case 500195327: 1261 return internalGetLabels(); 1262 default: 1263 throw new RuntimeException("Invalid map field number: " + number); 1264 } 1265 } 1266 1267 @SuppressWarnings({"rawtypes"}) internalGetMutableMapField(int number)1268 protected com.google.protobuf.MapField internalGetMutableMapField(int number) { 1269 switch (number) { 1270 case 500195327: 1271 return internalGetMutableLabels(); 1272 default: 1273 throw new RuntimeException("Invalid map field number: " + number); 1274 } 1275 } 1276 1277 @java.lang.Override 1278 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()1279 internalGetFieldAccessorTable() { 1280 return com.google.cloud.compute.v1.Compute 1281 .internal_static_google_cloud_compute_v1_ExternalVpnGateway_fieldAccessorTable 1282 .ensureFieldAccessorsInitialized( 1283 com.google.cloud.compute.v1.ExternalVpnGateway.class, 1284 com.google.cloud.compute.v1.ExternalVpnGateway.Builder.class); 1285 } 1286 1287 // Construct using com.google.cloud.compute.v1.ExternalVpnGateway.newBuilder() Builder()1288 private Builder() {} 1289 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1290 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1291 super(parent); 1292 } 1293 1294 @java.lang.Override clear()1295 public Builder clear() { 1296 super.clear(); 1297 bitField0_ = 0; 1298 creationTimestamp_ = ""; 1299 description_ = ""; 1300 id_ = 0L; 1301 if (interfacesBuilder_ == null) { 1302 interfaces_ = java.util.Collections.emptyList(); 1303 } else { 1304 interfaces_ = null; 1305 interfacesBuilder_.clear(); 1306 } 1307 bitField0_ = (bitField0_ & ~0x00000008); 1308 kind_ = ""; 1309 labelFingerprint_ = ""; 1310 internalGetMutableLabels().clear(); 1311 name_ = ""; 1312 redundancyType_ = ""; 1313 selfLink_ = ""; 1314 return this; 1315 } 1316 1317 @java.lang.Override getDescriptorForType()1318 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 1319 return com.google.cloud.compute.v1.Compute 1320 .internal_static_google_cloud_compute_v1_ExternalVpnGateway_descriptor; 1321 } 1322 1323 @java.lang.Override getDefaultInstanceForType()1324 public com.google.cloud.compute.v1.ExternalVpnGateway getDefaultInstanceForType() { 1325 return com.google.cloud.compute.v1.ExternalVpnGateway.getDefaultInstance(); 1326 } 1327 1328 @java.lang.Override build()1329 public com.google.cloud.compute.v1.ExternalVpnGateway build() { 1330 com.google.cloud.compute.v1.ExternalVpnGateway result = buildPartial(); 1331 if (!result.isInitialized()) { 1332 throw newUninitializedMessageException(result); 1333 } 1334 return result; 1335 } 1336 1337 @java.lang.Override buildPartial()1338 public com.google.cloud.compute.v1.ExternalVpnGateway buildPartial() { 1339 com.google.cloud.compute.v1.ExternalVpnGateway result = 1340 new com.google.cloud.compute.v1.ExternalVpnGateway(this); 1341 buildPartialRepeatedFields(result); 1342 if (bitField0_ != 0) { 1343 buildPartial0(result); 1344 } 1345 onBuilt(); 1346 return result; 1347 } 1348 buildPartialRepeatedFields(com.google.cloud.compute.v1.ExternalVpnGateway result)1349 private void buildPartialRepeatedFields(com.google.cloud.compute.v1.ExternalVpnGateway result) { 1350 if (interfacesBuilder_ == null) { 1351 if (((bitField0_ & 0x00000008) != 0)) { 1352 interfaces_ = java.util.Collections.unmodifiableList(interfaces_); 1353 bitField0_ = (bitField0_ & ~0x00000008); 1354 } 1355 result.interfaces_ = interfaces_; 1356 } else { 1357 result.interfaces_ = interfacesBuilder_.build(); 1358 } 1359 } 1360 buildPartial0(com.google.cloud.compute.v1.ExternalVpnGateway result)1361 private void buildPartial0(com.google.cloud.compute.v1.ExternalVpnGateway result) { 1362 int from_bitField0_ = bitField0_; 1363 int to_bitField0_ = 0; 1364 if (((from_bitField0_ & 0x00000001) != 0)) { 1365 result.creationTimestamp_ = creationTimestamp_; 1366 to_bitField0_ |= 0x00000001; 1367 } 1368 if (((from_bitField0_ & 0x00000002) != 0)) { 1369 result.description_ = description_; 1370 to_bitField0_ |= 0x00000002; 1371 } 1372 if (((from_bitField0_ & 0x00000004) != 0)) { 1373 result.id_ = id_; 1374 to_bitField0_ |= 0x00000004; 1375 } 1376 if (((from_bitField0_ & 0x00000010) != 0)) { 1377 result.kind_ = kind_; 1378 to_bitField0_ |= 0x00000008; 1379 } 1380 if (((from_bitField0_ & 0x00000020) != 0)) { 1381 result.labelFingerprint_ = labelFingerprint_; 1382 to_bitField0_ |= 0x00000010; 1383 } 1384 if (((from_bitField0_ & 0x00000040) != 0)) { 1385 result.labels_ = internalGetLabels(); 1386 result.labels_.makeImmutable(); 1387 } 1388 if (((from_bitField0_ & 0x00000080) != 0)) { 1389 result.name_ = name_; 1390 to_bitField0_ |= 0x00000020; 1391 } 1392 if (((from_bitField0_ & 0x00000100) != 0)) { 1393 result.redundancyType_ = redundancyType_; 1394 to_bitField0_ |= 0x00000040; 1395 } 1396 if (((from_bitField0_ & 0x00000200) != 0)) { 1397 result.selfLink_ = selfLink_; 1398 to_bitField0_ |= 0x00000080; 1399 } 1400 result.bitField0_ |= to_bitField0_; 1401 } 1402 1403 @java.lang.Override clone()1404 public Builder clone() { 1405 return super.clone(); 1406 } 1407 1408 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1409 public Builder setField( 1410 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1411 return super.setField(field, value); 1412 } 1413 1414 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1415 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 1416 return super.clearField(field); 1417 } 1418 1419 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1420 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 1421 return super.clearOneof(oneof); 1422 } 1423 1424 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1425 public Builder setRepeatedField( 1426 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 1427 return super.setRepeatedField(field, index, value); 1428 } 1429 1430 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1431 public Builder addRepeatedField( 1432 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1433 return super.addRepeatedField(field, value); 1434 } 1435 1436 @java.lang.Override mergeFrom(com.google.protobuf.Message other)1437 public Builder mergeFrom(com.google.protobuf.Message other) { 1438 if (other instanceof com.google.cloud.compute.v1.ExternalVpnGateway) { 1439 return mergeFrom((com.google.cloud.compute.v1.ExternalVpnGateway) other); 1440 } else { 1441 super.mergeFrom(other); 1442 return this; 1443 } 1444 } 1445 mergeFrom(com.google.cloud.compute.v1.ExternalVpnGateway other)1446 public Builder mergeFrom(com.google.cloud.compute.v1.ExternalVpnGateway other) { 1447 if (other == com.google.cloud.compute.v1.ExternalVpnGateway.getDefaultInstance()) return this; 1448 if (other.hasCreationTimestamp()) { 1449 creationTimestamp_ = other.creationTimestamp_; 1450 bitField0_ |= 0x00000001; 1451 onChanged(); 1452 } 1453 if (other.hasDescription()) { 1454 description_ = other.description_; 1455 bitField0_ |= 0x00000002; 1456 onChanged(); 1457 } 1458 if (other.hasId()) { 1459 setId(other.getId()); 1460 } 1461 if (interfacesBuilder_ == null) { 1462 if (!other.interfaces_.isEmpty()) { 1463 if (interfaces_.isEmpty()) { 1464 interfaces_ = other.interfaces_; 1465 bitField0_ = (bitField0_ & ~0x00000008); 1466 } else { 1467 ensureInterfacesIsMutable(); 1468 interfaces_.addAll(other.interfaces_); 1469 } 1470 onChanged(); 1471 } 1472 } else { 1473 if (!other.interfaces_.isEmpty()) { 1474 if (interfacesBuilder_.isEmpty()) { 1475 interfacesBuilder_.dispose(); 1476 interfacesBuilder_ = null; 1477 interfaces_ = other.interfaces_; 1478 bitField0_ = (bitField0_ & ~0x00000008); 1479 interfacesBuilder_ = 1480 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders 1481 ? getInterfacesFieldBuilder() 1482 : null; 1483 } else { 1484 interfacesBuilder_.addAllMessages(other.interfaces_); 1485 } 1486 } 1487 } 1488 if (other.hasKind()) { 1489 kind_ = other.kind_; 1490 bitField0_ |= 0x00000010; 1491 onChanged(); 1492 } 1493 if (other.hasLabelFingerprint()) { 1494 labelFingerprint_ = other.labelFingerprint_; 1495 bitField0_ |= 0x00000020; 1496 onChanged(); 1497 } 1498 internalGetMutableLabels().mergeFrom(other.internalGetLabels()); 1499 bitField0_ |= 0x00000040; 1500 if (other.hasName()) { 1501 name_ = other.name_; 1502 bitField0_ |= 0x00000080; 1503 onChanged(); 1504 } 1505 if (other.hasRedundancyType()) { 1506 redundancyType_ = other.redundancyType_; 1507 bitField0_ |= 0x00000100; 1508 onChanged(); 1509 } 1510 if (other.hasSelfLink()) { 1511 selfLink_ = other.selfLink_; 1512 bitField0_ |= 0x00000200; 1513 onChanged(); 1514 } 1515 this.mergeUnknownFields(other.getUnknownFields()); 1516 onChanged(); 1517 return this; 1518 } 1519 1520 @java.lang.Override isInitialized()1521 public final boolean isInitialized() { 1522 return true; 1523 } 1524 1525 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1526 public Builder mergeFrom( 1527 com.google.protobuf.CodedInputStream input, 1528 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1529 throws java.io.IOException { 1530 if (extensionRegistry == null) { 1531 throw new java.lang.NullPointerException(); 1532 } 1533 try { 1534 boolean done = false; 1535 while (!done) { 1536 int tag = input.readTag(); 1537 switch (tag) { 1538 case 0: 1539 done = true; 1540 break; 1541 case 26840: 1542 { 1543 id_ = input.readUInt64(); 1544 bitField0_ |= 0x00000004; 1545 break; 1546 } // case 26840 1547 case 26336418: 1548 { 1549 kind_ = input.readStringRequireUtf8(); 1550 bitField0_ |= 0x00000010; 1551 break; 1552 } // case 26336418 1553 case 26989658: 1554 { 1555 name_ = input.readStringRequireUtf8(); 1556 bitField0_ |= 0x00000080; 1557 break; 1558 } // case 26989658 1559 case 96588498: 1560 { 1561 com.google.cloud.compute.v1.ExternalVpnGatewayInterface m = 1562 input.readMessage( 1563 com.google.cloud.compute.v1.ExternalVpnGatewayInterface.parser(), 1564 extensionRegistry); 1565 if (interfacesBuilder_ == null) { 1566 ensureInterfacesIsMutable(); 1567 interfaces_.add(m); 1568 } else { 1569 interfacesBuilder_.addMessage(m); 1570 } 1571 break; 1572 } // case 96588498 1573 case 244202930: 1574 { 1575 creationTimestamp_ = input.readStringRequireUtf8(); 1576 bitField0_ |= 0x00000001; 1577 break; 1578 } // case 244202930 1579 case 1424998602: 1580 { 1581 labelFingerprint_ = input.readStringRequireUtf8(); 1582 bitField0_ |= 0x00000020; 1583 break; 1584 } // case 1424998602 1585 case -2123417374: 1586 { 1587 redundancyType_ = input.readStringRequireUtf8(); 1588 bitField0_ |= 0x00000100; 1589 break; 1590 } // case -2123417374 1591 case -911466526: 1592 { 1593 description_ = input.readStringRequireUtf8(); 1594 bitField0_ |= 0x00000002; 1595 break; 1596 } // case -911466526 1597 case -645248918: 1598 { 1599 selfLink_ = input.readStringRequireUtf8(); 1600 bitField0_ |= 0x00000200; 1601 break; 1602 } // case -645248918 1603 case -293404678: 1604 { 1605 com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ = 1606 input.readMessage( 1607 LabelsDefaultEntryHolder.defaultEntry.getParserForType(), 1608 extensionRegistry); 1609 internalGetMutableLabels() 1610 .getMutableMap() 1611 .put(labels__.getKey(), labels__.getValue()); 1612 bitField0_ |= 0x00000040; 1613 break; 1614 } // case -293404678 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 java.lang.Object creationTimestamp_ = ""; 1635 /** 1636 * 1637 * 1638 * <pre> 1639 * [Output Only] Creation timestamp in RFC3339 text format. 1640 * </pre> 1641 * 1642 * <code>optional string creation_timestamp = 30525366;</code> 1643 * 1644 * @return Whether the creationTimestamp field is set. 1645 */ hasCreationTimestamp()1646 public boolean hasCreationTimestamp() { 1647 return ((bitField0_ & 0x00000001) != 0); 1648 } 1649 /** 1650 * 1651 * 1652 * <pre> 1653 * [Output Only] Creation timestamp in RFC3339 text format. 1654 * </pre> 1655 * 1656 * <code>optional string creation_timestamp = 30525366;</code> 1657 * 1658 * @return The creationTimestamp. 1659 */ getCreationTimestamp()1660 public java.lang.String getCreationTimestamp() { 1661 java.lang.Object ref = creationTimestamp_; 1662 if (!(ref instanceof java.lang.String)) { 1663 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1664 java.lang.String s = bs.toStringUtf8(); 1665 creationTimestamp_ = s; 1666 return s; 1667 } else { 1668 return (java.lang.String) ref; 1669 } 1670 } 1671 /** 1672 * 1673 * 1674 * <pre> 1675 * [Output Only] Creation timestamp in RFC3339 text format. 1676 * </pre> 1677 * 1678 * <code>optional string creation_timestamp = 30525366;</code> 1679 * 1680 * @return The bytes for creationTimestamp. 1681 */ getCreationTimestampBytes()1682 public com.google.protobuf.ByteString getCreationTimestampBytes() { 1683 java.lang.Object ref = creationTimestamp_; 1684 if (ref instanceof String) { 1685 com.google.protobuf.ByteString b = 1686 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1687 creationTimestamp_ = b; 1688 return b; 1689 } else { 1690 return (com.google.protobuf.ByteString) ref; 1691 } 1692 } 1693 /** 1694 * 1695 * 1696 * <pre> 1697 * [Output Only] Creation timestamp in RFC3339 text format. 1698 * </pre> 1699 * 1700 * <code>optional string creation_timestamp = 30525366;</code> 1701 * 1702 * @param value The creationTimestamp to set. 1703 * @return This builder for chaining. 1704 */ setCreationTimestamp(java.lang.String value)1705 public Builder setCreationTimestamp(java.lang.String value) { 1706 if (value == null) { 1707 throw new NullPointerException(); 1708 } 1709 creationTimestamp_ = value; 1710 bitField0_ |= 0x00000001; 1711 onChanged(); 1712 return this; 1713 } 1714 /** 1715 * 1716 * 1717 * <pre> 1718 * [Output Only] Creation timestamp in RFC3339 text format. 1719 * </pre> 1720 * 1721 * <code>optional string creation_timestamp = 30525366;</code> 1722 * 1723 * @return This builder for chaining. 1724 */ clearCreationTimestamp()1725 public Builder clearCreationTimestamp() { 1726 creationTimestamp_ = getDefaultInstance().getCreationTimestamp(); 1727 bitField0_ = (bitField0_ & ~0x00000001); 1728 onChanged(); 1729 return this; 1730 } 1731 /** 1732 * 1733 * 1734 * <pre> 1735 * [Output Only] Creation timestamp in RFC3339 text format. 1736 * </pre> 1737 * 1738 * <code>optional string creation_timestamp = 30525366;</code> 1739 * 1740 * @param value The bytes for creationTimestamp to set. 1741 * @return This builder for chaining. 1742 */ setCreationTimestampBytes(com.google.protobuf.ByteString value)1743 public Builder setCreationTimestampBytes(com.google.protobuf.ByteString value) { 1744 if (value == null) { 1745 throw new NullPointerException(); 1746 } 1747 checkByteStringIsUtf8(value); 1748 creationTimestamp_ = value; 1749 bitField0_ |= 0x00000001; 1750 onChanged(); 1751 return this; 1752 } 1753 1754 private java.lang.Object description_ = ""; 1755 /** 1756 * 1757 * 1758 * <pre> 1759 * An optional description of this resource. Provide this property when you create the resource. 1760 * </pre> 1761 * 1762 * <code>optional string description = 422937596;</code> 1763 * 1764 * @return Whether the description field is set. 1765 */ hasDescription()1766 public boolean hasDescription() { 1767 return ((bitField0_ & 0x00000002) != 0); 1768 } 1769 /** 1770 * 1771 * 1772 * <pre> 1773 * An optional description of this resource. Provide this property when you create the resource. 1774 * </pre> 1775 * 1776 * <code>optional string description = 422937596;</code> 1777 * 1778 * @return The description. 1779 */ getDescription()1780 public java.lang.String getDescription() { 1781 java.lang.Object ref = description_; 1782 if (!(ref instanceof java.lang.String)) { 1783 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 1784 java.lang.String s = bs.toStringUtf8(); 1785 description_ = s; 1786 return s; 1787 } else { 1788 return (java.lang.String) ref; 1789 } 1790 } 1791 /** 1792 * 1793 * 1794 * <pre> 1795 * An optional description of this resource. Provide this property when you create the resource. 1796 * </pre> 1797 * 1798 * <code>optional string description = 422937596;</code> 1799 * 1800 * @return The bytes for description. 1801 */ getDescriptionBytes()1802 public com.google.protobuf.ByteString getDescriptionBytes() { 1803 java.lang.Object ref = description_; 1804 if (ref instanceof String) { 1805 com.google.protobuf.ByteString b = 1806 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 1807 description_ = b; 1808 return b; 1809 } else { 1810 return (com.google.protobuf.ByteString) ref; 1811 } 1812 } 1813 /** 1814 * 1815 * 1816 * <pre> 1817 * An optional description of this resource. Provide this property when you create the resource. 1818 * </pre> 1819 * 1820 * <code>optional string description = 422937596;</code> 1821 * 1822 * @param value The description to set. 1823 * @return This builder for chaining. 1824 */ setDescription(java.lang.String value)1825 public Builder setDescription(java.lang.String value) { 1826 if (value == null) { 1827 throw new NullPointerException(); 1828 } 1829 description_ = value; 1830 bitField0_ |= 0x00000002; 1831 onChanged(); 1832 return this; 1833 } 1834 /** 1835 * 1836 * 1837 * <pre> 1838 * An optional description of this resource. Provide this property when you create the resource. 1839 * </pre> 1840 * 1841 * <code>optional string description = 422937596;</code> 1842 * 1843 * @return This builder for chaining. 1844 */ clearDescription()1845 public Builder clearDescription() { 1846 description_ = getDefaultInstance().getDescription(); 1847 bitField0_ = (bitField0_ & ~0x00000002); 1848 onChanged(); 1849 return this; 1850 } 1851 /** 1852 * 1853 * 1854 * <pre> 1855 * An optional description of this resource. Provide this property when you create the resource. 1856 * </pre> 1857 * 1858 * <code>optional string description = 422937596;</code> 1859 * 1860 * @param value The bytes for description to set. 1861 * @return This builder for chaining. 1862 */ setDescriptionBytes(com.google.protobuf.ByteString value)1863 public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { 1864 if (value == null) { 1865 throw new NullPointerException(); 1866 } 1867 checkByteStringIsUtf8(value); 1868 description_ = value; 1869 bitField0_ |= 0x00000002; 1870 onChanged(); 1871 return this; 1872 } 1873 1874 private long id_; 1875 /** 1876 * 1877 * 1878 * <pre> 1879 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1880 * </pre> 1881 * 1882 * <code>optional uint64 id = 3355;</code> 1883 * 1884 * @return Whether the id field is set. 1885 */ 1886 @java.lang.Override hasId()1887 public boolean hasId() { 1888 return ((bitField0_ & 0x00000004) != 0); 1889 } 1890 /** 1891 * 1892 * 1893 * <pre> 1894 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1895 * </pre> 1896 * 1897 * <code>optional uint64 id = 3355;</code> 1898 * 1899 * @return The id. 1900 */ 1901 @java.lang.Override getId()1902 public long getId() { 1903 return id_; 1904 } 1905 /** 1906 * 1907 * 1908 * <pre> 1909 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1910 * </pre> 1911 * 1912 * <code>optional uint64 id = 3355;</code> 1913 * 1914 * @param value The id to set. 1915 * @return This builder for chaining. 1916 */ setId(long value)1917 public Builder setId(long value) { 1918 1919 id_ = value; 1920 bitField0_ |= 0x00000004; 1921 onChanged(); 1922 return this; 1923 } 1924 /** 1925 * 1926 * 1927 * <pre> 1928 * [Output Only] The unique identifier for the resource. This identifier is defined by the server. 1929 * </pre> 1930 * 1931 * <code>optional uint64 id = 3355;</code> 1932 * 1933 * @return This builder for chaining. 1934 */ clearId()1935 public Builder clearId() { 1936 bitField0_ = (bitField0_ & ~0x00000004); 1937 id_ = 0L; 1938 onChanged(); 1939 return this; 1940 } 1941 1942 private java.util.List<com.google.cloud.compute.v1.ExternalVpnGatewayInterface> interfaces_ = 1943 java.util.Collections.emptyList(); 1944 ensureInterfacesIsMutable()1945 private void ensureInterfacesIsMutable() { 1946 if (!((bitField0_ & 0x00000008) != 0)) { 1947 interfaces_ = 1948 new java.util.ArrayList<com.google.cloud.compute.v1.ExternalVpnGatewayInterface>( 1949 interfaces_); 1950 bitField0_ |= 0x00000008; 1951 } 1952 } 1953 1954 private com.google.protobuf.RepeatedFieldBuilderV3< 1955 com.google.cloud.compute.v1.ExternalVpnGatewayInterface, 1956 com.google.cloud.compute.v1.ExternalVpnGatewayInterface.Builder, 1957 com.google.cloud.compute.v1.ExternalVpnGatewayInterfaceOrBuilder> 1958 interfacesBuilder_; 1959 1960 /** 1961 * 1962 * 1963 * <pre> 1964 * A list of interfaces for this external VPN gateway. If your peer-side gateway is an on-premises gateway and non-AWS cloud providers' gateway, at most two interfaces can be provided for an external VPN gateway. If your peer side is an AWS virtual private gateway, four interfaces should be provided for an external VPN gateway. 1965 * </pre> 1966 * 1967 * <code>repeated .google.cloud.compute.v1.ExternalVpnGatewayInterface interfaces = 12073562; 1968 * </code> 1969 */ 1970 public java.util.List<com.google.cloud.compute.v1.ExternalVpnGatewayInterface> getInterfacesList()1971 getInterfacesList() { 1972 if (interfacesBuilder_ == null) { 1973 return java.util.Collections.unmodifiableList(interfaces_); 1974 } else { 1975 return interfacesBuilder_.getMessageList(); 1976 } 1977 } 1978 /** 1979 * 1980 * 1981 * <pre> 1982 * A list of interfaces for this external VPN gateway. If your peer-side gateway is an on-premises gateway and non-AWS cloud providers' gateway, at most two interfaces can be provided for an external VPN gateway. If your peer side is an AWS virtual private gateway, four interfaces should be provided for an external VPN gateway. 1983 * </pre> 1984 * 1985 * <code>repeated .google.cloud.compute.v1.ExternalVpnGatewayInterface interfaces = 12073562; 1986 * </code> 1987 */ getInterfacesCount()1988 public int getInterfacesCount() { 1989 if (interfacesBuilder_ == null) { 1990 return interfaces_.size(); 1991 } else { 1992 return interfacesBuilder_.getCount(); 1993 } 1994 } 1995 /** 1996 * 1997 * 1998 * <pre> 1999 * A list of interfaces for this external VPN gateway. If your peer-side gateway is an on-premises gateway and non-AWS cloud providers' gateway, at most two interfaces can be provided for an external VPN gateway. If your peer side is an AWS virtual private gateway, four interfaces should be provided for an external VPN gateway. 2000 * </pre> 2001 * 2002 * <code>repeated .google.cloud.compute.v1.ExternalVpnGatewayInterface interfaces = 12073562; 2003 * </code> 2004 */ getInterfaces(int index)2005 public com.google.cloud.compute.v1.ExternalVpnGatewayInterface getInterfaces(int index) { 2006 if (interfacesBuilder_ == null) { 2007 return interfaces_.get(index); 2008 } else { 2009 return interfacesBuilder_.getMessage(index); 2010 } 2011 } 2012 /** 2013 * 2014 * 2015 * <pre> 2016 * A list of interfaces for this external VPN gateway. If your peer-side gateway is an on-premises gateway and non-AWS cloud providers' gateway, at most two interfaces can be provided for an external VPN gateway. If your peer side is an AWS virtual private gateway, four interfaces should be provided for an external VPN gateway. 2017 * </pre> 2018 * 2019 * <code>repeated .google.cloud.compute.v1.ExternalVpnGatewayInterface interfaces = 12073562; 2020 * </code> 2021 */ setInterfaces( int index, com.google.cloud.compute.v1.ExternalVpnGatewayInterface value)2022 public Builder setInterfaces( 2023 int index, com.google.cloud.compute.v1.ExternalVpnGatewayInterface value) { 2024 if (interfacesBuilder_ == null) { 2025 if (value == null) { 2026 throw new NullPointerException(); 2027 } 2028 ensureInterfacesIsMutable(); 2029 interfaces_.set(index, value); 2030 onChanged(); 2031 } else { 2032 interfacesBuilder_.setMessage(index, value); 2033 } 2034 return this; 2035 } 2036 /** 2037 * 2038 * 2039 * <pre> 2040 * A list of interfaces for this external VPN gateway. If your peer-side gateway is an on-premises gateway and non-AWS cloud providers' gateway, at most two interfaces can be provided for an external VPN gateway. If your peer side is an AWS virtual private gateway, four interfaces should be provided for an external VPN gateway. 2041 * </pre> 2042 * 2043 * <code>repeated .google.cloud.compute.v1.ExternalVpnGatewayInterface interfaces = 12073562; 2044 * </code> 2045 */ setInterfaces( int index, com.google.cloud.compute.v1.ExternalVpnGatewayInterface.Builder builderForValue)2046 public Builder setInterfaces( 2047 int index, 2048 com.google.cloud.compute.v1.ExternalVpnGatewayInterface.Builder builderForValue) { 2049 if (interfacesBuilder_ == null) { 2050 ensureInterfacesIsMutable(); 2051 interfaces_.set(index, builderForValue.build()); 2052 onChanged(); 2053 } else { 2054 interfacesBuilder_.setMessage(index, builderForValue.build()); 2055 } 2056 return this; 2057 } 2058 /** 2059 * 2060 * 2061 * <pre> 2062 * A list of interfaces for this external VPN gateway. If your peer-side gateway is an on-premises gateway and non-AWS cloud providers' gateway, at most two interfaces can be provided for an external VPN gateway. If your peer side is an AWS virtual private gateway, four interfaces should be provided for an external VPN gateway. 2063 * </pre> 2064 * 2065 * <code>repeated .google.cloud.compute.v1.ExternalVpnGatewayInterface interfaces = 12073562; 2066 * </code> 2067 */ addInterfaces(com.google.cloud.compute.v1.ExternalVpnGatewayInterface value)2068 public Builder addInterfaces(com.google.cloud.compute.v1.ExternalVpnGatewayInterface value) { 2069 if (interfacesBuilder_ == null) { 2070 if (value == null) { 2071 throw new NullPointerException(); 2072 } 2073 ensureInterfacesIsMutable(); 2074 interfaces_.add(value); 2075 onChanged(); 2076 } else { 2077 interfacesBuilder_.addMessage(value); 2078 } 2079 return this; 2080 } 2081 /** 2082 * 2083 * 2084 * <pre> 2085 * A list of interfaces for this external VPN gateway. If your peer-side gateway is an on-premises gateway and non-AWS cloud providers' gateway, at most two interfaces can be provided for an external VPN gateway. If your peer side is an AWS virtual private gateway, four interfaces should be provided for an external VPN gateway. 2086 * </pre> 2087 * 2088 * <code>repeated .google.cloud.compute.v1.ExternalVpnGatewayInterface interfaces = 12073562; 2089 * </code> 2090 */ addInterfaces( int index, com.google.cloud.compute.v1.ExternalVpnGatewayInterface value)2091 public Builder addInterfaces( 2092 int index, com.google.cloud.compute.v1.ExternalVpnGatewayInterface value) { 2093 if (interfacesBuilder_ == null) { 2094 if (value == null) { 2095 throw new NullPointerException(); 2096 } 2097 ensureInterfacesIsMutable(); 2098 interfaces_.add(index, value); 2099 onChanged(); 2100 } else { 2101 interfacesBuilder_.addMessage(index, value); 2102 } 2103 return this; 2104 } 2105 /** 2106 * 2107 * 2108 * <pre> 2109 * A list of interfaces for this external VPN gateway. If your peer-side gateway is an on-premises gateway and non-AWS cloud providers' gateway, at most two interfaces can be provided for an external VPN gateway. If your peer side is an AWS virtual private gateway, four interfaces should be provided for an external VPN gateway. 2110 * </pre> 2111 * 2112 * <code>repeated .google.cloud.compute.v1.ExternalVpnGatewayInterface interfaces = 12073562; 2113 * </code> 2114 */ addInterfaces( com.google.cloud.compute.v1.ExternalVpnGatewayInterface.Builder builderForValue)2115 public Builder addInterfaces( 2116 com.google.cloud.compute.v1.ExternalVpnGatewayInterface.Builder builderForValue) { 2117 if (interfacesBuilder_ == null) { 2118 ensureInterfacesIsMutable(); 2119 interfaces_.add(builderForValue.build()); 2120 onChanged(); 2121 } else { 2122 interfacesBuilder_.addMessage(builderForValue.build()); 2123 } 2124 return this; 2125 } 2126 /** 2127 * 2128 * 2129 * <pre> 2130 * A list of interfaces for this external VPN gateway. If your peer-side gateway is an on-premises gateway and non-AWS cloud providers' gateway, at most two interfaces can be provided for an external VPN gateway. If your peer side is an AWS virtual private gateway, four interfaces should be provided for an external VPN gateway. 2131 * </pre> 2132 * 2133 * <code>repeated .google.cloud.compute.v1.ExternalVpnGatewayInterface interfaces = 12073562; 2134 * </code> 2135 */ addInterfaces( int index, com.google.cloud.compute.v1.ExternalVpnGatewayInterface.Builder builderForValue)2136 public Builder addInterfaces( 2137 int index, 2138 com.google.cloud.compute.v1.ExternalVpnGatewayInterface.Builder builderForValue) { 2139 if (interfacesBuilder_ == null) { 2140 ensureInterfacesIsMutable(); 2141 interfaces_.add(index, builderForValue.build()); 2142 onChanged(); 2143 } else { 2144 interfacesBuilder_.addMessage(index, builderForValue.build()); 2145 } 2146 return this; 2147 } 2148 /** 2149 * 2150 * 2151 * <pre> 2152 * A list of interfaces for this external VPN gateway. If your peer-side gateway is an on-premises gateway and non-AWS cloud providers' gateway, at most two interfaces can be provided for an external VPN gateway. If your peer side is an AWS virtual private gateway, four interfaces should be provided for an external VPN gateway. 2153 * </pre> 2154 * 2155 * <code>repeated .google.cloud.compute.v1.ExternalVpnGatewayInterface interfaces = 12073562; 2156 * </code> 2157 */ addAllInterfaces( java.lang.Iterable<? extends com.google.cloud.compute.v1.ExternalVpnGatewayInterface> values)2158 public Builder addAllInterfaces( 2159 java.lang.Iterable<? extends com.google.cloud.compute.v1.ExternalVpnGatewayInterface> 2160 values) { 2161 if (interfacesBuilder_ == null) { 2162 ensureInterfacesIsMutable(); 2163 com.google.protobuf.AbstractMessageLite.Builder.addAll(values, interfaces_); 2164 onChanged(); 2165 } else { 2166 interfacesBuilder_.addAllMessages(values); 2167 } 2168 return this; 2169 } 2170 /** 2171 * 2172 * 2173 * <pre> 2174 * A list of interfaces for this external VPN gateway. If your peer-side gateway is an on-premises gateway and non-AWS cloud providers' gateway, at most two interfaces can be provided for an external VPN gateway. If your peer side is an AWS virtual private gateway, four interfaces should be provided for an external VPN gateway. 2175 * </pre> 2176 * 2177 * <code>repeated .google.cloud.compute.v1.ExternalVpnGatewayInterface interfaces = 12073562; 2178 * </code> 2179 */ clearInterfaces()2180 public Builder clearInterfaces() { 2181 if (interfacesBuilder_ == null) { 2182 interfaces_ = java.util.Collections.emptyList(); 2183 bitField0_ = (bitField0_ & ~0x00000008); 2184 onChanged(); 2185 } else { 2186 interfacesBuilder_.clear(); 2187 } 2188 return this; 2189 } 2190 /** 2191 * 2192 * 2193 * <pre> 2194 * A list of interfaces for this external VPN gateway. If your peer-side gateway is an on-premises gateway and non-AWS cloud providers' gateway, at most two interfaces can be provided for an external VPN gateway. If your peer side is an AWS virtual private gateway, four interfaces should be provided for an external VPN gateway. 2195 * </pre> 2196 * 2197 * <code>repeated .google.cloud.compute.v1.ExternalVpnGatewayInterface interfaces = 12073562; 2198 * </code> 2199 */ removeInterfaces(int index)2200 public Builder removeInterfaces(int index) { 2201 if (interfacesBuilder_ == null) { 2202 ensureInterfacesIsMutable(); 2203 interfaces_.remove(index); 2204 onChanged(); 2205 } else { 2206 interfacesBuilder_.remove(index); 2207 } 2208 return this; 2209 } 2210 /** 2211 * 2212 * 2213 * <pre> 2214 * A list of interfaces for this external VPN gateway. If your peer-side gateway is an on-premises gateway and non-AWS cloud providers' gateway, at most two interfaces can be provided for an external VPN gateway. If your peer side is an AWS virtual private gateway, four interfaces should be provided for an external VPN gateway. 2215 * </pre> 2216 * 2217 * <code>repeated .google.cloud.compute.v1.ExternalVpnGatewayInterface interfaces = 12073562; 2218 * </code> 2219 */ getInterfacesBuilder( int index)2220 public com.google.cloud.compute.v1.ExternalVpnGatewayInterface.Builder getInterfacesBuilder( 2221 int index) { 2222 return getInterfacesFieldBuilder().getBuilder(index); 2223 } 2224 /** 2225 * 2226 * 2227 * <pre> 2228 * A list of interfaces for this external VPN gateway. If your peer-side gateway is an on-premises gateway and non-AWS cloud providers' gateway, at most two interfaces can be provided for an external VPN gateway. If your peer side is an AWS virtual private gateway, four interfaces should be provided for an external VPN gateway. 2229 * </pre> 2230 * 2231 * <code>repeated .google.cloud.compute.v1.ExternalVpnGatewayInterface interfaces = 12073562; 2232 * </code> 2233 */ getInterfacesOrBuilder( int index)2234 public com.google.cloud.compute.v1.ExternalVpnGatewayInterfaceOrBuilder getInterfacesOrBuilder( 2235 int index) { 2236 if (interfacesBuilder_ == null) { 2237 return interfaces_.get(index); 2238 } else { 2239 return interfacesBuilder_.getMessageOrBuilder(index); 2240 } 2241 } 2242 /** 2243 * 2244 * 2245 * <pre> 2246 * A list of interfaces for this external VPN gateway. If your peer-side gateway is an on-premises gateway and non-AWS cloud providers' gateway, at most two interfaces can be provided for an external VPN gateway. If your peer side is an AWS virtual private gateway, four interfaces should be provided for an external VPN gateway. 2247 * </pre> 2248 * 2249 * <code>repeated .google.cloud.compute.v1.ExternalVpnGatewayInterface interfaces = 12073562; 2250 * </code> 2251 */ 2252 public java.util.List< 2253 ? extends com.google.cloud.compute.v1.ExternalVpnGatewayInterfaceOrBuilder> getInterfacesOrBuilderList()2254 getInterfacesOrBuilderList() { 2255 if (interfacesBuilder_ != null) { 2256 return interfacesBuilder_.getMessageOrBuilderList(); 2257 } else { 2258 return java.util.Collections.unmodifiableList(interfaces_); 2259 } 2260 } 2261 /** 2262 * 2263 * 2264 * <pre> 2265 * A list of interfaces for this external VPN gateway. If your peer-side gateway is an on-premises gateway and non-AWS cloud providers' gateway, at most two interfaces can be provided for an external VPN gateway. If your peer side is an AWS virtual private gateway, four interfaces should be provided for an external VPN gateway. 2266 * </pre> 2267 * 2268 * <code>repeated .google.cloud.compute.v1.ExternalVpnGatewayInterface interfaces = 12073562; 2269 * </code> 2270 */ addInterfacesBuilder()2271 public com.google.cloud.compute.v1.ExternalVpnGatewayInterface.Builder addInterfacesBuilder() { 2272 return getInterfacesFieldBuilder() 2273 .addBuilder(com.google.cloud.compute.v1.ExternalVpnGatewayInterface.getDefaultInstance()); 2274 } 2275 /** 2276 * 2277 * 2278 * <pre> 2279 * A list of interfaces for this external VPN gateway. If your peer-side gateway is an on-premises gateway and non-AWS cloud providers' gateway, at most two interfaces can be provided for an external VPN gateway. If your peer side is an AWS virtual private gateway, four interfaces should be provided for an external VPN gateway. 2280 * </pre> 2281 * 2282 * <code>repeated .google.cloud.compute.v1.ExternalVpnGatewayInterface interfaces = 12073562; 2283 * </code> 2284 */ addInterfacesBuilder( int index)2285 public com.google.cloud.compute.v1.ExternalVpnGatewayInterface.Builder addInterfacesBuilder( 2286 int index) { 2287 return getInterfacesFieldBuilder() 2288 .addBuilder( 2289 index, com.google.cloud.compute.v1.ExternalVpnGatewayInterface.getDefaultInstance()); 2290 } 2291 /** 2292 * 2293 * 2294 * <pre> 2295 * A list of interfaces for this external VPN gateway. If your peer-side gateway is an on-premises gateway and non-AWS cloud providers' gateway, at most two interfaces can be provided for an external VPN gateway. If your peer side is an AWS virtual private gateway, four interfaces should be provided for an external VPN gateway. 2296 * </pre> 2297 * 2298 * <code>repeated .google.cloud.compute.v1.ExternalVpnGatewayInterface interfaces = 12073562; 2299 * </code> 2300 */ 2301 public java.util.List<com.google.cloud.compute.v1.ExternalVpnGatewayInterface.Builder> getInterfacesBuilderList()2302 getInterfacesBuilderList() { 2303 return getInterfacesFieldBuilder().getBuilderList(); 2304 } 2305 2306 private com.google.protobuf.RepeatedFieldBuilderV3< 2307 com.google.cloud.compute.v1.ExternalVpnGatewayInterface, 2308 com.google.cloud.compute.v1.ExternalVpnGatewayInterface.Builder, 2309 com.google.cloud.compute.v1.ExternalVpnGatewayInterfaceOrBuilder> getInterfacesFieldBuilder()2310 getInterfacesFieldBuilder() { 2311 if (interfacesBuilder_ == null) { 2312 interfacesBuilder_ = 2313 new com.google.protobuf.RepeatedFieldBuilderV3< 2314 com.google.cloud.compute.v1.ExternalVpnGatewayInterface, 2315 com.google.cloud.compute.v1.ExternalVpnGatewayInterface.Builder, 2316 com.google.cloud.compute.v1.ExternalVpnGatewayInterfaceOrBuilder>( 2317 interfaces_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); 2318 interfaces_ = null; 2319 } 2320 return interfacesBuilder_; 2321 } 2322 2323 private java.lang.Object kind_ = ""; 2324 /** 2325 * 2326 * 2327 * <pre> 2328 * [Output Only] Type of the resource. Always compute#externalVpnGateway for externalVpnGateways. 2329 * </pre> 2330 * 2331 * <code>optional string kind = 3292052;</code> 2332 * 2333 * @return Whether the kind field is set. 2334 */ hasKind()2335 public boolean hasKind() { 2336 return ((bitField0_ & 0x00000010) != 0); 2337 } 2338 /** 2339 * 2340 * 2341 * <pre> 2342 * [Output Only] Type of the resource. Always compute#externalVpnGateway for externalVpnGateways. 2343 * </pre> 2344 * 2345 * <code>optional string kind = 3292052;</code> 2346 * 2347 * @return The kind. 2348 */ getKind()2349 public java.lang.String getKind() { 2350 java.lang.Object ref = kind_; 2351 if (!(ref instanceof java.lang.String)) { 2352 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2353 java.lang.String s = bs.toStringUtf8(); 2354 kind_ = s; 2355 return s; 2356 } else { 2357 return (java.lang.String) ref; 2358 } 2359 } 2360 /** 2361 * 2362 * 2363 * <pre> 2364 * [Output Only] Type of the resource. Always compute#externalVpnGateway for externalVpnGateways. 2365 * </pre> 2366 * 2367 * <code>optional string kind = 3292052;</code> 2368 * 2369 * @return The bytes for kind. 2370 */ getKindBytes()2371 public com.google.protobuf.ByteString getKindBytes() { 2372 java.lang.Object ref = kind_; 2373 if (ref instanceof String) { 2374 com.google.protobuf.ByteString b = 2375 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2376 kind_ = b; 2377 return b; 2378 } else { 2379 return (com.google.protobuf.ByteString) ref; 2380 } 2381 } 2382 /** 2383 * 2384 * 2385 * <pre> 2386 * [Output Only] Type of the resource. Always compute#externalVpnGateway for externalVpnGateways. 2387 * </pre> 2388 * 2389 * <code>optional string kind = 3292052;</code> 2390 * 2391 * @param value The kind to set. 2392 * @return This builder for chaining. 2393 */ setKind(java.lang.String value)2394 public Builder setKind(java.lang.String value) { 2395 if (value == null) { 2396 throw new NullPointerException(); 2397 } 2398 kind_ = value; 2399 bitField0_ |= 0x00000010; 2400 onChanged(); 2401 return this; 2402 } 2403 /** 2404 * 2405 * 2406 * <pre> 2407 * [Output Only] Type of the resource. Always compute#externalVpnGateway for externalVpnGateways. 2408 * </pre> 2409 * 2410 * <code>optional string kind = 3292052;</code> 2411 * 2412 * @return This builder for chaining. 2413 */ clearKind()2414 public Builder clearKind() { 2415 kind_ = getDefaultInstance().getKind(); 2416 bitField0_ = (bitField0_ & ~0x00000010); 2417 onChanged(); 2418 return this; 2419 } 2420 /** 2421 * 2422 * 2423 * <pre> 2424 * [Output Only] Type of the resource. Always compute#externalVpnGateway for externalVpnGateways. 2425 * </pre> 2426 * 2427 * <code>optional string kind = 3292052;</code> 2428 * 2429 * @param value The bytes for kind to set. 2430 * @return This builder for chaining. 2431 */ setKindBytes(com.google.protobuf.ByteString value)2432 public Builder setKindBytes(com.google.protobuf.ByteString value) { 2433 if (value == null) { 2434 throw new NullPointerException(); 2435 } 2436 checkByteStringIsUtf8(value); 2437 kind_ = value; 2438 bitField0_ |= 0x00000010; 2439 onChanged(); 2440 return this; 2441 } 2442 2443 private java.lang.Object labelFingerprint_ = ""; 2444 /** 2445 * 2446 * 2447 * <pre> 2448 * A fingerprint for the labels being applied to this ExternalVpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an ExternalVpnGateway. 2449 * </pre> 2450 * 2451 * <code>optional string label_fingerprint = 178124825;</code> 2452 * 2453 * @return Whether the labelFingerprint field is set. 2454 */ hasLabelFingerprint()2455 public boolean hasLabelFingerprint() { 2456 return ((bitField0_ & 0x00000020) != 0); 2457 } 2458 /** 2459 * 2460 * 2461 * <pre> 2462 * A fingerprint for the labels being applied to this ExternalVpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an ExternalVpnGateway. 2463 * </pre> 2464 * 2465 * <code>optional string label_fingerprint = 178124825;</code> 2466 * 2467 * @return The labelFingerprint. 2468 */ getLabelFingerprint()2469 public java.lang.String getLabelFingerprint() { 2470 java.lang.Object ref = labelFingerprint_; 2471 if (!(ref instanceof java.lang.String)) { 2472 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2473 java.lang.String s = bs.toStringUtf8(); 2474 labelFingerprint_ = s; 2475 return s; 2476 } else { 2477 return (java.lang.String) ref; 2478 } 2479 } 2480 /** 2481 * 2482 * 2483 * <pre> 2484 * A fingerprint for the labels being applied to this ExternalVpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an ExternalVpnGateway. 2485 * </pre> 2486 * 2487 * <code>optional string label_fingerprint = 178124825;</code> 2488 * 2489 * @return The bytes for labelFingerprint. 2490 */ getLabelFingerprintBytes()2491 public com.google.protobuf.ByteString getLabelFingerprintBytes() { 2492 java.lang.Object ref = labelFingerprint_; 2493 if (ref instanceof String) { 2494 com.google.protobuf.ByteString b = 2495 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2496 labelFingerprint_ = b; 2497 return b; 2498 } else { 2499 return (com.google.protobuf.ByteString) ref; 2500 } 2501 } 2502 /** 2503 * 2504 * 2505 * <pre> 2506 * A fingerprint for the labels being applied to this ExternalVpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an ExternalVpnGateway. 2507 * </pre> 2508 * 2509 * <code>optional string label_fingerprint = 178124825;</code> 2510 * 2511 * @param value The labelFingerprint to set. 2512 * @return This builder for chaining. 2513 */ setLabelFingerprint(java.lang.String value)2514 public Builder setLabelFingerprint(java.lang.String value) { 2515 if (value == null) { 2516 throw new NullPointerException(); 2517 } 2518 labelFingerprint_ = value; 2519 bitField0_ |= 0x00000020; 2520 onChanged(); 2521 return this; 2522 } 2523 /** 2524 * 2525 * 2526 * <pre> 2527 * A fingerprint for the labels being applied to this ExternalVpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an ExternalVpnGateway. 2528 * </pre> 2529 * 2530 * <code>optional string label_fingerprint = 178124825;</code> 2531 * 2532 * @return This builder for chaining. 2533 */ clearLabelFingerprint()2534 public Builder clearLabelFingerprint() { 2535 labelFingerprint_ = getDefaultInstance().getLabelFingerprint(); 2536 bitField0_ = (bitField0_ & ~0x00000020); 2537 onChanged(); 2538 return this; 2539 } 2540 /** 2541 * 2542 * 2543 * <pre> 2544 * A fingerprint for the labels being applied to this ExternalVpnGateway, which is essentially a hash of the labels set used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update labels. You must always provide an up-to-date fingerprint hash in order to update or change labels, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make a get() request to retrieve an ExternalVpnGateway. 2545 * </pre> 2546 * 2547 * <code>optional string label_fingerprint = 178124825;</code> 2548 * 2549 * @param value The bytes for labelFingerprint to set. 2550 * @return This builder for chaining. 2551 */ setLabelFingerprintBytes(com.google.protobuf.ByteString value)2552 public Builder setLabelFingerprintBytes(com.google.protobuf.ByteString value) { 2553 if (value == null) { 2554 throw new NullPointerException(); 2555 } 2556 checkByteStringIsUtf8(value); 2557 labelFingerprint_ = value; 2558 bitField0_ |= 0x00000020; 2559 onChanged(); 2560 return this; 2561 } 2562 2563 private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_; 2564 internalGetLabels()2565 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() { 2566 if (labels_ == null) { 2567 return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry); 2568 } 2569 return labels_; 2570 } 2571 2572 private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetMutableLabels()2573 internalGetMutableLabels() { 2574 if (labels_ == null) { 2575 labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); 2576 } 2577 if (!labels_.isMutable()) { 2578 labels_ = labels_.copy(); 2579 } 2580 bitField0_ |= 0x00000040; 2581 onChanged(); 2582 return labels_; 2583 } 2584 getLabelsCount()2585 public int getLabelsCount() { 2586 return internalGetLabels().getMap().size(); 2587 } 2588 /** 2589 * 2590 * 2591 * <pre> 2592 * Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty. 2593 * </pre> 2594 * 2595 * <code>map<string, string> labels = 500195327;</code> 2596 */ 2597 @java.lang.Override containsLabels(java.lang.String key)2598 public boolean containsLabels(java.lang.String key) { 2599 if (key == null) { 2600 throw new NullPointerException("map key"); 2601 } 2602 return internalGetLabels().getMap().containsKey(key); 2603 } 2604 /** Use {@link #getLabelsMap()} instead. */ 2605 @java.lang.Override 2606 @java.lang.Deprecated getLabels()2607 public java.util.Map<java.lang.String, java.lang.String> getLabels() { 2608 return getLabelsMap(); 2609 } 2610 /** 2611 * 2612 * 2613 * <pre> 2614 * Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty. 2615 * </pre> 2616 * 2617 * <code>map<string, string> labels = 500195327;</code> 2618 */ 2619 @java.lang.Override getLabelsMap()2620 public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() { 2621 return internalGetLabels().getMap(); 2622 } 2623 /** 2624 * 2625 * 2626 * <pre> 2627 * Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty. 2628 * </pre> 2629 * 2630 * <code>map<string, string> labels = 500195327;</code> 2631 */ 2632 @java.lang.Override getLabelsOrDefault( java.lang.String key, java.lang.String defaultValue)2633 public /* nullable */ java.lang.String getLabelsOrDefault( 2634 java.lang.String key, 2635 /* nullable */ 2636 java.lang.String defaultValue) { 2637 if (key == null) { 2638 throw new NullPointerException("map key"); 2639 } 2640 java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap(); 2641 return map.containsKey(key) ? map.get(key) : defaultValue; 2642 } 2643 /** 2644 * 2645 * 2646 * <pre> 2647 * Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty. 2648 * </pre> 2649 * 2650 * <code>map<string, string> labels = 500195327;</code> 2651 */ 2652 @java.lang.Override getLabelsOrThrow(java.lang.String key)2653 public java.lang.String getLabelsOrThrow(java.lang.String key) { 2654 if (key == null) { 2655 throw new NullPointerException("map key"); 2656 } 2657 java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap(); 2658 if (!map.containsKey(key)) { 2659 throw new java.lang.IllegalArgumentException(); 2660 } 2661 return map.get(key); 2662 } 2663 clearLabels()2664 public Builder clearLabels() { 2665 bitField0_ = (bitField0_ & ~0x00000040); 2666 internalGetMutableLabels().getMutableMap().clear(); 2667 return this; 2668 } 2669 /** 2670 * 2671 * 2672 * <pre> 2673 * Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty. 2674 * </pre> 2675 * 2676 * <code>map<string, string> labels = 500195327;</code> 2677 */ removeLabels(java.lang.String key)2678 public Builder removeLabels(java.lang.String key) { 2679 if (key == null) { 2680 throw new NullPointerException("map key"); 2681 } 2682 internalGetMutableLabels().getMutableMap().remove(key); 2683 return this; 2684 } 2685 /** Use alternate mutation accessors instead. */ 2686 @java.lang.Deprecated getMutableLabels()2687 public java.util.Map<java.lang.String, java.lang.String> getMutableLabels() { 2688 bitField0_ |= 0x00000040; 2689 return internalGetMutableLabels().getMutableMap(); 2690 } 2691 /** 2692 * 2693 * 2694 * <pre> 2695 * Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty. 2696 * </pre> 2697 * 2698 * <code>map<string, string> labels = 500195327;</code> 2699 */ putLabels(java.lang.String key, java.lang.String value)2700 public Builder putLabels(java.lang.String key, java.lang.String value) { 2701 if (key == null) { 2702 throw new NullPointerException("map key"); 2703 } 2704 if (value == null) { 2705 throw new NullPointerException("map value"); 2706 } 2707 internalGetMutableLabels().getMutableMap().put(key, value); 2708 bitField0_ |= 0x00000040; 2709 return this; 2710 } 2711 /** 2712 * 2713 * 2714 * <pre> 2715 * Labels for this resource. These can only be added or modified by the setLabels method. Each label key/value pair must comply with RFC1035. Label values may be empty. 2716 * </pre> 2717 * 2718 * <code>map<string, string> labels = 500195327;</code> 2719 */ putAllLabels(java.util.Map<java.lang.String, java.lang.String> values)2720 public Builder putAllLabels(java.util.Map<java.lang.String, java.lang.String> values) { 2721 internalGetMutableLabels().getMutableMap().putAll(values); 2722 bitField0_ |= 0x00000040; 2723 return this; 2724 } 2725 2726 private java.lang.Object name_ = ""; 2727 /** 2728 * 2729 * 2730 * <pre> 2731 * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 2732 * </pre> 2733 * 2734 * <code>optional string name = 3373707;</code> 2735 * 2736 * @return Whether the name field is set. 2737 */ hasName()2738 public boolean hasName() { 2739 return ((bitField0_ & 0x00000080) != 0); 2740 } 2741 /** 2742 * 2743 * 2744 * <pre> 2745 * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 2746 * </pre> 2747 * 2748 * <code>optional string name = 3373707;</code> 2749 * 2750 * @return The name. 2751 */ getName()2752 public java.lang.String getName() { 2753 java.lang.Object ref = name_; 2754 if (!(ref instanceof java.lang.String)) { 2755 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2756 java.lang.String s = bs.toStringUtf8(); 2757 name_ = s; 2758 return s; 2759 } else { 2760 return (java.lang.String) ref; 2761 } 2762 } 2763 /** 2764 * 2765 * 2766 * <pre> 2767 * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 2768 * </pre> 2769 * 2770 * <code>optional string name = 3373707;</code> 2771 * 2772 * @return The bytes for name. 2773 */ getNameBytes()2774 public com.google.protobuf.ByteString getNameBytes() { 2775 java.lang.Object ref = name_; 2776 if (ref instanceof String) { 2777 com.google.protobuf.ByteString b = 2778 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2779 name_ = b; 2780 return b; 2781 } else { 2782 return (com.google.protobuf.ByteString) ref; 2783 } 2784 } 2785 /** 2786 * 2787 * 2788 * <pre> 2789 * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 2790 * </pre> 2791 * 2792 * <code>optional string name = 3373707;</code> 2793 * 2794 * @param value The name to set. 2795 * @return This builder for chaining. 2796 */ setName(java.lang.String value)2797 public Builder setName(java.lang.String value) { 2798 if (value == null) { 2799 throw new NullPointerException(); 2800 } 2801 name_ = value; 2802 bitField0_ |= 0x00000080; 2803 onChanged(); 2804 return this; 2805 } 2806 /** 2807 * 2808 * 2809 * <pre> 2810 * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 2811 * </pre> 2812 * 2813 * <code>optional string name = 3373707;</code> 2814 * 2815 * @return This builder for chaining. 2816 */ clearName()2817 public Builder clearName() { 2818 name_ = getDefaultInstance().getName(); 2819 bitField0_ = (bitField0_ & ~0x00000080); 2820 onChanged(); 2821 return this; 2822 } 2823 /** 2824 * 2825 * 2826 * <pre> 2827 * Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash. 2828 * </pre> 2829 * 2830 * <code>optional string name = 3373707;</code> 2831 * 2832 * @param value The bytes for name to set. 2833 * @return This builder for chaining. 2834 */ setNameBytes(com.google.protobuf.ByteString value)2835 public Builder setNameBytes(com.google.protobuf.ByteString value) { 2836 if (value == null) { 2837 throw new NullPointerException(); 2838 } 2839 checkByteStringIsUtf8(value); 2840 name_ = value; 2841 bitField0_ |= 0x00000080; 2842 onChanged(); 2843 return this; 2844 } 2845 2846 private java.lang.Object redundancyType_ = ""; 2847 /** 2848 * 2849 * 2850 * <pre> 2851 * Indicates the user-supplied redundancy type of this external VPN gateway. 2852 * Check the RedundancyType enum for the list of possible values. 2853 * </pre> 2854 * 2855 * <code>optional string redundancy_type = 271443740;</code> 2856 * 2857 * @return Whether the redundancyType field is set. 2858 */ hasRedundancyType()2859 public boolean hasRedundancyType() { 2860 return ((bitField0_ & 0x00000100) != 0); 2861 } 2862 /** 2863 * 2864 * 2865 * <pre> 2866 * Indicates the user-supplied redundancy type of this external VPN gateway. 2867 * Check the RedundancyType enum for the list of possible values. 2868 * </pre> 2869 * 2870 * <code>optional string redundancy_type = 271443740;</code> 2871 * 2872 * @return The redundancyType. 2873 */ getRedundancyType()2874 public java.lang.String getRedundancyType() { 2875 java.lang.Object ref = redundancyType_; 2876 if (!(ref instanceof java.lang.String)) { 2877 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2878 java.lang.String s = bs.toStringUtf8(); 2879 redundancyType_ = s; 2880 return s; 2881 } else { 2882 return (java.lang.String) ref; 2883 } 2884 } 2885 /** 2886 * 2887 * 2888 * <pre> 2889 * Indicates the user-supplied redundancy type of this external VPN gateway. 2890 * Check the RedundancyType enum for the list of possible values. 2891 * </pre> 2892 * 2893 * <code>optional string redundancy_type = 271443740;</code> 2894 * 2895 * @return The bytes for redundancyType. 2896 */ getRedundancyTypeBytes()2897 public com.google.protobuf.ByteString getRedundancyTypeBytes() { 2898 java.lang.Object ref = redundancyType_; 2899 if (ref instanceof String) { 2900 com.google.protobuf.ByteString b = 2901 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2902 redundancyType_ = b; 2903 return b; 2904 } else { 2905 return (com.google.protobuf.ByteString) ref; 2906 } 2907 } 2908 /** 2909 * 2910 * 2911 * <pre> 2912 * Indicates the user-supplied redundancy type of this external VPN gateway. 2913 * Check the RedundancyType enum for the list of possible values. 2914 * </pre> 2915 * 2916 * <code>optional string redundancy_type = 271443740;</code> 2917 * 2918 * @param value The redundancyType to set. 2919 * @return This builder for chaining. 2920 */ setRedundancyType(java.lang.String value)2921 public Builder setRedundancyType(java.lang.String value) { 2922 if (value == null) { 2923 throw new NullPointerException(); 2924 } 2925 redundancyType_ = value; 2926 bitField0_ |= 0x00000100; 2927 onChanged(); 2928 return this; 2929 } 2930 /** 2931 * 2932 * 2933 * <pre> 2934 * Indicates the user-supplied redundancy type of this external VPN gateway. 2935 * Check the RedundancyType enum for the list of possible values. 2936 * </pre> 2937 * 2938 * <code>optional string redundancy_type = 271443740;</code> 2939 * 2940 * @return This builder for chaining. 2941 */ clearRedundancyType()2942 public Builder clearRedundancyType() { 2943 redundancyType_ = getDefaultInstance().getRedundancyType(); 2944 bitField0_ = (bitField0_ & ~0x00000100); 2945 onChanged(); 2946 return this; 2947 } 2948 /** 2949 * 2950 * 2951 * <pre> 2952 * Indicates the user-supplied redundancy type of this external VPN gateway. 2953 * Check the RedundancyType enum for the list of possible values. 2954 * </pre> 2955 * 2956 * <code>optional string redundancy_type = 271443740;</code> 2957 * 2958 * @param value The bytes for redundancyType to set. 2959 * @return This builder for chaining. 2960 */ setRedundancyTypeBytes(com.google.protobuf.ByteString value)2961 public Builder setRedundancyTypeBytes(com.google.protobuf.ByteString value) { 2962 if (value == null) { 2963 throw new NullPointerException(); 2964 } 2965 checkByteStringIsUtf8(value); 2966 redundancyType_ = value; 2967 bitField0_ |= 0x00000100; 2968 onChanged(); 2969 return this; 2970 } 2971 2972 private java.lang.Object selfLink_ = ""; 2973 /** 2974 * 2975 * 2976 * <pre> 2977 * [Output Only] Server-defined URL for the resource. 2978 * </pre> 2979 * 2980 * <code>optional string self_link = 456214797;</code> 2981 * 2982 * @return Whether the selfLink field is set. 2983 */ hasSelfLink()2984 public boolean hasSelfLink() { 2985 return ((bitField0_ & 0x00000200) != 0); 2986 } 2987 /** 2988 * 2989 * 2990 * <pre> 2991 * [Output Only] Server-defined URL for the resource. 2992 * </pre> 2993 * 2994 * <code>optional string self_link = 456214797;</code> 2995 * 2996 * @return The selfLink. 2997 */ getSelfLink()2998 public java.lang.String getSelfLink() { 2999 java.lang.Object ref = selfLink_; 3000 if (!(ref instanceof java.lang.String)) { 3001 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 3002 java.lang.String s = bs.toStringUtf8(); 3003 selfLink_ = s; 3004 return s; 3005 } else { 3006 return (java.lang.String) ref; 3007 } 3008 } 3009 /** 3010 * 3011 * 3012 * <pre> 3013 * [Output Only] Server-defined URL for the resource. 3014 * </pre> 3015 * 3016 * <code>optional string self_link = 456214797;</code> 3017 * 3018 * @return The bytes for selfLink. 3019 */ getSelfLinkBytes()3020 public com.google.protobuf.ByteString getSelfLinkBytes() { 3021 java.lang.Object ref = selfLink_; 3022 if (ref instanceof String) { 3023 com.google.protobuf.ByteString b = 3024 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 3025 selfLink_ = b; 3026 return b; 3027 } else { 3028 return (com.google.protobuf.ByteString) ref; 3029 } 3030 } 3031 /** 3032 * 3033 * 3034 * <pre> 3035 * [Output Only] Server-defined URL for the resource. 3036 * </pre> 3037 * 3038 * <code>optional string self_link = 456214797;</code> 3039 * 3040 * @param value The selfLink to set. 3041 * @return This builder for chaining. 3042 */ setSelfLink(java.lang.String value)3043 public Builder setSelfLink(java.lang.String value) { 3044 if (value == null) { 3045 throw new NullPointerException(); 3046 } 3047 selfLink_ = value; 3048 bitField0_ |= 0x00000200; 3049 onChanged(); 3050 return this; 3051 } 3052 /** 3053 * 3054 * 3055 * <pre> 3056 * [Output Only] Server-defined URL for the resource. 3057 * </pre> 3058 * 3059 * <code>optional string self_link = 456214797;</code> 3060 * 3061 * @return This builder for chaining. 3062 */ clearSelfLink()3063 public Builder clearSelfLink() { 3064 selfLink_ = getDefaultInstance().getSelfLink(); 3065 bitField0_ = (bitField0_ & ~0x00000200); 3066 onChanged(); 3067 return this; 3068 } 3069 /** 3070 * 3071 * 3072 * <pre> 3073 * [Output Only] Server-defined URL for the resource. 3074 * </pre> 3075 * 3076 * <code>optional string self_link = 456214797;</code> 3077 * 3078 * @param value The bytes for selfLink to set. 3079 * @return This builder for chaining. 3080 */ setSelfLinkBytes(com.google.protobuf.ByteString value)3081 public Builder setSelfLinkBytes(com.google.protobuf.ByteString value) { 3082 if (value == null) { 3083 throw new NullPointerException(); 3084 } 3085 checkByteStringIsUtf8(value); 3086 selfLink_ = value; 3087 bitField0_ |= 0x00000200; 3088 onChanged(); 3089 return this; 3090 } 3091 3092 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)3093 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 3094 return super.setUnknownFields(unknownFields); 3095 } 3096 3097 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)3098 public final Builder mergeUnknownFields( 3099 final com.google.protobuf.UnknownFieldSet unknownFields) { 3100 return super.mergeUnknownFields(unknownFields); 3101 } 3102 3103 // @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.ExternalVpnGateway) 3104 } 3105 3106 // @@protoc_insertion_point(class_scope:google.cloud.compute.v1.ExternalVpnGateway) 3107 private static final com.google.cloud.compute.v1.ExternalVpnGateway DEFAULT_INSTANCE; 3108 3109 static { 3110 DEFAULT_INSTANCE = new com.google.cloud.compute.v1.ExternalVpnGateway(); 3111 } 3112 getDefaultInstance()3113 public static com.google.cloud.compute.v1.ExternalVpnGateway getDefaultInstance() { 3114 return DEFAULT_INSTANCE; 3115 } 3116 3117 private static final com.google.protobuf.Parser<ExternalVpnGateway> PARSER = 3118 new com.google.protobuf.AbstractParser<ExternalVpnGateway>() { 3119 @java.lang.Override 3120 public ExternalVpnGateway parsePartialFrom( 3121 com.google.protobuf.CodedInputStream input, 3122 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3123 throws com.google.protobuf.InvalidProtocolBufferException { 3124 Builder builder = newBuilder(); 3125 try { 3126 builder.mergeFrom(input, extensionRegistry); 3127 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 3128 throw e.setUnfinishedMessage(builder.buildPartial()); 3129 } catch (com.google.protobuf.UninitializedMessageException e) { 3130 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 3131 } catch (java.io.IOException e) { 3132 throw new com.google.protobuf.InvalidProtocolBufferException(e) 3133 .setUnfinishedMessage(builder.buildPartial()); 3134 } 3135 return builder.buildPartial(); 3136 } 3137 }; 3138 parser()3139 public static com.google.protobuf.Parser<ExternalVpnGateway> parser() { 3140 return PARSER; 3141 } 3142 3143 @java.lang.Override getParserForType()3144 public com.google.protobuf.Parser<ExternalVpnGateway> getParserForType() { 3145 return PARSER; 3146 } 3147 3148 @java.lang.Override getDefaultInstanceForType()3149 public com.google.cloud.compute.v1.ExternalVpnGateway getDefaultInstanceForType() { 3150 return DEFAULT_INSTANCE; 3151 } 3152 } 3153