All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.grpc.channelz.v1.ChannelTraceEvent Maven / Gradle / Ivy

There is a newer version: 1.68.1
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: grpc/channelz/v1/channelz.proto

// Protobuf Java Version: 3.25.1
package io.grpc.channelz.v1;

/**
 * 
 * A trace event is an interesting thing that happened to a channel or
 * subchannel, such as creation, address resolution, subchannel creation, etc.
 * 
* * Protobuf type {@code grpc.channelz.v1.ChannelTraceEvent} */ public final class ChannelTraceEvent extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:grpc.channelz.v1.ChannelTraceEvent) ChannelTraceEventOrBuilder { private static final long serialVersionUID = 0L; // Use ChannelTraceEvent.newBuilder() to construct. private ChannelTraceEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private ChannelTraceEvent() { description_ = ""; severity_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new ChannelTraceEvent(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.grpc.channelz.v1.ChannelzProto.internal_static_grpc_channelz_v1_ChannelTraceEvent_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.grpc.channelz.v1.ChannelzProto.internal_static_grpc_channelz_v1_ChannelTraceEvent_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grpc.channelz.v1.ChannelTraceEvent.class, io.grpc.channelz.v1.ChannelTraceEvent.Builder.class); } /** *
   * The supported severity levels of trace events.
   * 
* * Protobuf enum {@code grpc.channelz.v1.ChannelTraceEvent.Severity} */ public enum Severity implements com.google.protobuf.ProtocolMessageEnum { /** * CT_UNKNOWN = 0; */ CT_UNKNOWN(0), /** * CT_INFO = 1; */ CT_INFO(1), /** * CT_WARNING = 2; */ CT_WARNING(2), /** * CT_ERROR = 3; */ CT_ERROR(3), UNRECOGNIZED(-1), ; /** * CT_UNKNOWN = 0; */ public static final int CT_UNKNOWN_VALUE = 0; /** * CT_INFO = 1; */ public static final int CT_INFO_VALUE = 1; /** * CT_WARNING = 2; */ public static final int CT_WARNING_VALUE = 2; /** * CT_ERROR = 3; */ public static final int CT_ERROR_VALUE = 3; public final int getNumber() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } return value; } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static Severity valueOf(int value) { return forNumber(value); } /** * @param value The numeric wire value of the corresponding enum entry. * @return The enum associated with the given numeric wire value. */ public static Severity forNumber(int value) { switch (value) { case 0: return CT_UNKNOWN; case 1: return CT_INFO; case 2: return CT_WARNING; case 3: return CT_ERROR; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< Severity> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public Severity findValueByNumber(int number) { return Severity.forNumber(number); } }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { if (this == UNRECOGNIZED) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } return getDescriptor().getValues().get(ordinal()); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { return getDescriptor(); } public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { return io.grpc.channelz.v1.ChannelTraceEvent.getDescriptor().getEnumTypes().get(0); } private static final Severity[] VALUES = values(); public static Severity valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { if (desc.getType() != getDescriptor()) { throw new java.lang.IllegalArgumentException( "EnumValueDescriptor is not for this type."); } if (desc.getIndex() == -1) { return UNRECOGNIZED; } return VALUES[desc.getIndex()]; } private final int value; private Severity(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:grpc.channelz.v1.ChannelTraceEvent.Severity) } private int bitField0_; private int childRefCase_ = 0; @SuppressWarnings("serial") private java.lang.Object childRef_; public enum ChildRefCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { CHANNEL_REF(4), SUBCHANNEL_REF(5), CHILDREF_NOT_SET(0); private final int value; private ChildRefCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static ChildRefCase valueOf(int value) { return forNumber(value); } public static ChildRefCase forNumber(int value) { switch (value) { case 4: return CHANNEL_REF; case 5: return SUBCHANNEL_REF; case 0: return CHILDREF_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public ChildRefCase getChildRefCase() { return ChildRefCase.forNumber( childRefCase_); } public static final int DESCRIPTION_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object description_ = ""; /** *
   * High level description of the event.
   * 
* * string description = 1; * @return The description. */ @java.lang.Override public java.lang.String getDescription() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; } } /** *
   * High level description of the event.
   * 
* * string description = 1; * @return The bytes for description. */ @java.lang.Override public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SEVERITY_FIELD_NUMBER = 2; private int severity_ = 0; /** *
   * the severity of the trace event
   * 
* * .grpc.channelz.v1.ChannelTraceEvent.Severity severity = 2; * @return The enum numeric value on the wire for severity. */ @java.lang.Override public int getSeverityValue() { return severity_; } /** *
   * the severity of the trace event
   * 
* * .grpc.channelz.v1.ChannelTraceEvent.Severity severity = 2; * @return The severity. */ @java.lang.Override public io.grpc.channelz.v1.ChannelTraceEvent.Severity getSeverity() { io.grpc.channelz.v1.ChannelTraceEvent.Severity result = io.grpc.channelz.v1.ChannelTraceEvent.Severity.forNumber(severity_); return result == null ? io.grpc.channelz.v1.ChannelTraceEvent.Severity.UNRECOGNIZED : result; } public static final int TIMESTAMP_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp timestamp_; /** *
   * When this event occurred.
   * 
* * .google.protobuf.Timestamp timestamp = 3; * @return Whether the timestamp field is set. */ @java.lang.Override public boolean hasTimestamp() { return ((bitField0_ & 0x00000001) != 0); } /** *
   * When this event occurred.
   * 
* * .google.protobuf.Timestamp timestamp = 3; * @return The timestamp. */ @java.lang.Override public com.google.protobuf.Timestamp getTimestamp() { return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; } /** *
   * When this event occurred.
   * 
* * .google.protobuf.Timestamp timestamp = 3; */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; } public static final int CHANNEL_REF_FIELD_NUMBER = 4; /** * .grpc.channelz.v1.ChannelRef channel_ref = 4; * @return Whether the channelRef field is set. */ @java.lang.Override public boolean hasChannelRef() { return childRefCase_ == 4; } /** * .grpc.channelz.v1.ChannelRef channel_ref = 4; * @return The channelRef. */ @java.lang.Override public io.grpc.channelz.v1.ChannelRef getChannelRef() { if (childRefCase_ == 4) { return (io.grpc.channelz.v1.ChannelRef) childRef_; } return io.grpc.channelz.v1.ChannelRef.getDefaultInstance(); } /** * .grpc.channelz.v1.ChannelRef channel_ref = 4; */ @java.lang.Override public io.grpc.channelz.v1.ChannelRefOrBuilder getChannelRefOrBuilder() { if (childRefCase_ == 4) { return (io.grpc.channelz.v1.ChannelRef) childRef_; } return io.grpc.channelz.v1.ChannelRef.getDefaultInstance(); } public static final int SUBCHANNEL_REF_FIELD_NUMBER = 5; /** * .grpc.channelz.v1.SubchannelRef subchannel_ref = 5; * @return Whether the subchannelRef field is set. */ @java.lang.Override public boolean hasSubchannelRef() { return childRefCase_ == 5; } /** * .grpc.channelz.v1.SubchannelRef subchannel_ref = 5; * @return The subchannelRef. */ @java.lang.Override public io.grpc.channelz.v1.SubchannelRef getSubchannelRef() { if (childRefCase_ == 5) { return (io.grpc.channelz.v1.SubchannelRef) childRef_; } return io.grpc.channelz.v1.SubchannelRef.getDefaultInstance(); } /** * .grpc.channelz.v1.SubchannelRef subchannel_ref = 5; */ @java.lang.Override public io.grpc.channelz.v1.SubchannelRefOrBuilder getSubchannelRefOrBuilder() { if (childRefCase_ == 5) { return (io.grpc.channelz.v1.SubchannelRef) childRef_; } return io.grpc.channelz.v1.SubchannelRef.getDefaultInstance(); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_); } if (severity_ != io.grpc.channelz.v1.ChannelTraceEvent.Severity.CT_UNKNOWN.getNumber()) { output.writeEnum(2, severity_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(3, getTimestamp()); } if (childRefCase_ == 4) { output.writeMessage(4, (io.grpc.channelz.v1.ChannelRef) childRef_); } if (childRefCase_ == 5) { output.writeMessage(5, (io.grpc.channelz.v1.SubchannelRef) childRef_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_); } if (severity_ != io.grpc.channelz.v1.ChannelTraceEvent.Severity.CT_UNKNOWN.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(2, severity_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getTimestamp()); } if (childRefCase_ == 4) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, (io.grpc.channelz.v1.ChannelRef) childRef_); } if (childRefCase_ == 5) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, (io.grpc.channelz.v1.SubchannelRef) childRef_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.grpc.channelz.v1.ChannelTraceEvent)) { return super.equals(obj); } io.grpc.channelz.v1.ChannelTraceEvent other = (io.grpc.channelz.v1.ChannelTraceEvent) obj; if (!getDescription() .equals(other.getDescription())) return false; if (severity_ != other.severity_) return false; if (hasTimestamp() != other.hasTimestamp()) return false; if (hasTimestamp()) { if (!getTimestamp() .equals(other.getTimestamp())) return false; } if (!getChildRefCase().equals(other.getChildRefCase())) return false; switch (childRefCase_) { case 4: if (!getChannelRef() .equals(other.getChannelRef())) return false; break; case 5: if (!getSubchannelRef() .equals(other.getSubchannelRef())) return false; break; case 0: default: } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); hash = (37 * hash) + SEVERITY_FIELD_NUMBER; hash = (53 * hash) + severity_; if (hasTimestamp()) { hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER; hash = (53 * hash) + getTimestamp().hashCode(); } switch (childRefCase_) { case 4: hash = (37 * hash) + CHANNEL_REF_FIELD_NUMBER; hash = (53 * hash) + getChannelRef().hashCode(); break; case 5: hash = (37 * hash) + SUBCHANNEL_REF_FIELD_NUMBER; hash = (53 * hash) + getSubchannelRef().hashCode(); break; case 0: default: } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static io.grpc.channelz.v1.ChannelTraceEvent parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.grpc.channelz.v1.ChannelTraceEvent parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.grpc.channelz.v1.ChannelTraceEvent parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.grpc.channelz.v1.ChannelTraceEvent parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.grpc.channelz.v1.ChannelTraceEvent parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.grpc.channelz.v1.ChannelTraceEvent parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.grpc.channelz.v1.ChannelTraceEvent parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.grpc.channelz.v1.ChannelTraceEvent parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static io.grpc.channelz.v1.ChannelTraceEvent parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.grpc.channelz.v1.ChannelTraceEvent parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.grpc.channelz.v1.ChannelTraceEvent parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.grpc.channelz.v1.ChannelTraceEvent parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(io.grpc.channelz.v1.ChannelTraceEvent prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * A trace event is an interesting thing that happened to a channel or
   * subchannel, such as creation, address resolution, subchannel creation, etc.
   * 
* * Protobuf type {@code grpc.channelz.v1.ChannelTraceEvent} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:grpc.channelz.v1.ChannelTraceEvent) io.grpc.channelz.v1.ChannelTraceEventOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.grpc.channelz.v1.ChannelzProto.internal_static_grpc_channelz_v1_ChannelTraceEvent_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.grpc.channelz.v1.ChannelzProto.internal_static_grpc_channelz_v1_ChannelTraceEvent_fieldAccessorTable .ensureFieldAccessorsInitialized( io.grpc.channelz.v1.ChannelTraceEvent.class, io.grpc.channelz.v1.ChannelTraceEvent.Builder.class); } // Construct using io.grpc.channelz.v1.ChannelTraceEvent.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getTimestampFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; description_ = ""; severity_ = 0; timestamp_ = null; if (timestampBuilder_ != null) { timestampBuilder_.dispose(); timestampBuilder_ = null; } if (channelRefBuilder_ != null) { channelRefBuilder_.clear(); } if (subchannelRefBuilder_ != null) { subchannelRefBuilder_.clear(); } childRefCase_ = 0; childRef_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.grpc.channelz.v1.ChannelzProto.internal_static_grpc_channelz_v1_ChannelTraceEvent_descriptor; } @java.lang.Override public io.grpc.channelz.v1.ChannelTraceEvent getDefaultInstanceForType() { return io.grpc.channelz.v1.ChannelTraceEvent.getDefaultInstance(); } @java.lang.Override public io.grpc.channelz.v1.ChannelTraceEvent build() { io.grpc.channelz.v1.ChannelTraceEvent result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.grpc.channelz.v1.ChannelTraceEvent buildPartial() { io.grpc.channelz.v1.ChannelTraceEvent result = new io.grpc.channelz.v1.ChannelTraceEvent(this); if (bitField0_ != 0) { buildPartial0(result); } buildPartialOneofs(result); onBuilt(); return result; } private void buildPartial0(io.grpc.channelz.v1.ChannelTraceEvent result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.description_ = description_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.severity_ = severity_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000004) != 0)) { result.timestamp_ = timestampBuilder_ == null ? timestamp_ : timestampBuilder_.build(); to_bitField0_ |= 0x00000001; } result.bitField0_ |= to_bitField0_; } private void buildPartialOneofs(io.grpc.channelz.v1.ChannelTraceEvent result) { result.childRefCase_ = childRefCase_; result.childRef_ = this.childRef_; if (childRefCase_ == 4 && channelRefBuilder_ != null) { result.childRef_ = channelRefBuilder_.build(); } if (childRefCase_ == 5 && subchannelRefBuilder_ != null) { result.childRef_ = subchannelRefBuilder_.build(); } } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.grpc.channelz.v1.ChannelTraceEvent) { return mergeFrom((io.grpc.channelz.v1.ChannelTraceEvent)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.grpc.channelz.v1.ChannelTraceEvent other) { if (other == io.grpc.channelz.v1.ChannelTraceEvent.getDefaultInstance()) return this; if (!other.getDescription().isEmpty()) { description_ = other.description_; bitField0_ |= 0x00000001; onChanged(); } if (other.severity_ != 0) { setSeverityValue(other.getSeverityValue()); } if (other.hasTimestamp()) { mergeTimestamp(other.getTimestamp()); } switch (other.getChildRefCase()) { case CHANNEL_REF: { mergeChannelRef(other.getChannelRef()); break; } case SUBCHANNEL_REF: { mergeSubchannelRef(other.getSubchannelRef()); break; } case CHILDREF_NOT_SET: { break; } } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { description_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 16: { severity_ = input.readEnum(); bitField0_ |= 0x00000002; break; } // case 16 case 26: { input.readMessage( getTimestampFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000004; break; } // case 26 case 34: { input.readMessage( getChannelRefFieldBuilder().getBuilder(), extensionRegistry); childRefCase_ = 4; break; } // case 34 case 42: { input.readMessage( getSubchannelRefFieldBuilder().getBuilder(), extensionRegistry); childRefCase_ = 5; break; } // case 42 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int childRefCase_ = 0; private java.lang.Object childRef_; public ChildRefCase getChildRefCase() { return ChildRefCase.forNumber( childRefCase_); } public Builder clearChildRef() { childRefCase_ = 0; childRef_ = null; onChanged(); return this; } private int bitField0_; private java.lang.Object description_ = ""; /** *
     * High level description of the event.
     * 
