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