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 * <pre> 8 * ChannelTrace represents the recent events that have occurred on the channel. 9 * </pre> 10 * 11 * Protobuf type {@code grpc.channelz.v1.ChannelTrace} 12 */ 13 public final class ChannelTrace extends 14 com.google.protobuf.GeneratedMessageV3 implements 15 // @@protoc_insertion_point(message_implements:grpc.channelz.v1.ChannelTrace) 16 ChannelTraceOrBuilder { 17 private static final long serialVersionUID = 0L; 18 // Use ChannelTrace.newBuilder() to construct. ChannelTrace(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)19 private ChannelTrace(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 20 super(builder); 21 } ChannelTrace()22 private ChannelTrace() { 23 numEventsLogged_ = 0L; 24 events_ = java.util.Collections.emptyList(); 25 } 26 27 @java.lang.Override 28 public final com.google.protobuf.UnknownFieldSet getUnknownFields()29 getUnknownFields() { 30 return this.unknownFields; 31 } ChannelTrace( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)32 private ChannelTrace( 33 com.google.protobuf.CodedInputStream input, 34 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 35 throws com.google.protobuf.InvalidProtocolBufferException { 36 this(); 37 if (extensionRegistry == null) { 38 throw new java.lang.NullPointerException(); 39 } 40 int mutable_bitField0_ = 0; 41 com.google.protobuf.UnknownFieldSet.Builder unknownFields = 42 com.google.protobuf.UnknownFieldSet.newBuilder(); 43 try { 44 boolean done = false; 45 while (!done) { 46 int tag = input.readTag(); 47 switch (tag) { 48 case 0: 49 done = true; 50 break; 51 default: { 52 if (!parseUnknownFieldProto3( 53 input, unknownFields, extensionRegistry, tag)) { 54 done = true; 55 } 56 break; 57 } 58 case 8: { 59 60 numEventsLogged_ = input.readInt64(); 61 break; 62 } 63 case 18: { 64 com.google.protobuf.Timestamp.Builder subBuilder = null; 65 if (creationTimestamp_ != null) { 66 subBuilder = creationTimestamp_.toBuilder(); 67 } 68 creationTimestamp_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); 69 if (subBuilder != null) { 70 subBuilder.mergeFrom(creationTimestamp_); 71 creationTimestamp_ = subBuilder.buildPartial(); 72 } 73 74 break; 75 } 76 case 26: { 77 if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { 78 events_ = new java.util.ArrayList<io.grpc.channelz.v1.ChannelTraceEvent>(); 79 mutable_bitField0_ |= 0x00000004; 80 } 81 events_.add( 82 input.readMessage(io.grpc.channelz.v1.ChannelTraceEvent.parser(), extensionRegistry)); 83 break; 84 } 85 } 86 } 87 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 88 throw e.setUnfinishedMessage(this); 89 } catch (java.io.IOException e) { 90 throw new com.google.protobuf.InvalidProtocolBufferException( 91 e).setUnfinishedMessage(this); 92 } finally { 93 if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { 94 events_ = java.util.Collections.unmodifiableList(events_); 95 } 96 this.unknownFields = unknownFields.build(); 97 makeExtensionsImmutable(); 98 } 99 } 100 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()101 getDescriptor() { 102 return io.grpc.channelz.v1.ChannelzProto.internal_static_grpc_channelz_v1_ChannelTrace_descriptor; 103 } 104 105 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()106 internalGetFieldAccessorTable() { 107 return io.grpc.channelz.v1.ChannelzProto.internal_static_grpc_channelz_v1_ChannelTrace_fieldAccessorTable 108 .ensureFieldAccessorsInitialized( 109 io.grpc.channelz.v1.ChannelTrace.class, io.grpc.channelz.v1.ChannelTrace.Builder.class); 110 } 111 112 private int bitField0_; 113 public static final int NUM_EVENTS_LOGGED_FIELD_NUMBER = 1; 114 private long numEventsLogged_; 115 /** 116 * <pre> 117 * Number of events ever logged in this tracing object. This can differ from 118 * events.size() because events can be overwritten or garbage collected by 119 * implementations. 120 * </pre> 121 * 122 * <code>int64 num_events_logged = 1;</code> 123 */ getNumEventsLogged()124 public long getNumEventsLogged() { 125 return numEventsLogged_; 126 } 127 128 public static final int CREATION_TIMESTAMP_FIELD_NUMBER = 2; 129 private com.google.protobuf.Timestamp creationTimestamp_; 130 /** 131 * <pre> 132 * Time that this channel was created. 133 * </pre> 134 * 135 * <code>.google.protobuf.Timestamp creation_timestamp = 2;</code> 136 */ hasCreationTimestamp()137 public boolean hasCreationTimestamp() { 138 return creationTimestamp_ != null; 139 } 140 /** 141 * <pre> 142 * Time that this channel was created. 143 * </pre> 144 * 145 * <code>.google.protobuf.Timestamp creation_timestamp = 2;</code> 146 */ getCreationTimestamp()147 public com.google.protobuf.Timestamp getCreationTimestamp() { 148 return creationTimestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : creationTimestamp_; 149 } 150 /** 151 * <pre> 152 * Time that this channel was created. 153 * </pre> 154 * 155 * <code>.google.protobuf.Timestamp creation_timestamp = 2;</code> 156 */ getCreationTimestampOrBuilder()157 public com.google.protobuf.TimestampOrBuilder getCreationTimestampOrBuilder() { 158 return getCreationTimestamp(); 159 } 160 161 public static final int EVENTS_FIELD_NUMBER = 3; 162 private java.util.List<io.grpc.channelz.v1.ChannelTraceEvent> events_; 163 /** 164 * <pre> 165 * List of events that have occurred on this channel. 166 * </pre> 167 * 168 * <code>repeated .grpc.channelz.v1.ChannelTraceEvent events = 3;</code> 169 */ getEventsList()170 public java.util.List<io.grpc.channelz.v1.ChannelTraceEvent> getEventsList() { 171 return events_; 172 } 173 /** 174 * <pre> 175 * List of events that have occurred on this channel. 176 * </pre> 177 * 178 * <code>repeated .grpc.channelz.v1.ChannelTraceEvent events = 3;</code> 179 */ 180 public java.util.List<? extends io.grpc.channelz.v1.ChannelTraceEventOrBuilder> getEventsOrBuilderList()181 getEventsOrBuilderList() { 182 return events_; 183 } 184 /** 185 * <pre> 186 * List of events that have occurred on this channel. 187 * </pre> 188 * 189 * <code>repeated .grpc.channelz.v1.ChannelTraceEvent events = 3;</code> 190 */ getEventsCount()191 public int getEventsCount() { 192 return events_.size(); 193 } 194 /** 195 * <pre> 196 * List of events that have occurred on this channel. 197 * </pre> 198 * 199 * <code>repeated .grpc.channelz.v1.ChannelTraceEvent events = 3;</code> 200 */ getEvents(int index)201 public io.grpc.channelz.v1.ChannelTraceEvent getEvents(int index) { 202 return events_.get(index); 203 } 204 /** 205 * <pre> 206 * List of events that have occurred on this channel. 207 * </pre> 208 * 209 * <code>repeated .grpc.channelz.v1.ChannelTraceEvent events = 3;</code> 210 */ getEventsOrBuilder( int index)211 public io.grpc.channelz.v1.ChannelTraceEventOrBuilder getEventsOrBuilder( 212 int index) { 213 return events_.get(index); 214 } 215 216 private byte memoizedIsInitialized = -1; isInitialized()217 public final boolean isInitialized() { 218 byte isInitialized = memoizedIsInitialized; 219 if (isInitialized == 1) return true; 220 if (isInitialized == 0) return false; 221 222 memoizedIsInitialized = 1; 223 return true; 224 } 225 writeTo(com.google.protobuf.CodedOutputStream output)226 public void writeTo(com.google.protobuf.CodedOutputStream output) 227 throws java.io.IOException { 228 if (numEventsLogged_ != 0L) { 229 output.writeInt64(1, numEventsLogged_); 230 } 231 if (creationTimestamp_ != null) { 232 output.writeMessage(2, getCreationTimestamp()); 233 } 234 for (int i = 0; i < events_.size(); i++) { 235 output.writeMessage(3, events_.get(i)); 236 } 237 unknownFields.writeTo(output); 238 } 239 getSerializedSize()240 public int getSerializedSize() { 241 int size = memoizedSize; 242 if (size != -1) return size; 243 244 size = 0; 245 if (numEventsLogged_ != 0L) { 246 size += com.google.protobuf.CodedOutputStream 247 .computeInt64Size(1, numEventsLogged_); 248 } 249 if (creationTimestamp_ != null) { 250 size += com.google.protobuf.CodedOutputStream 251 .computeMessageSize(2, getCreationTimestamp()); 252 } 253 for (int i = 0; i < events_.size(); i++) { 254 size += com.google.protobuf.CodedOutputStream 255 .computeMessageSize(3, events_.get(i)); 256 } 257 size += unknownFields.getSerializedSize(); 258 memoizedSize = size; 259 return size; 260 } 261 262 @java.lang.Override equals(final java.lang.Object obj)263 public boolean equals(final java.lang.Object obj) { 264 if (obj == this) { 265 return true; 266 } 267 if (!(obj instanceof io.grpc.channelz.v1.ChannelTrace)) { 268 return super.equals(obj); 269 } 270 io.grpc.channelz.v1.ChannelTrace other = (io.grpc.channelz.v1.ChannelTrace) obj; 271 272 boolean result = true; 273 result = result && (getNumEventsLogged() 274 == other.getNumEventsLogged()); 275 result = result && (hasCreationTimestamp() == other.hasCreationTimestamp()); 276 if (hasCreationTimestamp()) { 277 result = result && getCreationTimestamp() 278 .equals(other.getCreationTimestamp()); 279 } 280 result = result && getEventsList() 281 .equals(other.getEventsList()); 282 result = result && unknownFields.equals(other.unknownFields); 283 return result; 284 } 285 286 @java.lang.Override hashCode()287 public int hashCode() { 288 if (memoizedHashCode != 0) { 289 return memoizedHashCode; 290 } 291 int hash = 41; 292 hash = (19 * hash) + getDescriptor().hashCode(); 293 hash = (37 * hash) + NUM_EVENTS_LOGGED_FIELD_NUMBER; 294 hash = (53 * hash) + com.google.protobuf.Internal.hashLong( 295 getNumEventsLogged()); 296 if (hasCreationTimestamp()) { 297 hash = (37 * hash) + CREATION_TIMESTAMP_FIELD_NUMBER; 298 hash = (53 * hash) + getCreationTimestamp().hashCode(); 299 } 300 if (getEventsCount() > 0) { 301 hash = (37 * hash) + EVENTS_FIELD_NUMBER; 302 hash = (53 * hash) + getEventsList().hashCode(); 303 } 304 hash = (29 * hash) + unknownFields.hashCode(); 305 memoizedHashCode = hash; 306 return hash; 307 } 308 parseFrom( java.nio.ByteBuffer data)309 public static io.grpc.channelz.v1.ChannelTrace parseFrom( 310 java.nio.ByteBuffer data) 311 throws com.google.protobuf.InvalidProtocolBufferException { 312 return PARSER.parseFrom(data); 313 } parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)314 public static io.grpc.channelz.v1.ChannelTrace parseFrom( 315 java.nio.ByteBuffer data, 316 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 317 throws com.google.protobuf.InvalidProtocolBufferException { 318 return PARSER.parseFrom(data, extensionRegistry); 319 } parseFrom( com.google.protobuf.ByteString data)320 public static io.grpc.channelz.v1.ChannelTrace parseFrom( 321 com.google.protobuf.ByteString data) 322 throws com.google.protobuf.InvalidProtocolBufferException { 323 return PARSER.parseFrom(data); 324 } parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)325 public static io.grpc.channelz.v1.ChannelTrace parseFrom( 326 com.google.protobuf.ByteString data, 327 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 328 throws com.google.protobuf.InvalidProtocolBufferException { 329 return PARSER.parseFrom(data, extensionRegistry); 330 } parseFrom(byte[] data)331 public static io.grpc.channelz.v1.ChannelTrace parseFrom(byte[] data) 332 throws com.google.protobuf.InvalidProtocolBufferException { 333 return PARSER.parseFrom(data); 334 } parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)335 public static io.grpc.channelz.v1.ChannelTrace parseFrom( 336 byte[] data, 337 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 338 throws com.google.protobuf.InvalidProtocolBufferException { 339 return PARSER.parseFrom(data, extensionRegistry); 340 } parseFrom(java.io.InputStream input)341 public static io.grpc.channelz.v1.ChannelTrace parseFrom(java.io.InputStream input) 342 throws java.io.IOException { 343 return com.google.protobuf.GeneratedMessageV3 344 .parseWithIOException(PARSER, input); 345 } parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)346 public static io.grpc.channelz.v1.ChannelTrace parseFrom( 347 java.io.InputStream input, 348 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 349 throws java.io.IOException { 350 return com.google.protobuf.GeneratedMessageV3 351 .parseWithIOException(PARSER, input, extensionRegistry); 352 } parseDelimitedFrom(java.io.InputStream input)353 public static io.grpc.channelz.v1.ChannelTrace parseDelimitedFrom(java.io.InputStream input) 354 throws java.io.IOException { 355 return com.google.protobuf.GeneratedMessageV3 356 .parseDelimitedWithIOException(PARSER, input); 357 } parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)358 public static io.grpc.channelz.v1.ChannelTrace parseDelimitedFrom( 359 java.io.InputStream input, 360 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 361 throws java.io.IOException { 362 return com.google.protobuf.GeneratedMessageV3 363 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); 364 } parseFrom( com.google.protobuf.CodedInputStream input)365 public static io.grpc.channelz.v1.ChannelTrace parseFrom( 366 com.google.protobuf.CodedInputStream input) 367 throws java.io.IOException { 368 return com.google.protobuf.GeneratedMessageV3 369 .parseWithIOException(PARSER, input); 370 } parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)371 public static io.grpc.channelz.v1.ChannelTrace parseFrom( 372 com.google.protobuf.CodedInputStream input, 373 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 374 throws java.io.IOException { 375 return com.google.protobuf.GeneratedMessageV3 376 .parseWithIOException(PARSER, input, extensionRegistry); 377 } 378 newBuilderForType()379 public Builder newBuilderForType() { return newBuilder(); } newBuilder()380 public static Builder newBuilder() { 381 return DEFAULT_INSTANCE.toBuilder(); 382 } newBuilder(io.grpc.channelz.v1.ChannelTrace prototype)383 public static Builder newBuilder(io.grpc.channelz.v1.ChannelTrace prototype) { 384 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 385 } toBuilder()386 public Builder toBuilder() { 387 return this == DEFAULT_INSTANCE 388 ? new Builder() : new Builder().mergeFrom(this); 389 } 390 391 @java.lang.Override newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)392 protected Builder newBuilderForType( 393 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 394 Builder builder = new Builder(parent); 395 return builder; 396 } 397 /** 398 * <pre> 399 * ChannelTrace represents the recent events that have occurred on the channel. 400 * </pre> 401 * 402 * Protobuf type {@code grpc.channelz.v1.ChannelTrace} 403 */ 404 public static final class Builder extends 405 com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements 406 // @@protoc_insertion_point(builder_implements:grpc.channelz.v1.ChannelTrace) 407 io.grpc.channelz.v1.ChannelTraceOrBuilder { 408 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()409 getDescriptor() { 410 return io.grpc.channelz.v1.ChannelzProto.internal_static_grpc_channelz_v1_ChannelTrace_descriptor; 411 } 412 413 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()414 internalGetFieldAccessorTable() { 415 return io.grpc.channelz.v1.ChannelzProto.internal_static_grpc_channelz_v1_ChannelTrace_fieldAccessorTable 416 .ensureFieldAccessorsInitialized( 417 io.grpc.channelz.v1.ChannelTrace.class, io.grpc.channelz.v1.ChannelTrace.Builder.class); 418 } 419 420 // Construct using io.grpc.channelz.v1.ChannelTrace.newBuilder() Builder()421 private Builder() { 422 maybeForceBuilderInitialization(); 423 } 424 Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent)425 private Builder( 426 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 427 super(parent); 428 maybeForceBuilderInitialization(); 429 } maybeForceBuilderInitialization()430 private void maybeForceBuilderInitialization() { 431 if (com.google.protobuf.GeneratedMessageV3 432 .alwaysUseFieldBuilders) { 433 getEventsFieldBuilder(); 434 } 435 } clear()436 public Builder clear() { 437 super.clear(); 438 numEventsLogged_ = 0L; 439 440 if (creationTimestampBuilder_ == null) { 441 creationTimestamp_ = null; 442 } else { 443 creationTimestamp_ = null; 444 creationTimestampBuilder_ = null; 445 } 446 if (eventsBuilder_ == null) { 447 events_ = java.util.Collections.emptyList(); 448 bitField0_ = (bitField0_ & ~0x00000004); 449 } else { 450 eventsBuilder_.clear(); 451 } 452 return this; 453 } 454 455 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()456 getDescriptorForType() { 457 return io.grpc.channelz.v1.ChannelzProto.internal_static_grpc_channelz_v1_ChannelTrace_descriptor; 458 } 459 getDefaultInstanceForType()460 public io.grpc.channelz.v1.ChannelTrace getDefaultInstanceForType() { 461 return io.grpc.channelz.v1.ChannelTrace.getDefaultInstance(); 462 } 463 build()464 public io.grpc.channelz.v1.ChannelTrace build() { 465 io.grpc.channelz.v1.ChannelTrace result = buildPartial(); 466 if (!result.isInitialized()) { 467 throw newUninitializedMessageException(result); 468 } 469 return result; 470 } 471 buildPartial()472 public io.grpc.channelz.v1.ChannelTrace buildPartial() { 473 io.grpc.channelz.v1.ChannelTrace result = new io.grpc.channelz.v1.ChannelTrace(this); 474 int from_bitField0_ = bitField0_; 475 int to_bitField0_ = 0; 476 result.numEventsLogged_ = numEventsLogged_; 477 if (creationTimestampBuilder_ == null) { 478 result.creationTimestamp_ = creationTimestamp_; 479 } else { 480 result.creationTimestamp_ = creationTimestampBuilder_.build(); 481 } 482 if (eventsBuilder_ == null) { 483 if (((bitField0_ & 0x00000004) == 0x00000004)) { 484 events_ = java.util.Collections.unmodifiableList(events_); 485 bitField0_ = (bitField0_ & ~0x00000004); 486 } 487 result.events_ = events_; 488 } else { 489 result.events_ = eventsBuilder_.build(); 490 } 491 result.bitField0_ = to_bitField0_; 492 onBuilt(); 493 return result; 494 } 495 clone()496 public Builder clone() { 497 return (Builder) super.clone(); 498 } setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)499 public Builder setField( 500 com.google.protobuf.Descriptors.FieldDescriptor field, 501 java.lang.Object value) { 502 return (Builder) super.setField(field, value); 503 } clearField( com.google.protobuf.Descriptors.FieldDescriptor field)504 public Builder clearField( 505 com.google.protobuf.Descriptors.FieldDescriptor field) { 506 return (Builder) super.clearField(field); 507 } clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof)508 public Builder clearOneof( 509 com.google.protobuf.Descriptors.OneofDescriptor oneof) { 510 return (Builder) super.clearOneof(oneof); 511 } setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)512 public Builder setRepeatedField( 513 com.google.protobuf.Descriptors.FieldDescriptor field, 514 int index, java.lang.Object value) { 515 return (Builder) super.setRepeatedField(field, index, value); 516 } addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)517 public Builder addRepeatedField( 518 com.google.protobuf.Descriptors.FieldDescriptor field, 519 java.lang.Object value) { 520 return (Builder) super.addRepeatedField(field, value); 521 } mergeFrom(com.google.protobuf.Message other)522 public Builder mergeFrom(com.google.protobuf.Message other) { 523 if (other instanceof io.grpc.channelz.v1.ChannelTrace) { 524 return mergeFrom((io.grpc.channelz.v1.ChannelTrace)other); 525 } else { 526 super.mergeFrom(other); 527 return this; 528 } 529 } 530 mergeFrom(io.grpc.channelz.v1.ChannelTrace other)531 public Builder mergeFrom(io.grpc.channelz.v1.ChannelTrace other) { 532 if (other == io.grpc.channelz.v1.ChannelTrace.getDefaultInstance()) return this; 533 if (other.getNumEventsLogged() != 0L) { 534 setNumEventsLogged(other.getNumEventsLogged()); 535 } 536 if (other.hasCreationTimestamp()) { 537 mergeCreationTimestamp(other.getCreationTimestamp()); 538 } 539 if (eventsBuilder_ == null) { 540 if (!other.events_.isEmpty()) { 541 if (events_.isEmpty()) { 542 events_ = other.events_; 543 bitField0_ = (bitField0_ & ~0x00000004); 544 } else { 545 ensureEventsIsMutable(); 546 events_.addAll(other.events_); 547 } 548 onChanged(); 549 } 550 } else { 551 if (!other.events_.isEmpty()) { 552 if (eventsBuilder_.isEmpty()) { 553 eventsBuilder_.dispose(); 554 eventsBuilder_ = null; 555 events_ = other.events_; 556 bitField0_ = (bitField0_ & ~0x00000004); 557 eventsBuilder_ = 558 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? 559 getEventsFieldBuilder() : null; 560 } else { 561 eventsBuilder_.addAllMessages(other.events_); 562 } 563 } 564 } 565 this.mergeUnknownFields(other.unknownFields); 566 onChanged(); 567 return this; 568 } 569 isInitialized()570 public final boolean isInitialized() { 571 return true; 572 } 573 mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)574 public Builder mergeFrom( 575 com.google.protobuf.CodedInputStream input, 576 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 577 throws java.io.IOException { 578 io.grpc.channelz.v1.ChannelTrace parsedMessage = null; 579 try { 580 parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); 581 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 582 parsedMessage = (io.grpc.channelz.v1.ChannelTrace) e.getUnfinishedMessage(); 583 throw e.unwrapIOException(); 584 } finally { 585 if (parsedMessage != null) { 586 mergeFrom(parsedMessage); 587 } 588 } 589 return this; 590 } 591 private int bitField0_; 592 593 private long numEventsLogged_ ; 594 /** 595 * <pre> 596 * Number of events ever logged in this tracing object. This can differ from 597 * events.size() because events can be overwritten or garbage collected by 598 * implementations. 599 * </pre> 600 * 601 * <code>int64 num_events_logged = 1;</code> 602 */ getNumEventsLogged()603 public long getNumEventsLogged() { 604 return numEventsLogged_; 605 } 606 /** 607 * <pre> 608 * Number of events ever logged in this tracing object. This can differ from 609 * events.size() because events can be overwritten or garbage collected by 610 * implementations. 611 * </pre> 612 * 613 * <code>int64 num_events_logged = 1;</code> 614 */ setNumEventsLogged(long value)615 public Builder setNumEventsLogged(long value) { 616 617 numEventsLogged_ = value; 618 onChanged(); 619 return this; 620 } 621 /** 622 * <pre> 623 * Number of events ever logged in this tracing object. This can differ from 624 * events.size() because events can be overwritten or garbage collected by 625 * implementations. 626 * </pre> 627 * 628 * <code>int64 num_events_logged = 1;</code> 629 */ clearNumEventsLogged()630 public Builder clearNumEventsLogged() { 631 632 numEventsLogged_ = 0L; 633 onChanged(); 634 return this; 635 } 636 637 private com.google.protobuf.Timestamp creationTimestamp_ = null; 638 private com.google.protobuf.SingleFieldBuilderV3< 639 com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> creationTimestampBuilder_; 640 /** 641 * <pre> 642 * Time that this channel was created. 643 * </pre> 644 * 645 * <code>.google.protobuf.Timestamp creation_timestamp = 2;</code> 646 */ hasCreationTimestamp()647 public boolean hasCreationTimestamp() { 648 return creationTimestampBuilder_ != null || creationTimestamp_ != null; 649 } 650 /** 651 * <pre> 652 * Time that this channel was created. 653 * </pre> 654 * 655 * <code>.google.protobuf.Timestamp creation_timestamp = 2;</code> 656 */ getCreationTimestamp()657 public com.google.protobuf.Timestamp getCreationTimestamp() { 658 if (creationTimestampBuilder_ == null) { 659 return creationTimestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : creationTimestamp_; 660 } else { 661 return creationTimestampBuilder_.getMessage(); 662 } 663 } 664 /** 665 * <pre> 666 * Time that this channel was created. 667 * </pre> 668 * 669 * <code>.google.protobuf.Timestamp creation_timestamp = 2;</code> 670 */ setCreationTimestamp(com.google.protobuf.Timestamp value)671 public Builder setCreationTimestamp(com.google.protobuf.Timestamp value) { 672 if (creationTimestampBuilder_ == null) { 673 if (value == null) { 674 throw new NullPointerException(); 675 } 676 creationTimestamp_ = value; 677 onChanged(); 678 } else { 679 creationTimestampBuilder_.setMessage(value); 680 } 681 682 return this; 683 } 684 /** 685 * <pre> 686 * Time that this channel was created. 687 * </pre> 688 * 689 * <code>.google.protobuf.Timestamp creation_timestamp = 2;</code> 690 */ setCreationTimestamp( com.google.protobuf.Timestamp.Builder builderForValue)691 public Builder setCreationTimestamp( 692 com.google.protobuf.Timestamp.Builder builderForValue) { 693 if (creationTimestampBuilder_ == null) { 694 creationTimestamp_ = builderForValue.build(); 695 onChanged(); 696 } else { 697 creationTimestampBuilder_.setMessage(builderForValue.build()); 698 } 699 700 return this; 701 } 702 /** 703 * <pre> 704 * Time that this channel was created. 705 * </pre> 706 * 707 * <code>.google.protobuf.Timestamp creation_timestamp = 2;</code> 708 */ mergeCreationTimestamp(com.google.protobuf.Timestamp value)709 public Builder mergeCreationTimestamp(com.google.protobuf.Timestamp value) { 710 if (creationTimestampBuilder_ == null) { 711 if (creationTimestamp_ != null) { 712 creationTimestamp_ = 713 com.google.protobuf.Timestamp.newBuilder(creationTimestamp_).mergeFrom(value).buildPartial(); 714 } else { 715 creationTimestamp_ = value; 716 } 717 onChanged(); 718 } else { 719 creationTimestampBuilder_.mergeFrom(value); 720 } 721 722 return this; 723 } 724 /** 725 * <pre> 726 * Time that this channel was created. 727 * </pre> 728 * 729 * <code>.google.protobuf.Timestamp creation_timestamp = 2;</code> 730 */ clearCreationTimestamp()731 public Builder clearCreationTimestamp() { 732 if (creationTimestampBuilder_ == null) { 733 creationTimestamp_ = null; 734 onChanged(); 735 } else { 736 creationTimestamp_ = null; 737 creationTimestampBuilder_ = null; 738 } 739 740 return this; 741 } 742 /** 743 * <pre> 744 * Time that this channel was created. 745 * </pre> 746 * 747 * <code>.google.protobuf.Timestamp creation_timestamp = 2;</code> 748 */ getCreationTimestampBuilder()749 public com.google.protobuf.Timestamp.Builder getCreationTimestampBuilder() { 750 751 onChanged(); 752 return getCreationTimestampFieldBuilder().getBuilder(); 753 } 754 /** 755 * <pre> 756 * Time that this channel was created. 757 * </pre> 758 * 759 * <code>.google.protobuf.Timestamp creation_timestamp = 2;</code> 760 */ getCreationTimestampOrBuilder()761 public com.google.protobuf.TimestampOrBuilder getCreationTimestampOrBuilder() { 762 if (creationTimestampBuilder_ != null) { 763 return creationTimestampBuilder_.getMessageOrBuilder(); 764 } else { 765 return creationTimestamp_ == null ? 766 com.google.protobuf.Timestamp.getDefaultInstance() : creationTimestamp_; 767 } 768 } 769 /** 770 * <pre> 771 * Time that this channel was created. 772 * </pre> 773 * 774 * <code>.google.protobuf.Timestamp creation_timestamp = 2;</code> 775 */ 776 private com.google.protobuf.SingleFieldBuilderV3< 777 com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getCreationTimestampFieldBuilder()778 getCreationTimestampFieldBuilder() { 779 if (creationTimestampBuilder_ == null) { 780 creationTimestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< 781 com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( 782 getCreationTimestamp(), 783 getParentForChildren(), 784 isClean()); 785 creationTimestamp_ = null; 786 } 787 return creationTimestampBuilder_; 788 } 789 790 private java.util.List<io.grpc.channelz.v1.ChannelTraceEvent> events_ = 791 java.util.Collections.emptyList(); ensureEventsIsMutable()792 private void ensureEventsIsMutable() { 793 if (!((bitField0_ & 0x00000004) == 0x00000004)) { 794 events_ = new java.util.ArrayList<io.grpc.channelz.v1.ChannelTraceEvent>(events_); 795 bitField0_ |= 0x00000004; 796 } 797 } 798 799 private com.google.protobuf.RepeatedFieldBuilderV3< 800 io.grpc.channelz.v1.ChannelTraceEvent, io.grpc.channelz.v1.ChannelTraceEvent.Builder, io.grpc.channelz.v1.ChannelTraceEventOrBuilder> eventsBuilder_; 801 802 /** 803 * <pre> 804 * List of events that have occurred on this channel. 805 * </pre> 806 * 807 * <code>repeated .grpc.channelz.v1.ChannelTraceEvent events = 3;</code> 808 */ getEventsList()809 public java.util.List<io.grpc.channelz.v1.ChannelTraceEvent> getEventsList() { 810 if (eventsBuilder_ == null) { 811 return java.util.Collections.unmodifiableList(events_); 812 } else { 813 return eventsBuilder_.getMessageList(); 814 } 815 } 816 /** 817 * <pre> 818 * List of events that have occurred on this channel. 819 * </pre> 820 * 821 * <code>repeated .grpc.channelz.v1.ChannelTraceEvent events = 3;</code> 822 */ getEventsCount()823 public int getEventsCount() { 824 if (eventsBuilder_ == null) { 825 return events_.size(); 826 } else { 827 return eventsBuilder_.getCount(); 828 } 829 } 830 /** 831 * <pre> 832 * List of events that have occurred on this channel. 833 * </pre> 834 * 835 * <code>repeated .grpc.channelz.v1.ChannelTraceEvent events = 3;</code> 836 */ getEvents(int index)837 public io.grpc.channelz.v1.ChannelTraceEvent getEvents(int index) { 838 if (eventsBuilder_ == null) { 839 return events_.get(index); 840 } else { 841 return eventsBuilder_.getMessage(index); 842 } 843 } 844 /** 845 * <pre> 846 * List of events that have occurred on this channel. 847 * </pre> 848 * 849 * <code>repeated .grpc.channelz.v1.ChannelTraceEvent events = 3;</code> 850 */ setEvents( int index, io.grpc.channelz.v1.ChannelTraceEvent value)851 public Builder setEvents( 852 int index, io.grpc.channelz.v1.ChannelTraceEvent value) { 853 if (eventsBuilder_ == null) { 854 if (value == null) { 855 throw new NullPointerException(); 856 } 857 ensureEventsIsMutable(); 858 events_.set(index, value); 859 onChanged(); 860 } else { 861 eventsBuilder_.setMessage(index, value); 862 } 863 return this; 864 } 865 /** 866 * <pre> 867 * List of events that have occurred on this channel. 868 * </pre> 869 * 870 * <code>repeated .grpc.channelz.v1.ChannelTraceEvent events = 3;</code> 871 */ setEvents( int index, io.grpc.channelz.v1.ChannelTraceEvent.Builder builderForValue)872 public Builder setEvents( 873 int index, io.grpc.channelz.v1.ChannelTraceEvent.Builder builderForValue) { 874 if (eventsBuilder_ == null) { 875 ensureEventsIsMutable(); 876 events_.set(index, builderForValue.build()); 877 onChanged(); 878 } else { 879 eventsBuilder_.setMessage(index, builderForValue.build()); 880 } 881 return this; 882 } 883 /** 884 * <pre> 885 * List of events that have occurred on this channel. 886 * </pre> 887 * 888 * <code>repeated .grpc.channelz.v1.ChannelTraceEvent events = 3;</code> 889 */ addEvents(io.grpc.channelz.v1.ChannelTraceEvent value)890 public Builder addEvents(io.grpc.channelz.v1.ChannelTraceEvent value) { 891 if (eventsBuilder_ == null) { 892 if (value == null) { 893 throw new NullPointerException(); 894 } 895 ensureEventsIsMutable(); 896 events_.add(value); 897 onChanged(); 898 } else { 899 eventsBuilder_.addMessage(value); 900 } 901 return this; 902 } 903 /** 904 * <pre> 905 * List of events that have occurred on this channel. 906 * </pre> 907 * 908 * <code>repeated .grpc.channelz.v1.ChannelTraceEvent events = 3;</code> 909 */ addEvents( int index, io.grpc.channelz.v1.ChannelTraceEvent value)910 public Builder addEvents( 911 int index, io.grpc.channelz.v1.ChannelTraceEvent value) { 912 if (eventsBuilder_ == null) { 913 if (value == null) { 914 throw new NullPointerException(); 915 } 916 ensureEventsIsMutable(); 917 events_.add(index, value); 918 onChanged(); 919 } else { 920 eventsBuilder_.addMessage(index, value); 921 } 922 return this; 923 } 924 /** 925 * <pre> 926 * List of events that have occurred on this channel. 927 * </pre> 928 * 929 * <code>repeated .grpc.channelz.v1.ChannelTraceEvent events = 3;</code> 930 */ addEvents( io.grpc.channelz.v1.ChannelTraceEvent.Builder builderForValue)931 public Builder addEvents( 932 io.grpc.channelz.v1.ChannelTraceEvent.Builder builderForValue) { 933 if (eventsBuilder_ == null) { 934 ensureEventsIsMutable(); 935 events_.add(builderForValue.build()); 936 onChanged(); 937 } else { 938 eventsBuilder_.addMessage(builderForValue.build()); 939 } 940 return this; 941 } 942 /** 943 * <pre> 944 * List of events that have occurred on this channel. 945 * </pre> 946 * 947 * <code>repeated .grpc.channelz.v1.ChannelTraceEvent events = 3;</code> 948 */ addEvents( int index, io.grpc.channelz.v1.ChannelTraceEvent.Builder builderForValue)949 public Builder addEvents( 950 int index, io.grpc.channelz.v1.ChannelTraceEvent.Builder builderForValue) { 951 if (eventsBuilder_ == null) { 952 ensureEventsIsMutable(); 953 events_.add(index, builderForValue.build()); 954 onChanged(); 955 } else { 956 eventsBuilder_.addMessage(index, builderForValue.build()); 957 } 958 return this; 959 } 960 /** 961 * <pre> 962 * List of events that have occurred on this channel. 963 * </pre> 964 * 965 * <code>repeated .grpc.channelz.v1.ChannelTraceEvent events = 3;</code> 966 */ addAllEvents( java.lang.Iterable<? extends io.grpc.channelz.v1.ChannelTraceEvent> values)967 public Builder addAllEvents( 968 java.lang.Iterable<? extends io.grpc.channelz.v1.ChannelTraceEvent> values) { 969 if (eventsBuilder_ == null) { 970 ensureEventsIsMutable(); 971 com.google.protobuf.AbstractMessageLite.Builder.addAll( 972 values, events_); 973 onChanged(); 974 } else { 975 eventsBuilder_.addAllMessages(values); 976 } 977 return this; 978 } 979 /** 980 * <pre> 981 * List of events that have occurred on this channel. 982 * </pre> 983 * 984 * <code>repeated .grpc.channelz.v1.ChannelTraceEvent events = 3;</code> 985 */ clearEvents()986 public Builder clearEvents() { 987 if (eventsBuilder_ == null) { 988 events_ = java.util.Collections.emptyList(); 989 bitField0_ = (bitField0_ & ~0x00000004); 990 onChanged(); 991 } else { 992 eventsBuilder_.clear(); 993 } 994 return this; 995 } 996 /** 997 * <pre> 998 * List of events that have occurred on this channel. 999 * </pre> 1000 * 1001 * <code>repeated .grpc.channelz.v1.ChannelTraceEvent events = 3;</code> 1002 */ removeEvents(int index)1003 public Builder removeEvents(int index) { 1004 if (eventsBuilder_ == null) { 1005 ensureEventsIsMutable(); 1006 events_.remove(index); 1007 onChanged(); 1008 } else { 1009 eventsBuilder_.remove(index); 1010 } 1011 return this; 1012 } 1013 /** 1014 * <pre> 1015 * List of events that have occurred on this channel. 1016 * </pre> 1017 * 1018 * <code>repeated .grpc.channelz.v1.ChannelTraceEvent events = 3;</code> 1019 */ getEventsBuilder( int index)1020 public io.grpc.channelz.v1.ChannelTraceEvent.Builder getEventsBuilder( 1021 int index) { 1022 return getEventsFieldBuilder().getBuilder(index); 1023 } 1024 /** 1025 * <pre> 1026 * List of events that have occurred on this channel. 1027 * </pre> 1028 * 1029 * <code>repeated .grpc.channelz.v1.ChannelTraceEvent events = 3;</code> 1030 */ getEventsOrBuilder( int index)1031 public io.grpc.channelz.v1.ChannelTraceEventOrBuilder getEventsOrBuilder( 1032 int index) { 1033 if (eventsBuilder_ == null) { 1034 return events_.get(index); } else { 1035 return eventsBuilder_.getMessageOrBuilder(index); 1036 } 1037 } 1038 /** 1039 * <pre> 1040 * List of events that have occurred on this channel. 1041 * </pre> 1042 * 1043 * <code>repeated .grpc.channelz.v1.ChannelTraceEvent events = 3;</code> 1044 */ 1045 public java.util.List<? extends io.grpc.channelz.v1.ChannelTraceEventOrBuilder> getEventsOrBuilderList()1046 getEventsOrBuilderList() { 1047 if (eventsBuilder_ != null) { 1048 return eventsBuilder_.getMessageOrBuilderList(); 1049 } else { 1050 return java.util.Collections.unmodifiableList(events_); 1051 } 1052 } 1053 /** 1054 * <pre> 1055 * List of events that have occurred on this channel. 1056 * </pre> 1057 * 1058 * <code>repeated .grpc.channelz.v1.ChannelTraceEvent events = 3;</code> 1059 */ addEventsBuilder()1060 public io.grpc.channelz.v1.ChannelTraceEvent.Builder addEventsBuilder() { 1061 return getEventsFieldBuilder().addBuilder( 1062 io.grpc.channelz.v1.ChannelTraceEvent.getDefaultInstance()); 1063 } 1064 /** 1065 * <pre> 1066 * List of events that have occurred on this channel. 1067 * </pre> 1068 * 1069 * <code>repeated .grpc.channelz.v1.ChannelTraceEvent events = 3;</code> 1070 */ addEventsBuilder( int index)1071 public io.grpc.channelz.v1.ChannelTraceEvent.Builder addEventsBuilder( 1072 int index) { 1073 return getEventsFieldBuilder().addBuilder( 1074 index, io.grpc.channelz.v1.ChannelTraceEvent.getDefaultInstance()); 1075 } 1076 /** 1077 * <pre> 1078 * List of events that have occurred on this channel. 1079 * </pre> 1080 * 1081 * <code>repeated .grpc.channelz.v1.ChannelTraceEvent events = 3;</code> 1082 */ 1083 public java.util.List<io.grpc.channelz.v1.ChannelTraceEvent.Builder> getEventsBuilderList()1084 getEventsBuilderList() { 1085 return getEventsFieldBuilder().getBuilderList(); 1086 } 1087 private com.google.protobuf.RepeatedFieldBuilderV3< 1088 io.grpc.channelz.v1.ChannelTraceEvent, io.grpc.channelz.v1.ChannelTraceEvent.Builder, io.grpc.channelz.v1.ChannelTraceEventOrBuilder> getEventsFieldBuilder()1089 getEventsFieldBuilder() { 1090 if (eventsBuilder_ == null) { 1091 eventsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< 1092 io.grpc.channelz.v1.ChannelTraceEvent, io.grpc.channelz.v1.ChannelTraceEvent.Builder, io.grpc.channelz.v1.ChannelTraceEventOrBuilder>( 1093 events_, 1094 ((bitField0_ & 0x00000004) == 0x00000004), 1095 getParentForChildren(), 1096 isClean()); 1097 events_ = null; 1098 } 1099 return eventsBuilder_; 1100 } setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1101 public final Builder setUnknownFields( 1102 final com.google.protobuf.UnknownFieldSet unknownFields) { 1103 return super.setUnknownFieldsProto3(unknownFields); 1104 } 1105 mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)1106 public final Builder mergeUnknownFields( 1107 final com.google.protobuf.UnknownFieldSet unknownFields) { 1108 return super.mergeUnknownFields(unknownFields); 1109 } 1110 1111 1112 // @@protoc_insertion_point(builder_scope:grpc.channelz.v1.ChannelTrace) 1113 } 1114 1115 // @@protoc_insertion_point(class_scope:grpc.channelz.v1.ChannelTrace) 1116 private static final io.grpc.channelz.v1.ChannelTrace DEFAULT_INSTANCE; 1117 static { 1118 DEFAULT_INSTANCE = new io.grpc.channelz.v1.ChannelTrace(); 1119 } 1120 getDefaultInstance()1121 public static io.grpc.channelz.v1.ChannelTrace getDefaultInstance() { 1122 return DEFAULT_INSTANCE; 1123 } 1124 1125 private static final com.google.protobuf.Parser<ChannelTrace> 1126 PARSER = new com.google.protobuf.AbstractParser<ChannelTrace>() { 1127 public ChannelTrace parsePartialFrom( 1128 com.google.protobuf.CodedInputStream input, 1129 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1130 throws com.google.protobuf.InvalidProtocolBufferException { 1131 return new ChannelTrace(input, extensionRegistry); 1132 } 1133 }; 1134 parser()1135 public static com.google.protobuf.Parser<ChannelTrace> parser() { 1136 return PARSER; 1137 } 1138 1139 @java.lang.Override getParserForType()1140 public com.google.protobuf.Parser<ChannelTrace> getParserForType() { 1141 return PARSER; 1142 } 1143 getDefaultInstanceForType()1144 public io.grpc.channelz.v1.ChannelTrace getDefaultInstanceForType() { 1145 return DEFAULT_INSTANCE; 1146 } 1147 1148 } 1149 1150