* * string description = 1; * @return The description. */ public java.lang.String getDescription() { java.lang.Object ref = description_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * High level description of the event.
     * 
* * string description = 1; * @return The bytes for description. */ public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * High level description of the event.
     * 
* * string description = 1; * @param value The description to set. * @return This builder for chaining. */ public Builder setDescription( java.lang.String value) { if (value == null) { throw new NullPointerException(); } description_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     * High level description of the event.
     * 
* * string description = 1; * @return This builder for chaining. */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
     * High level description of the event.
     * 
* * string description = 1; * @param value The bytes for description to set. * @return This builder for chaining. */ public Builder setDescriptionBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); description_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private int severity_ = 0; /** *
     * the severity of the trace event
     * 
* * .grpc.channelz.v1.ChannelTraceEvent.Severity severity = 2; * @return The enum numeric value on the wire for severity. */ @java.lang.Override public int getSeverityValue() { return severity_; } /** *
     * the severity of the trace event
     * 
* * .grpc.channelz.v1.ChannelTraceEvent.Severity severity = 2; * @param value The enum numeric value on the wire for severity to set. * @return This builder for chaining. */ public Builder setSeverityValue(int value) { severity_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * the severity of the trace event
     * 
* * .grpc.channelz.v1.ChannelTraceEvent.Severity severity = 2; * @return The severity. */ @java.lang.Override public io.grpc.channelz.v1.ChannelTraceEvent.Severity getSeverity() { io.grpc.channelz.v1.ChannelTraceEvent.Severity result = io.grpc.channelz.v1.ChannelTraceEvent.Severity.forNumber(severity_); return result == null ? io.grpc.channelz.v1.ChannelTraceEvent.Severity.UNRECOGNIZED : result; } /** *
     * the severity of the trace event
     * 
* * .grpc.channelz.v1.ChannelTraceEvent.Severity severity = 2; * @param value The severity to set. * @return This builder for chaining. */ public Builder setSeverity(io.grpc.channelz.v1.ChannelTraceEvent.Severity value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; severity_ = value.getNumber(); onChanged(); return this; } /** *
     * the severity of the trace event
     * 
* * .grpc.channelz.v1.ChannelTraceEvent.Severity severity = 2; * @return This builder for chaining. */ public Builder clearSeverity() { bitField0_ = (bitField0_ & ~0x00000002); severity_ = 0; onChanged(); return this; } private com.google.protobuf.Timestamp timestamp_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timestampBuilder_; /** *
     * When this event occurred.
     * 
* * .google.protobuf.Timestamp timestamp = 3; * @return Whether the timestamp field is set. */ public boolean hasTimestamp() { return ((bitField0_ & 0x00000004) != 0); } /** *
     * When this event occurred.
     * 
* * .google.protobuf.Timestamp timestamp = 3; * @return The timestamp. */ public com.google.protobuf.Timestamp getTimestamp() { if (timestampBuilder_ == null) { return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; } else { return timestampBuilder_.getMessage(); } } /** *
     * When this event occurred.
     * 
* * .google.protobuf.Timestamp timestamp = 3; */ public Builder setTimestamp(com.google.protobuf.Timestamp value) { if (timestampBuilder_ == null) { if (value == null) { throw new NullPointerException(); } timestamp_ = value; } else { timestampBuilder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     * When this event occurred.
     * 
* * .google.protobuf.Timestamp timestamp = 3; */ public Builder setTimestamp( com.google.protobuf.Timestamp.Builder builderForValue) { if (timestampBuilder_ == null) { timestamp_ = builderForValue.build(); } else { timestampBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     * When this event occurred.
     * 
* * .google.protobuf.Timestamp timestamp = 3; */ public Builder mergeTimestamp(com.google.protobuf.Timestamp value) { if (timestampBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && timestamp_ != null && timestamp_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getTimestampBuilder().mergeFrom(value); } else { timestamp_ = value; } } else { timestampBuilder_.mergeFrom(value); } if (timestamp_ != null) { bitField0_ |= 0x00000004; onChanged(); } return this; } /** *
     * When this event occurred.
     * 
* * .google.protobuf.Timestamp timestamp = 3; */ public Builder clearTimestamp() { bitField0_ = (bitField0_ & ~0x00000004); timestamp_ = null; if (timestampBuilder_ != null) { timestampBuilder_.dispose(); timestampBuilder_ = null; } onChanged(); return this; } /** *
     * When this event occurred.
     * 
* * .google.protobuf.Timestamp timestamp = 3; */ public com.google.protobuf.Timestamp.Builder getTimestampBuilder() { bitField0_ |= 0x00000004; onChanged(); return getTimestampFieldBuilder().getBuilder(); } /** *
     * When this event occurred.
     * 
* * .google.protobuf.Timestamp timestamp = 3; */ public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() { if (timestampBuilder_ != null) { return timestampBuilder_.getMessageOrBuilder(); } else { return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_; } } /** *
     * When this event occurred.
     * 
* * .google.protobuf.Timestamp timestamp = 3; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getTimestampFieldBuilder() { if (timestampBuilder_ == null) { timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getTimestamp(), getParentForChildren(), isClean()); timestamp_ = null; } return timestampBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< io.grpc.channelz.v1.ChannelRef, io.grpc.channelz.v1.ChannelRef.Builder, io.grpc.channelz.v1.ChannelRefOrBuilder> channelRefBuilder_; /** * .grpc.channelz.v1.ChannelRef channel_ref = 4; * @return Whether the channelRef field is set. */ @java.lang.Override public boolean hasChannelRef() { return childRefCase_ == 4; } /** * .grpc.channelz.v1.ChannelRef channel_ref = 4; * @return The channelRef. */ @java.lang.Override public io.grpc.channelz.v1.ChannelRef getChannelRef() { if (channelRefBuilder_ == null) { if (childRefCase_ == 4) { return (io.grpc.channelz.v1.ChannelRef) childRef_; } return io.grpc.channelz.v1.ChannelRef.getDefaultInstance(); } else { if (childRefCase_ == 4) { return channelRefBuilder_.getMessage(); } return io.grpc.channelz.v1.ChannelRef.getDefaultInstance(); } } /** * .grpc.channelz.v1.ChannelRef channel_ref = 4; */ public Builder setChannelRef(io.grpc.channelz.v1.ChannelRef value) { if (channelRefBuilder_ == null) { if (value == null) { throw new NullPointerException(); } childRef_ = value; onChanged(); } else { channelRefBuilder_.setMessage(value); } childRefCase_ = 4; return this; } /** * .grpc.channelz.v1.ChannelRef channel_ref = 4; */ public Builder setChannelRef( io.grpc.channelz.v1.ChannelRef.Builder builderForValue) { if (channelRefBuilder_ == null) { childRef_ = builderForValue.build(); onChanged(); } else { channelRefBuilder_.setMessage(builderForValue.build()); } childRefCase_ = 4; return this; } /** * .grpc.channelz.v1.ChannelRef channel_ref = 4; */ public Builder mergeChannelRef(io.grpc.channelz.v1.ChannelRef value) { if (channelRefBuilder_ == null) { if (childRefCase_ == 4 && childRef_ != io.grpc.channelz.v1.ChannelRef.getDefaultInstance()) { childRef_ = io.grpc.channelz.v1.ChannelRef.newBuilder((io.grpc.channelz.v1.ChannelRef) childRef_) .mergeFrom(value).buildPartial(); } else { childRef_ = value; } onChanged(); } else { if (childRefCase_ == 4) { channelRefBuilder_.mergeFrom(value); } else { channelRefBuilder_.setMessage(value); } } childRefCase_ = 4; return this; } /** * .grpc.channelz.v1.ChannelRef channel_ref = 4; */ public Builder clearChannelRef() { if (channelRefBuilder_ == null) { if (childRefCase_ == 4) { childRefCase_ = 0; childRef_ = null; onChanged(); } } else { if (childRefCase_ == 4) { childRefCase_ = 0; childRef_ = null; } channelRefBuilder_.clear(); } return this; } /** * .grpc.channelz.v1.ChannelRef channel_ref = 4; */ public io.grpc.channelz.v1.ChannelRef.Builder getChannelRefBuilder() { return getChannelRefFieldBuilder().getBuilder(); } /** * .grpc.channelz.v1.ChannelRef channel_ref = 4; */ @java.lang.Override public io.grpc.channelz.v1.ChannelRefOrBuilder getChannelRefOrBuilder() { if ((childRefCase_ == 4) && (channelRefBuilder_ != null)) { return channelRefBuilder_.getMessageOrBuilder(); } else { if (childRefCase_ == 4) { return (io.grpc.channelz.v1.ChannelRef) childRef_; } return io.grpc.channelz.v1.ChannelRef.getDefaultInstance(); } } /** * .grpc.channelz.v1.ChannelRef channel_ref = 4; */ private com.google.protobuf.SingleFieldBuilderV3< io.grpc.channelz.v1.ChannelRef, io.grpc.channelz.v1.ChannelRef.Builder, io.grpc.channelz.v1.ChannelRefOrBuilder> getChannelRefFieldBuilder() { if (channelRefBuilder_ == null) { if (!(childRefCase_ == 4)) { childRef_ = io.grpc.channelz.v1.ChannelRef.getDefaultInstance(); } channelRefBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.grpc.channelz.v1.ChannelRef, io.grpc.channelz.v1.ChannelRef.Builder, io.grpc.channelz.v1.ChannelRefOrBuilder>( (io.grpc.channelz.v1.ChannelRef) childRef_, getParentForChildren(), isClean()); childRef_ = null; } childRefCase_ = 4; onChanged(); return channelRefBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< io.grpc.channelz.v1.SubchannelRef, io.grpc.channelz.v1.SubchannelRef.Builder, io.grpc.channelz.v1.SubchannelRefOrBuilder> subchannelRefBuilder_; /** * .grpc.channelz.v1.SubchannelRef subchannel_ref = 5; * @return Whether the subchannelRef field is set. */ @java.lang.Override public boolean hasSubchannelRef() { return childRefCase_ == 5; } /** * .grpc.channelz.v1.SubchannelRef subchannel_ref = 5; * @return The subchannelRef. */ @java.lang.Override public io.grpc.channelz.v1.SubchannelRef getSubchannelRef() { if (subchannelRefBuilder_ == null) { if (childRefCase_ == 5) { return (io.grpc.channelz.v1.SubchannelRef) childRef_; } return io.grpc.channelz.v1.SubchannelRef.getDefaultInstance(); } else { if (childRefCase_ == 5) { return subchannelRefBuilder_.getMessage(); } return io.grpc.channelz.v1.SubchannelRef.getDefaultInstance(); } } /** * .grpc.channelz.v1.SubchannelRef subchannel_ref = 5; */ public Builder setSubchannelRef(io.grpc.channelz.v1.SubchannelRef value) { if (subchannelRefBuilder_ == null) { if (value == null) { throw new NullPointerException(); } childRef_ = value; onChanged(); } else { subchannelRefBuilder_.setMessage(value); } childRefCase_ = 5; return this; } /** * .grpc.channelz.v1.SubchannelRef subchannel_ref = 5; */ public Builder setSubchannelRef( io.grpc.channelz.v1.SubchannelRef.Builder builderForValue) { if (subchannelRefBuilder_ == null) { childRef_ = builderForValue.build(); onChanged(); } else { subchannelRefBuilder_.setMessage(builderForValue.build()); } childRefCase_ = 5; return this; } /** * .grpc.channelz.v1.SubchannelRef subchannel_ref = 5; */ public Builder mergeSubchannelRef(io.grpc.channelz.v1.SubchannelRef value) { if (subchannelRefBuilder_ == null) { if (childRefCase_ == 5 && childRef_ != io.grpc.channelz.v1.SubchannelRef.getDefaultInstance()) { childRef_ = io.grpc.channelz.v1.SubchannelRef.newBuilder((io.grpc.channelz.v1.SubchannelRef) childRef_) .mergeFrom(value).buildPartial(); } else { childRef_ = value; } onChanged(); } else { if (childRefCase_ == 5) { subchannelRefBuilder_.mergeFrom(value); } else { subchannelRefBuilder_.setMessage(value); } } childRefCase_ = 5; return this; } /** * .grpc.channelz.v1.SubchannelRef subchannel_ref = 5; */ public Builder clearSubchannelRef() { if (subchannelRefBuilder_ == null) { if (childRefCase_ == 5) { childRefCase_ = 0; childRef_ = null; onChanged(); } } else { if (childRefCase_ == 5) { childRefCase_ = 0; childRef_ = null; } subchannelRefBuilder_.clear(); } return this; } /** * .grpc.channelz.v1.SubchannelRef subchannel_ref = 5; */ public io.grpc.channelz.v1.SubchannelRef.Builder getSubchannelRefBuilder() { return getSubchannelRefFieldBuilder().getBuilder(); } /** * .grpc.channelz.v1.SubchannelRef subchannel_ref = 5; */ @java.lang.Override public io.grpc.channelz.v1.SubchannelRefOrBuilder getSubchannelRefOrBuilder() { if ((childRefCase_ == 5) && (subchannelRefBuilder_ != null)) { return subchannelRefBuilder_.getMessageOrBuilder(); } else { if (childRefCase_ == 5) { return (io.grpc.channelz.v1.SubchannelRef) childRef_; } return io.grpc.channelz.v1.SubchannelRef.getDefaultInstance(); } } /** * .grpc.channelz.v1.SubchannelRef subchannel_ref = 5; */ private com.google.protobuf.SingleFieldBuilderV3< io.grpc.channelz.v1.SubchannelRef, io.grpc.channelz.v1.SubchannelRef.Builder, io.grpc.channelz.v1.SubchannelRefOrBuilder> getSubchannelRefFieldBuilder() { if (subchannelRefBuilder_ == null) { if (!(childRefCase_ == 5)) { childRef_ = io.grpc.channelz.v1.SubchannelRef.getDefaultInstance(); } subchannelRefBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.grpc.channelz.v1.SubchannelRef, io.grpc.channelz.v1.SubchannelRef.Builder, io.grpc.channelz.v1.SubchannelRefOrBuilder>( (io.grpc.channelz.v1.SubchannelRef) childRef_, getParentForChildren(), isClean()); childRef_ = null; } childRefCase_ = 5; onChanged(); return subchannelRefBuilder_; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:grpc.channelz.v1.ChannelTraceEvent) } // @@protoc_insertion_point(class_scope:grpc.channelz.v1.ChannelTraceEvent) private static final io.grpc.channelz.v1.ChannelTraceEvent DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.grpc.channelz.v1.ChannelTraceEvent(); } public static io.grpc.channelz.v1.ChannelTraceEvent getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public ChannelTraceEvent parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.grpc.channelz.v1.ChannelTraceEvent getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy