1 // Generated by the protocol buffer compiler. DO NOT EDIT! 2 // source: grpc/channelz/v1/channelz.proto 3 4 package io.grpc.channelz.v1; 5 6 /** 7 * Protobuf type {@code grpc.channelz.v1.GetSubchannelResponse} 8 */ 9 public final class GetSubchannelResponse extends 10 com.google.protobuf.GeneratedMessageV3 implements 11 // @@protoc_insertion_point(message_implements:grpc.channelz.v1.GetSubchannelResponse) 12 GetSubchannelResponseOrBuilder { 13 private static final long serialVersionUID = 0L; 14 // Use GetSubchannelResponse.newBuilder() to construct. 15 private GetSubchannelResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 16 super(builder); 17 } 18 private GetSubchannelResponse() { 19 } 20 21 @java.lang.Override 22 public final com.google.protobuf.UnknownFieldSet 23 getUnknownFields() { 24 return this.unknownFields; 25 } 26 private GetSubchannelResponse( 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.channelz.v1.Subchannel.Builder subBuilder = null; 54 if (subchannel_ != null) { 55 subBuilder = subchannel_.toBuilder(); 56 } 57 subchannel_ = input.readMessage(io.grpc.channelz.v1.Subchannel.parser(), extensionRegistry); 58 if (subBuilder != null) { 59 subBuilder.mergeFrom(subchannel_); 60 subchannel_ = subBuilder.buildPartial(); 61 } 62 63 break; 64 } 65 } 66 } 67 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 68 throw e.setUnfinishedMessage(this); 69 } catch (java.io.IOException e) { 70 throw new com.google.protobuf.InvalidProtocolBufferException( 71 e).setUnfinishedMessage(this); 72 } finally { 73 this.unknownFields = unknownFields.build(); 74 makeExtensionsImmutable(); 75 } 76 } 77 public static final com.google.protobuf.Descriptors.Descriptor 78 getDescriptor() { 79 return io.grpc.channelz.v1.ChannelzProto.internal_static_grpc_channelz_v1_GetSubchannelResponse_descriptor; 80 } 81 82 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable 83 internalGetFieldAccessorTable() { 84 return io.grpc.channelz.v1.ChannelzProto.internal_static_grpc_channelz_v1_GetSubchannelResponse_fieldAccessorTable 85 .ensureFieldAccessorsInitialized( 86 io.grpc.channelz.v1.GetSubchannelResponse.class, io.grpc.channelz.v1.GetSubchannelResponse.Builder.class); 87 } 88 89 public static final int SUBCHANNEL_FIELD_NUMBER = 1; 90 private io.grpc.channelz.v1.Subchannel subchannel_; 91 /** 92 * <pre> 93 * The Subchannel that corresponds to the requested subchannel_id. This 94 * field should be set. 95 * </pre> 96 * 97 * <code>.grpc.channelz.v1.Subchannel subchannel = 1;</code> 98 */ 99 public boolean hasSubchannel() { 100 return subchannel_ != null; 101 } 102 /** 103 * <pre> 104 * The Subchannel that corresponds to the requested subchannel_id. This 105 * field should be set. 106 * </pre> 107 * 108 * <code>.grpc.channelz.v1.Subchannel subchannel = 1;</code> 109 */ 110 public io.grpc.channelz.v1.Subchannel getSubchannel() { 111 return subchannel_ == null ? io.grpc.channelz.v1.Subchannel.getDefaultInstance() : subchannel_; 112 } 113 /** 114 * <pre> 115 * The Subchannel that corresponds to the requested subchannel_id. This 116 * field should be set. 117 * </pre> 118 * 119 * <code>.grpc.channelz.v1.Subchannel subchannel = 1;</code> 120 */ 121 public io.grpc.channelz.v1.SubchannelOrBuilder getSubchannelOrBuilder() { 122 return getSubchannel(); 123 } 124 125 private byte memoizedIsInitialized = -1; 126 public final boolean isInitialized() { 127 byte isInitialized = memoizedIsInitialized; 128 if (isInitialized == 1) return true; 129 if (isInitialized == 0) return false; 130 131 memoizedIsInitialized = 1; 132 return true; 133 } 134 135 public void writeTo(com.google.protobuf.CodedOutputStream output) 136 throws java.io.IOException { 137 if (subchannel_ != null) { 138 output.writeMessage(1, getSubchannel()); 139 } 140 unknownFields.writeTo(output); 141 } 142 143 public int getSerializedSize() { 144 int size = memoizedSize; 145 if (size != -1) return size; 146 147 size = 0; 148 if (subchannel_ != null) { 149 size += com.google.protobuf.CodedOutputStream 150 .computeMessageSize(1, getSubchannel()); 151 } 152 size += unknownFields.getSerializedSize(); 153 memoizedSize = size; 154 return size; 155 } 156 157 @java.lang.Override 158 public boolean equals(final java.lang.Object obj) { 159 if (obj == this) { 160 return true; 161 } 162 if (!(obj instanceof io.grpc.channelz.v1.GetSubchannelResponse)) { 163 return super.equals(obj); 164 } 165 io.grpc.channelz.v1.GetSubchannelResponse other = (io.grpc.channelz.v1.GetSubchannelResponse) obj; 166 167 boolean result = true; 168 result = result && (hasSubchannel() == other.hasSubchannel()); 169 if (hasSubchannel()) { 170 result = result && getSubchannel() 171 .equals(other.getSubchannel()); 172 } 173 result = result && unknownFields.equals(other.unknownFields); 174 return result; 175 } 176 177 @java.lang.Override 178 public int hashCode() { 179 if (memoizedHashCode != 0) { 180 return memoizedHashCode; 181 } 182 int hash = 41; 183 hash = (19 * hash) + getDescriptor().hashCode(); 184 if (hasSubchannel()) { 185 hash = (37 * hash) + SUBCHANNEL_FIELD_NUMBER; 186 hash = (53 * hash) + getSubchannel().hashCode(); 187 } 188 hash = (29 * hash) + unknownFields.hashCode(); 189 memoizedHashCode = hash; 190 return hash; 191 } 192 193 public static io.grpc.channelz.v1.GetSubchannelResponse parseFrom( 194 java.nio.ByteBuffer data) 195 throws com.google.protobuf.InvalidProtocolBufferException { 196 return PARSER.parseFrom(data); 197 } 198 public static io.grpc.channelz.v1.GetSubchannelResponse parseFrom( 199 java.nio.ByteBuffer data, 200 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 201 throws com.google.protobuf.InvalidProtocolBufferException { 202 return PARSER.parseFrom(data, extensionRegistry); 203 } 204 public static io.grpc.channelz.v1.GetSubchannelResponse parseFrom( 205 com.google.protobuf.ByteString data) 206 throws com.google.protobuf.InvalidProtocolBufferException { 207 return PARSER.parseFrom(data); 208 } 209 public static io.grpc.channelz.v1.GetSubchannelResponse parseFrom( 210 com.google.protobuf.ByteString data, 211 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 212 throws com.google.protobuf.InvalidProtocolBufferException { 213 return PARSER.parseFrom(data, extensionRegistry); 214 } 215 public static io.grpc.channelz.v1.GetSubchannelResponse parseFrom(byte[] data) 216 throws com.google.protobuf.InvalidProtocolBufferException { 217 return PARSER.parseFrom(data); 218 } 219 public static io.grpc.channelz.v1.GetSubchannelResponse parseFrom( 220 byte[] data, 221 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 222 throws com.google.protobuf.InvalidProtocolBufferException { 223 return PARSER.parseFrom(data, extensionRegistry); 224 } 225 public static io.grpc.channelz.v1.GetSubchannelResponse parseFrom(java.io.InputStream input) 226 throws java.io.IOException { 227 return com.google.protobuf.GeneratedMessageV3 228 .parseWithIOException(PARSER, input); 229 } 230 public static io.grpc.channelz.v1.GetSubchannelResponse parseFrom( 231 java.io.InputStream input, 232 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 233 throws java.io.IOException { 234 return com.google.protobuf.GeneratedMessageV3 235 .parseWithIOException(PARSER, input, extensionRegistry); 236 } 237 public static io.grpc.channelz.v1.GetSubchannelResponse parseDelimitedFrom(java.io.InputStream input) 238 throws java.io.IOException { 239 return com.google.protobuf.GeneratedMessageV3 240 .parseDelimitedWithIOException(PARSER, input); 241 } 242 public static io.grpc.channelz.v1.GetSubchannelResponse parseDelimitedFrom( 243 java.io.InputStream input, 244 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 245 throws java.io.IOException { 246 return com.google.protobuf.GeneratedMessageV3 247 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); 248 } 249 public static io.grpc.channelz.v1.GetSubchannelResponse parseFrom( 250 com.google.protobuf.CodedInputStream input) 251 throws java.io.IOException { 252 return com.google.protobuf.GeneratedMessageV3 253 .parseWithIOException(PARSER, input); 254 } 255 public static io.grpc.channelz.v1.GetSubchannelResponse parseFrom( 256 com.google.protobuf.CodedInputStream input, 257 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 258 throws java.io.IOException { 259 return com.google.protobuf.GeneratedMessageV3 260 .parseWithIOException(PARSER, input, extensionRegistry); 261 } 262 263 public Builder newBuilderForType() { return newBuilder(); } 264 public static Builder newBuilder() { 265 return DEFAULT_INSTANCE.toBuilder(); 266 } 267 public static Builder newBuilder(io.grpc.channelz.v1.GetSubchannelResponse prototype) { 268 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 269 } 270 public Builder toBuilder() { 271 return this == DEFAULT_INSTANCE 272 ? new Builder() : new Builder().mergeFrom(this); 273 } 274 275 @java.lang.Override 276 protected Builder newBuilderForType( 277 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 278 Builder builder = new Builder(parent); 279 return builder; 280 } 281 /** 282 * Protobuf type {@code grpc.channelz.v1.GetSubchannelResponse} 283 */ 284 public static final class Builder extends 285 com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements 286 // @@protoc_insertion_point(builder_implements:grpc.channelz.v1.GetSubchannelResponse) 287 io.grpc.channelz.v1.GetSubchannelResponseOrBuilder { 288 public static final com.google.protobuf.Descriptors.Descriptor 289 getDescriptor() { 290 return io.grpc.channelz.v1.ChannelzProto.internal_static_grpc_channelz_v1_GetSubchannelResponse_descriptor; 291 } 292 293 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable 294 internalGetFieldAccessorTable() { 295 return io.grpc.channelz.v1.ChannelzProto.internal_static_grpc_channelz_v1_GetSubchannelResponse_fieldAccessorTable 296 .ensureFieldAccessorsInitialized( 297 io.grpc.channelz.v1.GetSubchannelResponse.class, io.grpc.channelz.v1.GetSubchannelResponse.Builder.class); 298 } 299 300 // Construct using io.grpc.channelz.v1.GetSubchannelResponse.newBuilder() 301 private Builder() { 302 maybeForceBuilderInitialization(); 303 } 304 305 private Builder( 306 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 307 super(parent); 308 maybeForceBuilderInitialization(); 309 } 310 private void maybeForceBuilderInitialization() { 311 if (com.google.protobuf.GeneratedMessageV3 312 .alwaysUseFieldBuilders) { 313 } 314 } 315 public Builder clear() { 316 super.clear(); 317 if (subchannelBuilder_ == null) { 318 subchannel_ = null; 319 } else { 320 subchannel_ = null; 321 subchannelBuilder_ = null; 322 } 323 return this; 324 } 325 326 public com.google.protobuf.Descriptors.Descriptor 327 getDescriptorForType() { 328 return io.grpc.channelz.v1.ChannelzProto.internal_static_grpc_channelz_v1_GetSubchannelResponse_descriptor; 329 } 330 331 public io.grpc.channelz.v1.GetSubchannelResponse getDefaultInstanceForType() { 332 return io.grpc.channelz.v1.GetSubchannelResponse.getDefaultInstance(); 333 } 334 335 public io.grpc.channelz.v1.GetSubchannelResponse build() { 336 io.grpc.channelz.v1.GetSubchannelResponse result = buildPartial(); 337 if (!result.isInitialized()) { 338 throw newUninitializedMessageException(result); 339 } 340 return result; 341 } 342 343 public io.grpc.channelz.v1.GetSubchannelResponse buildPartial() { 344 io.grpc.channelz.v1.GetSubchannelResponse result = new io.grpc.channelz.v1.GetSubchannelResponse(this); 345 if (subchannelBuilder_ == null) { 346 result.subchannel_ = subchannel_; 347 } else { 348 result.subchannel_ = subchannelBuilder_.build(); 349 } 350 onBuilt(); 351 return result; 352 } 353 354 public Builder clone() { 355 return (Builder) super.clone(); 356 } 357 public Builder setField( 358 com.google.protobuf.Descriptors.FieldDescriptor field, 359 java.lang.Object value) { 360 return (Builder) super.setField(field, value); 361 } 362 public Builder clearField( 363 com.google.protobuf.Descriptors.FieldDescriptor field) { 364 return (Builder) super.clearField(field); 365 } 366 public Builder clearOneof( 367 com.google.protobuf.Descriptors.OneofDescriptor oneof) { 368 return (Builder) super.clearOneof(oneof); 369 } 370 public Builder setRepeatedField( 371 com.google.protobuf.Descriptors.FieldDescriptor field, 372 int index, java.lang.Object value) { 373 return (Builder) super.setRepeatedField(field, index, value); 374 } 375 public Builder addRepeatedField( 376 com.google.protobuf.Descriptors.FieldDescriptor field, 377 java.lang.Object value) { 378 return (Builder) super.addRepeatedField(field, value); 379 } 380 public Builder mergeFrom(com.google.protobuf.Message other) { 381 if (other instanceof io.grpc.channelz.v1.GetSubchannelResponse) { 382 return mergeFrom((io.grpc.channelz.v1.GetSubchannelResponse)other); 383 } else { 384 super.mergeFrom(other); 385 return this; 386 } 387 } 388 389 public Builder mergeFrom(io.grpc.channelz.v1.GetSubchannelResponse other) { 390 if (other == io.grpc.channelz.v1.GetSubchannelResponse.getDefaultInstance()) return this; 391 if (other.hasSubchannel()) { 392 mergeSubchannel(other.getSubchannel()); 393 } 394 this.mergeUnknownFields(other.unknownFields); 395 onChanged(); 396 return this; 397 } 398 399 public final boolean isInitialized() { 400 return true; 401 } 402 403 public Builder mergeFrom( 404 com.google.protobuf.CodedInputStream input, 405 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 406 throws java.io.IOException { 407 io.grpc.channelz.v1.GetSubchannelResponse parsedMessage = null; 408 try { 409 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); 410 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 411 parsedMessage = (io.grpc.channelz.v1.GetSubchannelResponse) e.getUnfinishedMessage(); 412 throw e.unwrapIOException(); 413 } finally { 414 if (parsedMessage != null) { 415 mergeFrom(parsedMessage); 416 } 417 } 418 return this; 419 } 420 421 private io.grpc.channelz.v1.Subchannel subchannel_ = null; 422 private com.google.protobuf.SingleFieldBuilderV3< 423 io.grpc.channelz.v1.Subchannel, io.grpc.channelz.v1.Subchannel.Builder, io.grpc.channelz.v1.SubchannelOrBuilder> subchannelBuilder_; 424 /** 425 * <pre> 426 * The Subchannel that corresponds to the requested subchannel_id. This 427 * field should be set. 428 * </pre> 429 * 430 * <code>.grpc.channelz.v1.Subchannel subchannel = 1;</code> 431 */ 432 public boolean hasSubchannel() { 433 return subchannelBuilder_ != null || subchannel_ != null; 434 } 435 /** 436 * <pre> 437 * The Subchannel that corresponds to the requested subchannel_id. This 438 * field should be set. 439 * </pre> 440 * 441 * <code>.grpc.channelz.v1.Subchannel subchannel = 1;</code> 442 */ 443 public io.grpc.channelz.v1.Subchannel getSubchannel() { 444 if (subchannelBuilder_ == null) { 445 return subchannel_ == null ? io.grpc.channelz.v1.Subchannel.getDefaultInstance() : subchannel_; 446 } else { 447 return subchannelBuilder_.getMessage(); 448 } 449 } 450 /** 451 * <pre> 452 * The Subchannel that corresponds to the requested subchannel_id. This 453 * field should be set. 454 * </pre> 455 * 456 * <code>.grpc.channelz.v1.Subchannel subchannel = 1;</code> 457 */ 458 public Builder setSubchannel(io.grpc.channelz.v1.Subchannel value) { 459 if (subchannelBuilder_ == null) { 460 if (value == null) { 461 throw new NullPointerException(); 462 } 463 subchannel_ = value; 464 onChanged(); 465 } else { 466 subchannelBuilder_.setMessage(value); 467 } 468 469 return this; 470 } 471 /** 472 * <pre> 473 * The Subchannel that corresponds to the requested subchannel_id. This 474 * field should be set. 475 * </pre> 476 * 477 * <code>.grpc.channelz.v1.Subchannel subchannel = 1;</code> 478 */ 479 public Builder setSubchannel( 480 io.grpc.channelz.v1.Subchannel.Builder builderForValue) { 481 if (subchannelBuilder_ == null) { 482 subchannel_ = builderForValue.build(); 483 onChanged(); 484 } else { 485 subchannelBuilder_.setMessage(builderForValue.build()); 486 } 487 488 return this; 489 } 490 /** 491 * <pre> 492 * The Subchannel that corresponds to the requested subchannel_id. This 493 * field should be set. 494 * </pre> 495 * 496 * <code>.grpc.channelz.v1.Subchannel subchannel = 1;</code> 497 */ 498 public Builder mergeSubchannel(io.grpc.channelz.v1.Subchannel value) { 499 if (subchannelBuilder_ == null) { 500 if (subchannel_ != null) { 501 subchannel_ = 502 io.grpc.channelz.v1.Subchannel.newBuilder(subchannel_).mergeFrom(value).buildPartial(); 503 } else { 504 subchannel_ = value; 505 } 506 onChanged(); 507 } else { 508 subchannelBuilder_.mergeFrom(value); 509 } 510 511 return this; 512 } 513 /** 514 * <pre> 515 * The Subchannel that corresponds to the requested subchannel_id. This 516 * field should be set. 517 * </pre> 518 * 519 * <code>.grpc.channelz.v1.Subchannel subchannel = 1;</code> 520 */ 521 public Builder clearSubchannel() { 522 if (subchannelBuilder_ == null) { 523 subchannel_ = null; 524 onChanged(); 525 } else { 526 subchannel_ = null; 527 subchannelBuilder_ = null; 528 } 529 530 return this; 531 } 532 /** 533 * <pre> 534 * The Subchannel that corresponds to the requested subchannel_id. This 535 * field should be set. 536 * </pre> 537 * 538 * <code>.grpc.channelz.v1.Subchannel subchannel = 1;</code> 539 */ 540 public io.grpc.channelz.v1.Subchannel.Builder getSubchannelBuilder() { 541 542 onChanged(); 543 return getSubchannelFieldBuilder().getBuilder(); 544 } 545 /** 546 * <pre> 547 * The Subchannel that corresponds to the requested subchannel_id. This 548 * field should be set. 549 * </pre> 550 * 551 * <code>.grpc.channelz.v1.Subchannel subchannel = 1;</code> 552 */ 553 public io.grpc.channelz.v1.SubchannelOrBuilder getSubchannelOrBuilder() { 554 if (subchannelBuilder_ != null) { 555 return subchannelBuilder_.getMessageOrBuilder(); 556 } else { 557 return subchannel_ == null ? 558 io.grpc.channelz.v1.Subchannel.getDefaultInstance() : subchannel_; 559 } 560 } 561 /** 562 * <pre> 563 * The Subchannel that corresponds to the requested subchannel_id. This 564 * field should be set. 565 * </pre> 566 * 567 * <code>.grpc.channelz.v1.Subchannel subchannel = 1;</code> 568 */ 569 private com.google.protobuf.SingleFieldBuilderV3< 570 io.grpc.channelz.v1.Subchannel, io.grpc.channelz.v1.Subchannel.Builder, io.grpc.channelz.v1.SubchannelOrBuilder> 571 getSubchannelFieldBuilder() { 572 if (subchannelBuilder_ == null) { 573 subchannelBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< 574 io.grpc.channelz.v1.Subchannel, io.grpc.channelz.v1.Subchannel.Builder, io.grpc.channelz.v1.SubchannelOrBuilder>( 575 getSubchannel(), 576 getParentForChildren(), 577 isClean()); 578 subchannel_ = null; 579 } 580 return subchannelBuilder_; 581 } 582 public final Builder setUnknownFields( 583 final com.google.protobuf.UnknownFieldSet unknownFields) { 584 return super.setUnknownFieldsProto3(unknownFields); 585 } 586 587 public final Builder mergeUnknownFields( 588 final com.google.protobuf.UnknownFieldSet unknownFields) { 589 return super.mergeUnknownFields(unknownFields); 590 } 591 592 593 // @@protoc_insertion_point(builder_scope:grpc.channelz.v1.GetSubchannelResponse) 594 } 595 596 // @@protoc_insertion_point(class_scope:grpc.channelz.v1.GetSubchannelResponse) 597 private static final io.grpc.channelz.v1.GetSubchannelResponse DEFAULT_INSTANCE; 598 static { 599 DEFAULT_INSTANCE = new io.grpc.channelz.v1.GetSubchannelResponse(); 600 } 601 602 public static io.grpc.channelz.v1.GetSubchannelResponse getDefaultInstance() { 603 return DEFAULT_INSTANCE; 604 } 605 606 private static final com.google.protobuf.Parser<GetSubchannelResponse> 607 PARSER = new com.google.protobuf.AbstractParser<GetSubchannelResponse>() { 608 public GetSubchannelResponse parsePartialFrom( 609 com.google.protobuf.CodedInputStream input, 610 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 611 throws com.google.protobuf.InvalidProtocolBufferException { 612 return new GetSubchannelResponse(input, extensionRegistry); 613 } 614 }; 615 616 public static com.google.protobuf.Parser<GetSubchannelResponse> parser() { 617 return PARSER; 618 } 619 620 @java.lang.Override 621 public com.google.protobuf.Parser<GetSubchannelResponse> getParserForType() { 622 return PARSER; 623 } 624 625 public io.grpc.channelz.v1.GetSubchannelResponse getDefaultInstanceForType() { 626 return DEFAULT_INSTANCE; 627 } 628 629 } 630 631