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