1 // Generated by the protocol buffer compiler. DO NOT EDIT! 2 // source: grpc/lb/v1/load_balancer.proto 3 4 package io.grpc.lb.v1; 5 6 /** 7 * Protobuf type {@code grpc.lb.v1.LoadBalanceResponse} 8 */ 9 public final class LoadBalanceResponse extends 10 com.google.protobuf.GeneratedMessageV3 implements 11 // @@protoc_insertion_point(message_implements:grpc.lb.v1.LoadBalanceResponse) 12 LoadBalanceResponseOrBuilder { 13 private static final long serialVersionUID = 0L; 14 // Use LoadBalanceResponse.newBuilder() to construct. LoadBalanceResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)15 private LoadBalanceResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 16 super(builder); 17 } LoadBalanceResponse()18 private LoadBalanceResponse() { 19 } 20 21 @java.lang.Override 22 public final com.google.protobuf.UnknownFieldSet getUnknownFields()23 getUnknownFields() { 24 return this.unknownFields; 25 } LoadBalanceResponse( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)26 private LoadBalanceResponse( 27 com.google.protobuf.CodedInputStream input, 28 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 29 throws com.google.protobuf.InvalidProtocolBufferException { 30 this(); 31 if (extensionRegistry == null) { 32 throw new java.lang.NullPointerException(); 33 } 34 int mutable_bitField0_ = 0; 35 com.google.protobuf.UnknownFieldSet.Builder unknownFields = 36 com.google.protobuf.UnknownFieldSet.newBuilder(); 37 try { 38 boolean done = false; 39 while (!done) { 40 int tag = input.readTag(); 41 switch (tag) { 42 case 0: 43 done = true; 44 break; 45 default: { 46 if (!parseUnknownFieldProto3( 47 input, unknownFields, extensionRegistry, tag)) { 48 done = true; 49 } 50 break; 51 } 52 case 10: { 53 io.grpc.lb.v1.InitialLoadBalanceResponse.Builder subBuilder = null; 54 if (loadBalanceResponseTypeCase_ == 1) { 55 subBuilder = ((io.grpc.lb.v1.InitialLoadBalanceResponse) loadBalanceResponseType_).toBuilder(); 56 } 57 loadBalanceResponseType_ = 58 input.readMessage(io.grpc.lb.v1.InitialLoadBalanceResponse.parser(), extensionRegistry); 59 if (subBuilder != null) { 60 subBuilder.mergeFrom((io.grpc.lb.v1.InitialLoadBalanceResponse) loadBalanceResponseType_); 61 loadBalanceResponseType_ = subBuilder.buildPartial(); 62 } 63 loadBalanceResponseTypeCase_ = 1; 64 break; 65 } 66 case 18: { 67 io.grpc.lb.v1.ServerList.Builder subBuilder = null; 68 if (loadBalanceResponseTypeCase_ == 2) { 69 subBuilder = ((io.grpc.lb.v1.ServerList) loadBalanceResponseType_).toBuilder(); 70 } 71 loadBalanceResponseType_ = 72 input.readMessage(io.grpc.lb.v1.ServerList.parser(), extensionRegistry); 73 if (subBuilder != null) { 74 subBuilder.mergeFrom((io.grpc.lb.v1.ServerList) loadBalanceResponseType_); 75 loadBalanceResponseType_ = subBuilder.buildPartial(); 76 } 77 loadBalanceResponseTypeCase_ = 2; 78 break; 79 } 80 } 81 } 82 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 83 throw e.setUnfinishedMessage(this); 84 } catch (java.io.IOException e) { 85 throw new com.google.protobuf.InvalidProtocolBufferException( 86 e).setUnfinishedMessage(this); 87 } finally { 88 this.unknownFields = unknownFields.build(); 89 makeExtensionsImmutable(); 90 } 91 } 92 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()93 getDescriptor() { 94 return io.grpc.lb.v1.LoadBalancerProto.internal_static_grpc_lb_v1_LoadBalanceResponse_descriptor; 95 } 96 97 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()98 internalGetFieldAccessorTable() { 99 return io.grpc.lb.v1.LoadBalancerProto.internal_static_grpc_lb_v1_LoadBalanceResponse_fieldAccessorTable 100 .ensureFieldAccessorsInitialized( 101 io.grpc.lb.v1.LoadBalanceResponse.class, io.grpc.lb.v1.LoadBalanceResponse.Builder.class); 102 } 103 104 private int loadBalanceResponseTypeCase_ = 0; 105 private java.lang.Object loadBalanceResponseType_; 106 public enum LoadBalanceResponseTypeCase 107 implements com.google.protobuf.Internal.EnumLite { 108 INITIAL_RESPONSE(1), 109 SERVER_LIST(2), 110 LOADBALANCERESPONSETYPE_NOT_SET(0); 111 private final int value; LoadBalanceResponseTypeCase(int value)112 private LoadBalanceResponseTypeCase(int value) { 113 this.value = value; 114 } 115 /** 116 * @deprecated Use {@link #forNumber(int)} instead. 117 */ 118 @java.lang.Deprecated valueOf(int value)119 public static LoadBalanceResponseTypeCase valueOf(int value) { 120 return forNumber(value); 121 } 122 forNumber(int value)123 public static LoadBalanceResponseTypeCase forNumber(int value) { 124 switch (value) { 125 case 1: return INITIAL_RESPONSE; 126 case 2: return SERVER_LIST; 127 case 0: return LOADBALANCERESPONSETYPE_NOT_SET; 128 default: return null; 129 } 130 } getNumber()131 public int getNumber() { 132 return this.value; 133 } 134 }; 135 136 public LoadBalanceResponseTypeCase getLoadBalanceResponseTypeCase()137 getLoadBalanceResponseTypeCase() { 138 return LoadBalanceResponseTypeCase.forNumber( 139 loadBalanceResponseTypeCase_); 140 } 141 142 public static final int INITIAL_RESPONSE_FIELD_NUMBER = 1; 143 /** 144 * <pre> 145 * This message should be sent on the first response to the client. 146 * </pre> 147 * 148 * <code>.grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code> 149 */ hasInitialResponse()150 public boolean hasInitialResponse() { 151 return loadBalanceResponseTypeCase_ == 1; 152 } 153 /** 154 * <pre> 155 * This message should be sent on the first response to the client. 156 * </pre> 157 * 158 * <code>.grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code> 159 */ getInitialResponse()160 public io.grpc.lb.v1.InitialLoadBalanceResponse getInitialResponse() { 161 if (loadBalanceResponseTypeCase_ == 1) { 162 return (io.grpc.lb.v1.InitialLoadBalanceResponse) loadBalanceResponseType_; 163 } 164 return io.grpc.lb.v1.InitialLoadBalanceResponse.getDefaultInstance(); 165 } 166 /** 167 * <pre> 168 * This message should be sent on the first response to the client. 169 * </pre> 170 * 171 * <code>.grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code> 172 */ getInitialResponseOrBuilder()173 public io.grpc.lb.v1.InitialLoadBalanceResponseOrBuilder getInitialResponseOrBuilder() { 174 if (loadBalanceResponseTypeCase_ == 1) { 175 return (io.grpc.lb.v1.InitialLoadBalanceResponse) loadBalanceResponseType_; 176 } 177 return io.grpc.lb.v1.InitialLoadBalanceResponse.getDefaultInstance(); 178 } 179 180 public static final int SERVER_LIST_FIELD_NUMBER = 2; 181 /** 182 * <pre> 183 * Contains the list of servers selected by the load balancer. The client 184 * should send requests to these servers in the specified order. 185 * </pre> 186 * 187 * <code>.grpc.lb.v1.ServerList server_list = 2;</code> 188 */ hasServerList()189 public boolean hasServerList() { 190 return loadBalanceResponseTypeCase_ == 2; 191 } 192 /** 193 * <pre> 194 * Contains the list of servers selected by the load balancer. The client 195 * should send requests to these servers in the specified order. 196 * </pre> 197 * 198 * <code>.grpc.lb.v1.ServerList server_list = 2;</code> 199 */ getServerList()200 public io.grpc.lb.v1.ServerList getServerList() { 201 if (loadBalanceResponseTypeCase_ == 2) { 202 return (io.grpc.lb.v1.ServerList) loadBalanceResponseType_; 203 } 204 return io.grpc.lb.v1.ServerList.getDefaultInstance(); 205 } 206 /** 207 * <pre> 208 * Contains the list of servers selected by the load balancer. The client 209 * should send requests to these servers in the specified order. 210 * </pre> 211 * 212 * <code>.grpc.lb.v1.ServerList server_list = 2;</code> 213 */ getServerListOrBuilder()214 public io.grpc.lb.v1.ServerListOrBuilder getServerListOrBuilder() { 215 if (loadBalanceResponseTypeCase_ == 2) { 216 return (io.grpc.lb.v1.ServerList) loadBalanceResponseType_; 217 } 218 return io.grpc.lb.v1.ServerList.getDefaultInstance(); 219 } 220 221 private byte memoizedIsInitialized = -1; isInitialized()222 public final boolean isInitialized() { 223 byte isInitialized = memoizedIsInitialized; 224 if (isInitialized == 1) return true; 225 if (isInitialized == 0) return false; 226 227 memoizedIsInitialized = 1; 228 return true; 229 } 230 writeTo(com.google.protobuf.CodedOutputStream output)231 public void writeTo(com.google.protobuf.CodedOutputStream output) 232 throws java.io.IOException { 233 if (loadBalanceResponseTypeCase_ == 1) { 234 output.writeMessage(1, (io.grpc.lb.v1.InitialLoadBalanceResponse) loadBalanceResponseType_); 235 } 236 if (loadBalanceResponseTypeCase_ == 2) { 237 output.writeMessage(2, (io.grpc.lb.v1.ServerList) loadBalanceResponseType_); 238 } 239 unknownFields.writeTo(output); 240 } 241 getSerializedSize()242 public int getSerializedSize() { 243 int size = memoizedSize; 244 if (size != -1) return size; 245 246 size = 0; 247 if (loadBalanceResponseTypeCase_ == 1) { 248 size += com.google.protobuf.CodedOutputStream 249 .computeMessageSize(1, (io.grpc.lb.v1.InitialLoadBalanceResponse) loadBalanceResponseType_); 250 } 251 if (loadBalanceResponseTypeCase_ == 2) { 252 size += com.google.protobuf.CodedOutputStream 253 .computeMessageSize(2, (io.grpc.lb.v1.ServerList) loadBalanceResponseType_); 254 } 255 size += unknownFields.getSerializedSize(); 256 memoizedSize = size; 257 return size; 258 } 259 260 @java.lang.Override equals(final java.lang.Object obj)261 public boolean equals(final java.lang.Object obj) { 262 if (obj == this) { 263 return true; 264 } 265 if (!(obj instanceof io.grpc.lb.v1.LoadBalanceResponse)) { 266 return super.equals(obj); 267 } 268 io.grpc.lb.v1.LoadBalanceResponse other = (io.grpc.lb.v1.LoadBalanceResponse) obj; 269 270 boolean result = true; 271 result = result && getLoadBalanceResponseTypeCase().equals( 272 other.getLoadBalanceResponseTypeCase()); 273 if (!result) return false; 274 switch (loadBalanceResponseTypeCase_) { 275 case 1: 276 result = result && getInitialResponse() 277 .equals(other.getInitialResponse()); 278 break; 279 case 2: 280 result = result && getServerList() 281 .equals(other.getServerList()); 282 break; 283 case 0: 284 default: 285 } 286 result = result && unknownFields.equals(other.unknownFields); 287 return result; 288 } 289 290 @java.lang.Override hashCode()291 public int hashCode() { 292 if (memoizedHashCode != 0) { 293 return memoizedHashCode; 294 } 295 int hash = 41; 296 hash = (19 * hash) + getDescriptor().hashCode(); 297 switch (loadBalanceResponseTypeCase_) { 298 case 1: 299 hash = (37 * hash) + INITIAL_RESPONSE_FIELD_NUMBER; 300 hash = (53 * hash) + getInitialResponse().hashCode(); 301 break; 302 case 2: 303 hash = (37 * hash) + SERVER_LIST_FIELD_NUMBER; 304 hash = (53 * hash) + getServerList().hashCode(); 305 break; 306 case 0: 307 default: 308 } 309 hash = (29 * hash) + unknownFields.hashCode(); 310 memoizedHashCode = hash; 311 return hash; 312 } 313 parseFrom( java.nio.ByteBuffer data)314 public static io.grpc.lb.v1.LoadBalanceResponse parseFrom( 315 java.nio.ByteBuffer data) 316 throws com.google.protobuf.InvalidProtocolBufferException { 317 return PARSER.parseFrom(data); 318 } parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)319 public static io.grpc.lb.v1.LoadBalanceResponse parseFrom( 320 java.nio.ByteBuffer data, 321 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 322 throws com.google.protobuf.InvalidProtocolBufferException { 323 return PARSER.parseFrom(data, extensionRegistry); 324 } parseFrom( com.google.protobuf.ByteString data)325 public static io.grpc.lb.v1.LoadBalanceResponse parseFrom( 326 com.google.protobuf.ByteString data) 327 throws com.google.protobuf.InvalidProtocolBufferException { 328 return PARSER.parseFrom(data); 329 } parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)330 public static io.grpc.lb.v1.LoadBalanceResponse parseFrom( 331 com.google.protobuf.ByteString data, 332 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 333 throws com.google.protobuf.InvalidProtocolBufferException { 334 return PARSER.parseFrom(data, extensionRegistry); 335 } parseFrom(byte[] data)336 public static io.grpc.lb.v1.LoadBalanceResponse parseFrom(byte[] data) 337 throws com.google.protobuf.InvalidProtocolBufferException { 338 return PARSER.parseFrom(data); 339 } parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)340 public static io.grpc.lb.v1.LoadBalanceResponse parseFrom( 341 byte[] data, 342 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 343 throws com.google.protobuf.InvalidProtocolBufferException { 344 return PARSER.parseFrom(data, extensionRegistry); 345 } parseFrom(java.io.InputStream input)346 public static io.grpc.lb.v1.LoadBalanceResponse parseFrom(java.io.InputStream input) 347 throws java.io.IOException { 348 return com.google.protobuf.GeneratedMessageV3 349 .parseWithIOException(PARSER, input); 350 } parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)351 public static io.grpc.lb.v1.LoadBalanceResponse parseFrom( 352 java.io.InputStream input, 353 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 354 throws java.io.IOException { 355 return com.google.protobuf.GeneratedMessageV3 356 .parseWithIOException(PARSER, input, extensionRegistry); 357 } parseDelimitedFrom(java.io.InputStream input)358 public static io.grpc.lb.v1.LoadBalanceResponse parseDelimitedFrom(java.io.InputStream input) 359 throws java.io.IOException { 360 return com.google.protobuf.GeneratedMessageV3 361 .parseDelimitedWithIOException(PARSER, input); 362 } parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)363 public static io.grpc.lb.v1.LoadBalanceResponse parseDelimitedFrom( 364 java.io.InputStream input, 365 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 366 throws java.io.IOException { 367 return com.google.protobuf.GeneratedMessageV3 368 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); 369 } parseFrom( com.google.protobuf.CodedInputStream input)370 public static io.grpc.lb.v1.LoadBalanceResponse parseFrom( 371 com.google.protobuf.CodedInputStream input) 372 throws java.io.IOException { 373 return com.google.protobuf.GeneratedMessageV3 374 .parseWithIOException(PARSER, input); 375 } parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)376 public static io.grpc.lb.v1.LoadBalanceResponse parseFrom( 377 com.google.protobuf.CodedInputStream input, 378 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 379 throws java.io.IOException { 380 return com.google.protobuf.GeneratedMessageV3 381 .parseWithIOException(PARSER, input, extensionRegistry); 382 } 383 newBuilderForType()384 public Builder newBuilderForType() { return newBuilder(); } newBuilder()385 public static Builder newBuilder() { 386 return DEFAULT_INSTANCE.toBuilder(); 387 } newBuilder(io.grpc.lb.v1.LoadBalanceResponse prototype)388 public static Builder newBuilder(io.grpc.lb.v1.LoadBalanceResponse prototype) { 389 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 390 } toBuilder()391 public Builder toBuilder() { 392 return this == DEFAULT_INSTANCE 393 ? new Builder() : new Builder().mergeFrom(this); 394 } 395 396 @java.lang.Override newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)397 protected Builder newBuilderForType( 398 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 399 Builder builder = new Builder(parent); 400 return builder; 401 } 402 /** 403 * Protobuf type {@code grpc.lb.v1.LoadBalanceResponse} 404 */ 405 public static final class Builder extends 406 com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements 407 // @@protoc_insertion_point(builder_implements:grpc.lb.v1.LoadBalanceResponse) 408 io.grpc.lb.v1.LoadBalanceResponseOrBuilder { 409 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()410 getDescriptor() { 411 return io.grpc.lb.v1.LoadBalancerProto.internal_static_grpc_lb_v1_LoadBalanceResponse_descriptor; 412 } 413 414 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()415 internalGetFieldAccessorTable() { 416 return io.grpc.lb.v1.LoadBalancerProto.internal_static_grpc_lb_v1_LoadBalanceResponse_fieldAccessorTable 417 .ensureFieldAccessorsInitialized( 418 io.grpc.lb.v1.LoadBalanceResponse.class, io.grpc.lb.v1.LoadBalanceResponse.Builder.class); 419 } 420 421 // Construct using io.grpc.lb.v1.LoadBalanceResponse.newBuilder() Builder()422 private Builder() { 423 maybeForceBuilderInitialization(); 424 } 425 Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)426 private Builder( 427 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 428 super(parent); 429 maybeForceBuilderInitialization(); 430 } maybeForceBuilderInitialization()431 private void maybeForceBuilderInitialization() { 432 if (com.google.protobuf.GeneratedMessageV3 433 .alwaysUseFieldBuilders) { 434 } 435 } clear()436 public Builder clear() { 437 super.clear(); 438 loadBalanceResponseTypeCase_ = 0; 439 loadBalanceResponseType_ = null; 440 return this; 441 } 442 443 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()444 getDescriptorForType() { 445 return io.grpc.lb.v1.LoadBalancerProto.internal_static_grpc_lb_v1_LoadBalanceResponse_descriptor; 446 } 447 getDefaultInstanceForType()448 public io.grpc.lb.v1.LoadBalanceResponse getDefaultInstanceForType() { 449 return io.grpc.lb.v1.LoadBalanceResponse.getDefaultInstance(); 450 } 451 build()452 public io.grpc.lb.v1.LoadBalanceResponse build() { 453 io.grpc.lb.v1.LoadBalanceResponse result = buildPartial(); 454 if (!result.isInitialized()) { 455 throw newUninitializedMessageException(result); 456 } 457 return result; 458 } 459 buildPartial()460 public io.grpc.lb.v1.LoadBalanceResponse buildPartial() { 461 io.grpc.lb.v1.LoadBalanceResponse result = new io.grpc.lb.v1.LoadBalanceResponse(this); 462 if (loadBalanceResponseTypeCase_ == 1) { 463 if (initialResponseBuilder_ == null) { 464 result.loadBalanceResponseType_ = loadBalanceResponseType_; 465 } else { 466 result.loadBalanceResponseType_ = initialResponseBuilder_.build(); 467 } 468 } 469 if (loadBalanceResponseTypeCase_ == 2) { 470 if (serverListBuilder_ == null) { 471 result.loadBalanceResponseType_ = loadBalanceResponseType_; 472 } else { 473 result.loadBalanceResponseType_ = serverListBuilder_.build(); 474 } 475 } 476 result.loadBalanceResponseTypeCase_ = loadBalanceResponseTypeCase_; 477 onBuilt(); 478 return result; 479 } 480 clone()481 public Builder clone() { 482 return (Builder) super.clone(); 483 } setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)484 public Builder setField( 485 com.google.protobuf.Descriptors.FieldDescriptor field, 486 java.lang.Object value) { 487 return (Builder) super.setField(field, value); 488 } clearField( com.google.protobuf.Descriptors.FieldDescriptor field)489 public Builder clearField( 490 com.google.protobuf.Descriptors.FieldDescriptor field) { 491 return (Builder) super.clearField(field); 492 } clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof)493 public Builder clearOneof( 494 com.google.protobuf.Descriptors.OneofDescriptor oneof) { 495 return (Builder) super.clearOneof(oneof); 496 } setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)497 public Builder setRepeatedField( 498 com.google.protobuf.Descriptors.FieldDescriptor field, 499 int index, java.lang.Object value) { 500 return (Builder) super.setRepeatedField(field, index, value); 501 } addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)502 public Builder addRepeatedField( 503 com.google.protobuf.Descriptors.FieldDescriptor field, 504 java.lang.Object value) { 505 return (Builder) super.addRepeatedField(field, value); 506 } mergeFrom(com.google.protobuf.Message other)507 public Builder mergeFrom(com.google.protobuf.Message other) { 508 if (other instanceof io.grpc.lb.v1.LoadBalanceResponse) { 509 return mergeFrom((io.grpc.lb.v1.LoadBalanceResponse)other); 510 } else { 511 super.mergeFrom(other); 512 return this; 513 } 514 } 515 mergeFrom(io.grpc.lb.v1.LoadBalanceResponse other)516 public Builder mergeFrom(io.grpc.lb.v1.LoadBalanceResponse other) { 517 if (other == io.grpc.lb.v1.LoadBalanceResponse.getDefaultInstance()) return this; 518 switch (other.getLoadBalanceResponseTypeCase()) { 519 case INITIAL_RESPONSE: { 520 mergeInitialResponse(other.getInitialResponse()); 521 break; 522 } 523 case SERVER_LIST: { 524 mergeServerList(other.getServerList()); 525 break; 526 } 527 case LOADBALANCERESPONSETYPE_NOT_SET: { 528 break; 529 } 530 } 531 this.mergeUnknownFields(other.unknownFields); 532 onChanged(); 533 return this; 534 } 535 isInitialized()536 public final boolean isInitialized() { 537 return true; 538 } 539 mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)540 public Builder mergeFrom( 541 com.google.protobuf.CodedInputStream input, 542 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 543 throws java.io.IOException { 544 io.grpc.lb.v1.LoadBalanceResponse parsedMessage = null; 545 try { 546 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); 547 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 548 parsedMessage = (io.grpc.lb.v1.LoadBalanceResponse) e.getUnfinishedMessage(); 549 throw e.unwrapIOException(); 550 } finally { 551 if (parsedMessage != null) { 552 mergeFrom(parsedMessage); 553 } 554 } 555 return this; 556 } 557 private int loadBalanceResponseTypeCase_ = 0; 558 private java.lang.Object loadBalanceResponseType_; 559 public LoadBalanceResponseTypeCase getLoadBalanceResponseTypeCase()560 getLoadBalanceResponseTypeCase() { 561 return LoadBalanceResponseTypeCase.forNumber( 562 loadBalanceResponseTypeCase_); 563 } 564 clearLoadBalanceResponseType()565 public Builder clearLoadBalanceResponseType() { 566 loadBalanceResponseTypeCase_ = 0; 567 loadBalanceResponseType_ = null; 568 onChanged(); 569 return this; 570 } 571 572 573 private com.google.protobuf.SingleFieldBuilderV3< 574 io.grpc.lb.v1.InitialLoadBalanceResponse, io.grpc.lb.v1.InitialLoadBalanceResponse.Builder, io.grpc.lb.v1.InitialLoadBalanceResponseOrBuilder> initialResponseBuilder_; 575 /** 576 * <pre> 577 * This message should be sent on the first response to the client. 578 * </pre> 579 * 580 * <code>.grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code> 581 */ hasInitialResponse()582 public boolean hasInitialResponse() { 583 return loadBalanceResponseTypeCase_ == 1; 584 } 585 /** 586 * <pre> 587 * This message should be sent on the first response to the client. 588 * </pre> 589 * 590 * <code>.grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code> 591 */ getInitialResponse()592 public io.grpc.lb.v1.InitialLoadBalanceResponse getInitialResponse() { 593 if (initialResponseBuilder_ == null) { 594 if (loadBalanceResponseTypeCase_ == 1) { 595 return (io.grpc.lb.v1.InitialLoadBalanceResponse) loadBalanceResponseType_; 596 } 597 return io.grpc.lb.v1.InitialLoadBalanceResponse.getDefaultInstance(); 598 } else { 599 if (loadBalanceResponseTypeCase_ == 1) { 600 return initialResponseBuilder_.getMessage(); 601 } 602 return io.grpc.lb.v1.InitialLoadBalanceResponse.getDefaultInstance(); 603 } 604 } 605 /** 606 * <pre> 607 * This message should be sent on the first response to the client. 608 * </pre> 609 * 610 * <code>.grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code> 611 */ setInitialResponse(io.grpc.lb.v1.InitialLoadBalanceResponse value)612 public Builder setInitialResponse(io.grpc.lb.v1.InitialLoadBalanceResponse value) { 613 if (initialResponseBuilder_ == null) { 614 if (value == null) { 615 throw new NullPointerException(); 616 } 617 loadBalanceResponseType_ = value; 618 onChanged(); 619 } else { 620 initialResponseBuilder_.setMessage(value); 621 } 622 loadBalanceResponseTypeCase_ = 1; 623 return this; 624 } 625 /** 626 * <pre> 627 * This message should be sent on the first response to the client. 628 * </pre> 629 * 630 * <code>.grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code> 631 */ setInitialResponse( io.grpc.lb.v1.InitialLoadBalanceResponse.Builder builderForValue)632 public Builder setInitialResponse( 633 io.grpc.lb.v1.InitialLoadBalanceResponse.Builder builderForValue) { 634 if (initialResponseBuilder_ == null) { 635 loadBalanceResponseType_ = builderForValue.build(); 636 onChanged(); 637 } else { 638 initialResponseBuilder_.setMessage(builderForValue.build()); 639 } 640 loadBalanceResponseTypeCase_ = 1; 641 return this; 642 } 643 /** 644 * <pre> 645 * This message should be sent on the first response to the client. 646 * </pre> 647 * 648 * <code>.grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code> 649 */ mergeInitialResponse(io.grpc.lb.v1.InitialLoadBalanceResponse value)650 public Builder mergeInitialResponse(io.grpc.lb.v1.InitialLoadBalanceResponse value) { 651 if (initialResponseBuilder_ == null) { 652 if (loadBalanceResponseTypeCase_ == 1 && 653 loadBalanceResponseType_ != io.grpc.lb.v1.InitialLoadBalanceResponse.getDefaultInstance()) { 654 loadBalanceResponseType_ = io.grpc.lb.v1.InitialLoadBalanceResponse.newBuilder((io.grpc.lb.v1.InitialLoadBalanceResponse) loadBalanceResponseType_) 655 .mergeFrom(value).buildPartial(); 656 } else { 657 loadBalanceResponseType_ = value; 658 } 659 onChanged(); 660 } else { 661 if (loadBalanceResponseTypeCase_ == 1) { 662 initialResponseBuilder_.mergeFrom(value); 663 } 664 initialResponseBuilder_.setMessage(value); 665 } 666 loadBalanceResponseTypeCase_ = 1; 667 return this; 668 } 669 /** 670 * <pre> 671 * This message should be sent on the first response to the client. 672 * </pre> 673 * 674 * <code>.grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code> 675 */ clearInitialResponse()676 public Builder clearInitialResponse() { 677 if (initialResponseBuilder_ == null) { 678 if (loadBalanceResponseTypeCase_ == 1) { 679 loadBalanceResponseTypeCase_ = 0; 680 loadBalanceResponseType_ = null; 681 onChanged(); 682 } 683 } else { 684 if (loadBalanceResponseTypeCase_ == 1) { 685 loadBalanceResponseTypeCase_ = 0; 686 loadBalanceResponseType_ = null; 687 } 688 initialResponseBuilder_.clear(); 689 } 690 return this; 691 } 692 /** 693 * <pre> 694 * This message should be sent on the first response to the client. 695 * </pre> 696 * 697 * <code>.grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code> 698 */ getInitialResponseBuilder()699 public io.grpc.lb.v1.InitialLoadBalanceResponse.Builder getInitialResponseBuilder() { 700 return getInitialResponseFieldBuilder().getBuilder(); 701 } 702 /** 703 * <pre> 704 * This message should be sent on the first response to the client. 705 * </pre> 706 * 707 * <code>.grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code> 708 */ getInitialResponseOrBuilder()709 public io.grpc.lb.v1.InitialLoadBalanceResponseOrBuilder getInitialResponseOrBuilder() { 710 if ((loadBalanceResponseTypeCase_ == 1) && (initialResponseBuilder_ != null)) { 711 return initialResponseBuilder_.getMessageOrBuilder(); 712 } else { 713 if (loadBalanceResponseTypeCase_ == 1) { 714 return (io.grpc.lb.v1.InitialLoadBalanceResponse) loadBalanceResponseType_; 715 } 716 return io.grpc.lb.v1.InitialLoadBalanceResponse.getDefaultInstance(); 717 } 718 } 719 /** 720 * <pre> 721 * This message should be sent on the first response to the client. 722 * </pre> 723 * 724 * <code>.grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code> 725 */ 726 private com.google.protobuf.SingleFieldBuilderV3< 727 io.grpc.lb.v1.InitialLoadBalanceResponse, io.grpc.lb.v1.InitialLoadBalanceResponse.Builder, io.grpc.lb.v1.InitialLoadBalanceResponseOrBuilder> getInitialResponseFieldBuilder()728 getInitialResponseFieldBuilder() { 729 if (initialResponseBuilder_ == null) { 730 if (!(loadBalanceResponseTypeCase_ == 1)) { 731 loadBalanceResponseType_ = io.grpc.lb.v1.InitialLoadBalanceResponse.getDefaultInstance(); 732 } 733 initialResponseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< 734 io.grpc.lb.v1.InitialLoadBalanceResponse, io.grpc.lb.v1.InitialLoadBalanceResponse.Builder, io.grpc.lb.v1.InitialLoadBalanceResponseOrBuilder>( 735 (io.grpc.lb.v1.InitialLoadBalanceResponse) loadBalanceResponseType_, 736 getParentForChildren(), 737 isClean()); 738 loadBalanceResponseType_ = null; 739 } 740 loadBalanceResponseTypeCase_ = 1; 741 onChanged();; 742 return initialResponseBuilder_; 743 } 744 745 private com.google.protobuf.SingleFieldBuilderV3< 746 io.grpc.lb.v1.ServerList, io.grpc.lb.v1.ServerList.Builder, io.grpc.lb.v1.ServerListOrBuilder> serverListBuilder_; 747 /** 748 * <pre> 749 * Contains the list of servers selected by the load balancer. The client 750 * should send requests to these servers in the specified order. 751 * </pre> 752 * 753 * <code>.grpc.lb.v1.ServerList server_list = 2;</code> 754 */ hasServerList()755 public boolean hasServerList() { 756 return loadBalanceResponseTypeCase_ == 2; 757 } 758 /** 759 * <pre> 760 * Contains the list of servers selected by the load balancer. The client 761 * should send requests to these servers in the specified order. 762 * </pre> 763 * 764 * <code>.grpc.lb.v1.ServerList server_list = 2;</code> 765 */ getServerList()766 public io.grpc.lb.v1.ServerList getServerList() { 767 if (serverListBuilder_ == null) { 768 if (loadBalanceResponseTypeCase_ == 2) { 769 return (io.grpc.lb.v1.ServerList) loadBalanceResponseType_; 770 } 771 return io.grpc.lb.v1.ServerList.getDefaultInstance(); 772 } else { 773 if (loadBalanceResponseTypeCase_ == 2) { 774 return serverListBuilder_.getMessage(); 775 } 776 return io.grpc.lb.v1.ServerList.getDefaultInstance(); 777 } 778 } 779 /** 780 * <pre> 781 * Contains the list of servers selected by the load balancer. The client 782 * should send requests to these servers in the specified order. 783 * </pre> 784 * 785 * <code>.grpc.lb.v1.ServerList server_list = 2;</code> 786 */ setServerList(io.grpc.lb.v1.ServerList value)787 public Builder setServerList(io.grpc.lb.v1.ServerList value) { 788 if (serverListBuilder_ == null) { 789 if (value == null) { 790 throw new NullPointerException(); 791 } 792 loadBalanceResponseType_ = value; 793 onChanged(); 794 } else { 795 serverListBuilder_.setMessage(value); 796 } 797 loadBalanceResponseTypeCase_ = 2; 798 return this; 799 } 800 /** 801 * <pre> 802 * Contains the list of servers selected by the load balancer. The client 803 * should send requests to these servers in the specified order. 804 * </pre> 805 * 806 * <code>.grpc.lb.v1.ServerList server_list = 2;</code> 807 */ setServerList( io.grpc.lb.v1.ServerList.Builder builderForValue)808 public Builder setServerList( 809 io.grpc.lb.v1.ServerList.Builder builderForValue) { 810 if (serverListBuilder_ == null) { 811 loadBalanceResponseType_ = builderForValue.build(); 812 onChanged(); 813 } else { 814 serverListBuilder_.setMessage(builderForValue.build()); 815 } 816 loadBalanceResponseTypeCase_ = 2; 817 return this; 818 } 819 /** 820 * <pre> 821 * Contains the list of servers selected by the load balancer. The client 822 * should send requests to these servers in the specified order. 823 * </pre> 824 * 825 * <code>.grpc.lb.v1.ServerList server_list = 2;</code> 826 */ mergeServerList(io.grpc.lb.v1.ServerList value)827 public Builder mergeServerList(io.grpc.lb.v1.ServerList value) { 828 if (serverListBuilder_ == null) { 829 if (loadBalanceResponseTypeCase_ == 2 && 830 loadBalanceResponseType_ != io.grpc.lb.v1.ServerList.getDefaultInstance()) { 831 loadBalanceResponseType_ = io.grpc.lb.v1.ServerList.newBuilder((io.grpc.lb.v1.ServerList) loadBalanceResponseType_) 832 .mergeFrom(value).buildPartial(); 833 } else { 834 loadBalanceResponseType_ = value; 835 } 836 onChanged(); 837 } else { 838 if (loadBalanceResponseTypeCase_ == 2) { 839 serverListBuilder_.mergeFrom(value); 840 } 841 serverListBuilder_.setMessage(value); 842 } 843 loadBalanceResponseTypeCase_ = 2; 844 return this; 845 } 846 /** 847 * <pre> 848 * Contains the list of servers selected by the load balancer. The client 849 * should send requests to these servers in the specified order. 850 * </pre> 851 * 852 * <code>.grpc.lb.v1.ServerList server_list = 2;</code> 853 */ clearServerList()854 public Builder clearServerList() { 855 if (serverListBuilder_ == null) { 856 if (loadBalanceResponseTypeCase_ == 2) { 857 loadBalanceResponseTypeCase_ = 0; 858 loadBalanceResponseType_ = null; 859 onChanged(); 860 } 861 } else { 862 if (loadBalanceResponseTypeCase_ == 2) { 863 loadBalanceResponseTypeCase_ = 0; 864 loadBalanceResponseType_ = null; 865 } 866 serverListBuilder_.clear(); 867 } 868 return this; 869 } 870 /** 871 * <pre> 872 * Contains the list of servers selected by the load balancer. The client 873 * should send requests to these servers in the specified order. 874 * </pre> 875 * 876 * <code>.grpc.lb.v1.ServerList server_list = 2;</code> 877 */ getServerListBuilder()878 public io.grpc.lb.v1.ServerList.Builder getServerListBuilder() { 879 return getServerListFieldBuilder().getBuilder(); 880 } 881 /** 882 * <pre> 883 * Contains the list of servers selected by the load balancer. The client 884 * should send requests to these servers in the specified order. 885 * </pre> 886 * 887 * <code>.grpc.lb.v1.ServerList server_list = 2;</code> 888 */ getServerListOrBuilder()889 public io.grpc.lb.v1.ServerListOrBuilder getServerListOrBuilder() { 890 if ((loadBalanceResponseTypeCase_ == 2) && (serverListBuilder_ != null)) { 891 return serverListBuilder_.getMessageOrBuilder(); 892 } else { 893 if (loadBalanceResponseTypeCase_ == 2) { 894 return (io.grpc.lb.v1.ServerList) loadBalanceResponseType_; 895 } 896 return io.grpc.lb.v1.ServerList.getDefaultInstance(); 897 } 898 } 899 /** 900 * <pre> 901 * Contains the list of servers selected by the load balancer. The client 902 * should send requests to these servers in the specified order. 903 * </pre> 904 * 905 * <code>.grpc.lb.v1.ServerList server_list = 2;</code> 906 */ 907 private com.google.protobuf.SingleFieldBuilderV3< 908 io.grpc.lb.v1.ServerList, io.grpc.lb.v1.ServerList.Builder, io.grpc.lb.v1.ServerListOrBuilder> getServerListFieldBuilder()909 getServerListFieldBuilder() { 910 if (serverListBuilder_ == null) { 911 if (!(loadBalanceResponseTypeCase_ == 2)) { 912 loadBalanceResponseType_ = io.grpc.lb.v1.ServerList.getDefaultInstance(); 913 } 914 serverListBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< 915 io.grpc.lb.v1.ServerList, io.grpc.lb.v1.ServerList.Builder, io.grpc.lb.v1.ServerListOrBuilder>( 916 (io.grpc.lb.v1.ServerList) loadBalanceResponseType_, 917 getParentForChildren(), 918 isClean()); 919 loadBalanceResponseType_ = null; 920 } 921 loadBalanceResponseTypeCase_ = 2; 922 onChanged();; 923 return serverListBuilder_; 924 } setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)925 public final Builder setUnknownFields( 926 final com.google.protobuf.UnknownFieldSet unknownFields) { 927 return super.setUnknownFieldsProto3(unknownFields); 928 } 929 mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)930 public final Builder mergeUnknownFields( 931 final com.google.protobuf.UnknownFieldSet unknownFields) { 932 return super.mergeUnknownFields(unknownFields); 933 } 934 935 936 // @@protoc_insertion_point(builder_scope:grpc.lb.v1.LoadBalanceResponse) 937 } 938 939 // @@protoc_insertion_point(class_scope:grpc.lb.v1.LoadBalanceResponse) 940 private static final io.grpc.lb.v1.LoadBalanceResponse DEFAULT_INSTANCE; 941 static { 942 DEFAULT_INSTANCE = new io.grpc.lb.v1.LoadBalanceResponse(); 943 } 944 getDefaultInstance()945 public static io.grpc.lb.v1.LoadBalanceResponse getDefaultInstance() { 946 return DEFAULT_INSTANCE; 947 } 948 949 private static final com.google.protobuf.Parser<LoadBalanceResponse> 950 PARSER = new com.google.protobuf.AbstractParser<LoadBalanceResponse>() { 951 public LoadBalanceResponse parsePartialFrom( 952 com.google.protobuf.CodedInputStream input, 953 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 954 throws com.google.protobuf.InvalidProtocolBufferException { 955 return new LoadBalanceResponse(input, extensionRegistry); 956 } 957 }; 958 parser()959 public static com.google.protobuf.Parser<LoadBalanceResponse> parser() { 960 return PARSER; 961 } 962 963 @java.lang.Override getParserForType()964 public com.google.protobuf.Parser<LoadBalanceResponse> getParserForType() { 965 return PARSER; 966 } 967 getDefaultInstanceForType()968 public io.grpc.lb.v1.LoadBalanceResponse getDefaultInstanceForType() { 969 return DEFAULT_INSTANCE; 970 } 971 972 } 973 974