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

types.Metric Maven / Gradle / Ivy

The newest version!
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: metric.proto

package types;

public final class Metric {
  private Metric() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  /**
   * Protobuf enum {@code types.MetricType}
   */
  public enum MetricType
      implements com.google.protobuf.ProtocolMessageEnum {
    /**
     * 
     * NOTHING should not be used.
     * 
* * NOTHING = 0; */ NOTHING(0), /** *
     * Metric for p2p network transfer
     * 
* * P2P_NETWORK = 1; */ P2P_NETWORK(1), UNRECOGNIZED(-1), ; /** *
     * NOTHING should not be used.
     * 
* * NOTHING = 0; */ public static final int NOTHING_VALUE = 0; /** *
     * Metric for p2p network transfer
     * 
* * P2P_NETWORK = 1; */ public static final int P2P_NETWORK_VALUE = 1; 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 MetricType 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 MetricType forNumber(int value) { switch (value) { case 0: return NOTHING; case 1: return P2P_NETWORK; default: return null; } } public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { return internalValueMap; } private static final com.google.protobuf.Internal.EnumLiteMap< MetricType> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap() { public MetricType findValueByNumber(int number) { return MetricType.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 types.Metric.getDescriptor().getEnumTypes().get(0); } private static final MetricType[] VALUES = values(); public static MetricType 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 MetricType(int value) { this.value = value; } // @@protoc_insertion_point(enum_scope:types.MetricType) } public interface MetricsRequestOrBuilder extends // @@protoc_insertion_point(interface_extends:types.MetricsRequest) com.google.protobuf.MessageOrBuilder { /** * repeated .types.MetricType types = 1; * @return A list containing the types. */ java.util.List getTypesList(); /** * repeated .types.MetricType types = 1; * @return The count of types. */ int getTypesCount(); /** * repeated .types.MetricType types = 1; * @param index The index of the element to return. * @return The types at the given index. */ types.Metric.MetricType getTypes(int index); /** * repeated .types.MetricType types = 1; * @return A list containing the enum numeric values on the wire for types. */ java.util.List getTypesValueList(); /** * repeated .types.MetricType types = 1; * @param index The index of the value to return. * @return The enum numeric value on the wire of types at the given index. */ int getTypesValue(int index); } /** * Protobuf type {@code types.MetricsRequest} */ public static final class MetricsRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.MetricsRequest) MetricsRequestOrBuilder { private static final long serialVersionUID = 0L; // Use MetricsRequest.newBuilder() to construct. private MetricsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private MetricsRequest() { types_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new MetricsRequest(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private MetricsRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 8: { int rawValue = input.readEnum(); if (!((mutable_bitField0_ & 0x00000001) != 0)) { types_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } types_.add(rawValue); break; } case 10: { int length = input.readRawVarint32(); int oldLimit = input.pushLimit(length); while(input.getBytesUntilLimit() > 0) { int rawValue = input.readEnum(); if (!((mutable_bitField0_ & 0x00000001) != 0)) { types_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } types_.add(rawValue); } input.popLimit(oldLimit); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { types_ = java.util.Collections.unmodifiableList(types_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.Metric.internal_static_types_MetricsRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.Metric.internal_static_types_MetricsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( types.Metric.MetricsRequest.class, types.Metric.MetricsRequest.Builder.class); } public static final int TYPES_FIELD_NUMBER = 1; private java.util.List types_; private static final com.google.protobuf.Internal.ListAdapter.Converter< java.lang.Integer, types.Metric.MetricType> types_converter_ = new com.google.protobuf.Internal.ListAdapter.Converter< java.lang.Integer, types.Metric.MetricType>() { public types.Metric.MetricType convert(java.lang.Integer from) { @SuppressWarnings("deprecation") types.Metric.MetricType result = types.Metric.MetricType.valueOf(from); return result == null ? types.Metric.MetricType.UNRECOGNIZED : result; } }; /** * repeated .types.MetricType types = 1; * @return A list containing the types. */ @java.lang.Override public java.util.List getTypesList() { return new com.google.protobuf.Internal.ListAdapter< java.lang.Integer, types.Metric.MetricType>(types_, types_converter_); } /** * repeated .types.MetricType types = 1; * @return The count of types. */ @java.lang.Override public int getTypesCount() { return types_.size(); } /** * repeated .types.MetricType types = 1; * @param index The index of the element to return. * @return The types at the given index. */ @java.lang.Override public types.Metric.MetricType getTypes(int index) { return types_converter_.convert(types_.get(index)); } /** * repeated .types.MetricType types = 1; * @return A list containing the enum numeric values on the wire for types. */ @java.lang.Override public java.util.List getTypesValueList() { return types_; } /** * repeated .types.MetricType types = 1; * @param index The index of the value to return. * @return The enum numeric value on the wire of types at the given index. */ @java.lang.Override public int getTypesValue(int index) { return types_.get(index); } private int typesMemoizedSerializedSize; 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 { getSerializedSize(); if (getTypesList().size() > 0) { output.writeUInt32NoTag(10); output.writeUInt32NoTag(typesMemoizedSerializedSize); } for (int i = 0; i < types_.size(); i++) { output.writeEnumNoTag(types_.get(i)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; { int dataSize = 0; for (int i = 0; i < types_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeEnumSizeNoTag(types_.get(i)); } size += dataSize; if (!getTypesList().isEmpty()) { size += 1; size += com.google.protobuf.CodedOutputStream .computeUInt32SizeNoTag(dataSize); }typesMemoizedSerializedSize = dataSize; } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof types.Metric.MetricsRequest)) { return super.equals(obj); } types.Metric.MetricsRequest other = (types.Metric.MetricsRequest) obj; if (!types_.equals(other.types_)) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getTypesCount() > 0) { hash = (37 * hash) + TYPES_FIELD_NUMBER; hash = (53 * hash) + types_.hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.Metric.MetricsRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.Metric.MetricsRequest parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.Metric.MetricsRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.Metric.MetricsRequest parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.Metric.MetricsRequest parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.Metric.MetricsRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.Metric.MetricsRequest parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.Metric.MetricsRequest 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 types.Metric.MetricsRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.Metric.MetricsRequest 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 types.Metric.MetricsRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.Metric.MetricsRequest 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(types.Metric.MetricsRequest 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; } /** * Protobuf type {@code types.MetricsRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.MetricsRequest) types.Metric.MetricsRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.Metric.internal_static_types_MetricsRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.Metric.internal_static_types_MetricsRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( types.Metric.MetricsRequest.class, types.Metric.MetricsRequest.Builder.class); } // Construct using types.Metric.MetricsRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); types_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.Metric.internal_static_types_MetricsRequest_descriptor; } @java.lang.Override public types.Metric.MetricsRequest getDefaultInstanceForType() { return types.Metric.MetricsRequest.getDefaultInstance(); } @java.lang.Override public types.Metric.MetricsRequest build() { types.Metric.MetricsRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.Metric.MetricsRequest buildPartial() { types.Metric.MetricsRequest result = new types.Metric.MetricsRequest(this); int from_bitField0_ = bitField0_; if (((bitField0_ & 0x00000001) != 0)) { types_ = java.util.Collections.unmodifiableList(types_); bitField0_ = (bitField0_ & ~0x00000001); } result.types_ = types_; onBuilt(); return result; } @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 types.Metric.MetricsRequest) { return mergeFrom((types.Metric.MetricsRequest)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.Metric.MetricsRequest other) { if (other == types.Metric.MetricsRequest.getDefaultInstance()) return this; if (!other.types_.isEmpty()) { if (types_.isEmpty()) { types_ = other.types_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureTypesIsMutable(); types_.addAll(other.types_); } onChanged(); } this.mergeUnknownFields(other.unknownFields); 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 { types.Metric.MetricsRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.Metric.MetricsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List types_ = java.util.Collections.emptyList(); private void ensureTypesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { types_ = new java.util.ArrayList(types_); bitField0_ |= 0x00000001; } } /** * repeated .types.MetricType types = 1; * @return A list containing the types. */ public java.util.List getTypesList() { return new com.google.protobuf.Internal.ListAdapter< java.lang.Integer, types.Metric.MetricType>(types_, types_converter_); } /** * repeated .types.MetricType types = 1; * @return The count of types. */ public int getTypesCount() { return types_.size(); } /** * repeated .types.MetricType types = 1; * @param index The index of the element to return. * @return The types at the given index. */ public types.Metric.MetricType getTypes(int index) { return types_converter_.convert(types_.get(index)); } /** * repeated .types.MetricType types = 1; * @param index The index to set the value at. * @param value The types to set. * @return This builder for chaining. */ public Builder setTypes( int index, types.Metric.MetricType value) { if (value == null) { throw new NullPointerException(); } ensureTypesIsMutable(); types_.set(index, value.getNumber()); onChanged(); return this; } /** * repeated .types.MetricType types = 1; * @param value The types to add. * @return This builder for chaining. */ public Builder addTypes(types.Metric.MetricType value) { if (value == null) { throw new NullPointerException(); } ensureTypesIsMutable(); types_.add(value.getNumber()); onChanged(); return this; } /** * repeated .types.MetricType types = 1; * @param values The types to add. * @return This builder for chaining. */ public Builder addAllTypes( java.lang.Iterable values) { ensureTypesIsMutable(); for (types.Metric.MetricType value : values) { types_.add(value.getNumber()); } onChanged(); return this; } /** * repeated .types.MetricType types = 1; * @return This builder for chaining. */ public Builder clearTypes() { types_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * repeated .types.MetricType types = 1; * @return A list containing the enum numeric values on the wire for types. */ public java.util.List getTypesValueList() { return java.util.Collections.unmodifiableList(types_); } /** * repeated .types.MetricType types = 1; * @param index The index of the value to return. * @return The enum numeric value on the wire of types at the given index. */ public int getTypesValue(int index) { return types_.get(index); } /** * repeated .types.MetricType types = 1; * @param index The index of the value to return. * @return The enum numeric value on the wire of types at the given index. * @return This builder for chaining. */ public Builder setTypesValue( int index, int value) { ensureTypesIsMutable(); types_.set(index, value); onChanged(); return this; } /** * repeated .types.MetricType types = 1; * @param value The enum numeric value on the wire for types to add. * @return This builder for chaining. */ public Builder addTypesValue(int value) { ensureTypesIsMutable(); types_.add(value); onChanged(); return this; } /** * repeated .types.MetricType types = 1; * @param values The enum numeric values on the wire for types to add. * @return This builder for chaining. */ public Builder addAllTypesValue( java.lang.Iterable values) { ensureTypesIsMutable(); for (int value : values) { types_.add(value); } onChanged(); return this; } @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:types.MetricsRequest) } // @@protoc_insertion_point(class_scope:types.MetricsRequest) private static final types.Metric.MetricsRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.Metric.MetricsRequest(); } public static types.Metric.MetricsRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public MetricsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new MetricsRequest(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public types.Metric.MetricsRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface MetricsOrBuilder extends // @@protoc_insertion_point(interface_extends:types.Metrics) com.google.protobuf.MessageOrBuilder { /** * repeated .types.PeerMetric peers = 1; */ java.util.List getPeersList(); /** * repeated .types.PeerMetric peers = 1; */ types.Metric.PeerMetric getPeers(int index); /** * repeated .types.PeerMetric peers = 1; */ int getPeersCount(); /** * repeated .types.PeerMetric peers = 1; */ java.util.List getPeersOrBuilderList(); /** * repeated .types.PeerMetric peers = 1; */ types.Metric.PeerMetricOrBuilder getPeersOrBuilder( int index); } /** * Protobuf type {@code types.Metrics} */ public static final class Metrics extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.Metrics) MetricsOrBuilder { private static final long serialVersionUID = 0L; // Use Metrics.newBuilder() to construct. private Metrics(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Metrics() { peers_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Metrics(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Metrics( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { peers_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } peers_.add( input.readMessage(types.Metric.PeerMetric.parser(), extensionRegistry)); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { peers_ = java.util.Collections.unmodifiableList(peers_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.Metric.internal_static_types_Metrics_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.Metric.internal_static_types_Metrics_fieldAccessorTable .ensureFieldAccessorsInitialized( types.Metric.Metrics.class, types.Metric.Metrics.Builder.class); } public static final int PEERS_FIELD_NUMBER = 1; private java.util.List peers_; /** * repeated .types.PeerMetric peers = 1; */ @java.lang.Override public java.util.List getPeersList() { return peers_; } /** * repeated .types.PeerMetric peers = 1; */ @java.lang.Override public java.util.List getPeersOrBuilderList() { return peers_; } /** * repeated .types.PeerMetric peers = 1; */ @java.lang.Override public int getPeersCount() { return peers_.size(); } /** * repeated .types.PeerMetric peers = 1; */ @java.lang.Override public types.Metric.PeerMetric getPeers(int index) { return peers_.get(index); } /** * repeated .types.PeerMetric peers = 1; */ @java.lang.Override public types.Metric.PeerMetricOrBuilder getPeersOrBuilder( int index) { return peers_.get(index); } 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 { for (int i = 0; i < peers_.size(); i++) { output.writeMessage(1, peers_.get(i)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < peers_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, peers_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof types.Metric.Metrics)) { return super.equals(obj); } types.Metric.Metrics other = (types.Metric.Metrics) obj; if (!getPeersList() .equals(other.getPeersList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getPeersCount() > 0) { hash = (37 * hash) + PEERS_FIELD_NUMBER; hash = (53 * hash) + getPeersList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.Metric.Metrics parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.Metric.Metrics parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.Metric.Metrics parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.Metric.Metrics parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.Metric.Metrics parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.Metric.Metrics parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.Metric.Metrics parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.Metric.Metrics 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 types.Metric.Metrics parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.Metric.Metrics 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 types.Metric.Metrics parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.Metric.Metrics 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(types.Metric.Metrics 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; } /** * Protobuf type {@code types.Metrics} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.Metrics) types.Metric.MetricsOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.Metric.internal_static_types_Metrics_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.Metric.internal_static_types_Metrics_fieldAccessorTable .ensureFieldAccessorsInitialized( types.Metric.Metrics.class, types.Metric.Metrics.Builder.class); } // Construct using types.Metric.Metrics.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getPeersFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); if (peersBuilder_ == null) { peers_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { peersBuilder_.clear(); } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.Metric.internal_static_types_Metrics_descriptor; } @java.lang.Override public types.Metric.Metrics getDefaultInstanceForType() { return types.Metric.Metrics.getDefaultInstance(); } @java.lang.Override public types.Metric.Metrics build() { types.Metric.Metrics result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.Metric.Metrics buildPartial() { types.Metric.Metrics result = new types.Metric.Metrics(this); int from_bitField0_ = bitField0_; if (peersBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { peers_ = java.util.Collections.unmodifiableList(peers_); bitField0_ = (bitField0_ & ~0x00000001); } result.peers_ = peers_; } else { result.peers_ = peersBuilder_.build(); } onBuilt(); return result; } @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 types.Metric.Metrics) { return mergeFrom((types.Metric.Metrics)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.Metric.Metrics other) { if (other == types.Metric.Metrics.getDefaultInstance()) return this; if (peersBuilder_ == null) { if (!other.peers_.isEmpty()) { if (peers_.isEmpty()) { peers_ = other.peers_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensurePeersIsMutable(); peers_.addAll(other.peers_); } onChanged(); } } else { if (!other.peers_.isEmpty()) { if (peersBuilder_.isEmpty()) { peersBuilder_.dispose(); peersBuilder_ = null; peers_ = other.peers_; bitField0_ = (bitField0_ & ~0x00000001); peersBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getPeersFieldBuilder() : null; } else { peersBuilder_.addAllMessages(other.peers_); } } } this.mergeUnknownFields(other.unknownFields); 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 { types.Metric.Metrics parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.Metric.Metrics) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List peers_ = java.util.Collections.emptyList(); private void ensurePeersIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { peers_ = new java.util.ArrayList(peers_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< types.Metric.PeerMetric, types.Metric.PeerMetric.Builder, types.Metric.PeerMetricOrBuilder> peersBuilder_; /** * repeated .types.PeerMetric peers = 1; */ public java.util.List getPeersList() { if (peersBuilder_ == null) { return java.util.Collections.unmodifiableList(peers_); } else { return peersBuilder_.getMessageList(); } } /** * repeated .types.PeerMetric peers = 1; */ public int getPeersCount() { if (peersBuilder_ == null) { return peers_.size(); } else { return peersBuilder_.getCount(); } } /** * repeated .types.PeerMetric peers = 1; */ public types.Metric.PeerMetric getPeers(int index) { if (peersBuilder_ == null) { return peers_.get(index); } else { return peersBuilder_.getMessage(index); } } /** * repeated .types.PeerMetric peers = 1; */ public Builder setPeers( int index, types.Metric.PeerMetric value) { if (peersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePeersIsMutable(); peers_.set(index, value); onChanged(); } else { peersBuilder_.setMessage(index, value); } return this; } /** * repeated .types.PeerMetric peers = 1; */ public Builder setPeers( int index, types.Metric.PeerMetric.Builder builderForValue) { if (peersBuilder_ == null) { ensurePeersIsMutable(); peers_.set(index, builderForValue.build()); onChanged(); } else { peersBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * repeated .types.PeerMetric peers = 1; */ public Builder addPeers(types.Metric.PeerMetric value) { if (peersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePeersIsMutable(); peers_.add(value); onChanged(); } else { peersBuilder_.addMessage(value); } return this; } /** * repeated .types.PeerMetric peers = 1; */ public Builder addPeers( int index, types.Metric.PeerMetric value) { if (peersBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePeersIsMutable(); peers_.add(index, value); onChanged(); } else { peersBuilder_.addMessage(index, value); } return this; } /** * repeated .types.PeerMetric peers = 1; */ public Builder addPeers( types.Metric.PeerMetric.Builder builderForValue) { if (peersBuilder_ == null) { ensurePeersIsMutable(); peers_.add(builderForValue.build()); onChanged(); } else { peersBuilder_.addMessage(builderForValue.build()); } return this; } /** * repeated .types.PeerMetric peers = 1; */ public Builder addPeers( int index, types.Metric.PeerMetric.Builder builderForValue) { if (peersBuilder_ == null) { ensurePeersIsMutable(); peers_.add(index, builderForValue.build()); onChanged(); } else { peersBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * repeated .types.PeerMetric peers = 1; */ public Builder addAllPeers( java.lang.Iterable values) { if (peersBuilder_ == null) { ensurePeersIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, peers_); onChanged(); } else { peersBuilder_.addAllMessages(values); } return this; } /** * repeated .types.PeerMetric peers = 1; */ public Builder clearPeers() { if (peersBuilder_ == null) { peers_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { peersBuilder_.clear(); } return this; } /** * repeated .types.PeerMetric peers = 1; */ public Builder removePeers(int index) { if (peersBuilder_ == null) { ensurePeersIsMutable(); peers_.remove(index); onChanged(); } else { peersBuilder_.remove(index); } return this; } /** * repeated .types.PeerMetric peers = 1; */ public types.Metric.PeerMetric.Builder getPeersBuilder( int index) { return getPeersFieldBuilder().getBuilder(index); } /** * repeated .types.PeerMetric peers = 1; */ public types.Metric.PeerMetricOrBuilder getPeersOrBuilder( int index) { if (peersBuilder_ == null) { return peers_.get(index); } else { return peersBuilder_.getMessageOrBuilder(index); } } /** * repeated .types.PeerMetric peers = 1; */ public java.util.List getPeersOrBuilderList() { if (peersBuilder_ != null) { return peersBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(peers_); } } /** * repeated .types.PeerMetric peers = 1; */ public types.Metric.PeerMetric.Builder addPeersBuilder() { return getPeersFieldBuilder().addBuilder( types.Metric.PeerMetric.getDefaultInstance()); } /** * repeated .types.PeerMetric peers = 1; */ public types.Metric.PeerMetric.Builder addPeersBuilder( int index) { return getPeersFieldBuilder().addBuilder( index, types.Metric.PeerMetric.getDefaultInstance()); } /** * repeated .types.PeerMetric peers = 1; */ public java.util.List getPeersBuilderList() { return getPeersFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< types.Metric.PeerMetric, types.Metric.PeerMetric.Builder, types.Metric.PeerMetricOrBuilder> getPeersFieldBuilder() { if (peersBuilder_ == null) { peersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< types.Metric.PeerMetric, types.Metric.PeerMetric.Builder, types.Metric.PeerMetricOrBuilder>( peers_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); peers_ = null; } return peersBuilder_; } @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:types.Metrics) } // @@protoc_insertion_point(class_scope:types.Metrics) private static final types.Metric.Metrics DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.Metric.Metrics(); } public static types.Metric.Metrics getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Metrics parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Metrics(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public types.Metric.Metrics getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface PeerMetricOrBuilder extends // @@protoc_insertion_point(interface_extends:types.PeerMetric) com.google.protobuf.MessageOrBuilder { /** * bytes peerID = 1; * @return The peerID. */ com.google.protobuf.ByteString getPeerID(); /** * int64 sumIn = 2; * @return The sumIn. */ long getSumIn(); /** * int64 avrIn = 3; * @return The avrIn. */ long getAvrIn(); /** * int64 sumOut = 4; * @return The sumOut. */ long getSumOut(); /** * int64 avrOut = 5; * @return The avrOut. */ long getAvrOut(); } /** * Protobuf type {@code types.PeerMetric} */ public static final class PeerMetric extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:types.PeerMetric) PeerMetricOrBuilder { private static final long serialVersionUID = 0L; // Use PeerMetric.newBuilder() to construct. private PeerMetric(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private PeerMetric() { peerID_ = com.google.protobuf.ByteString.EMPTY; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new PeerMetric(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private PeerMetric( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { peerID_ = input.readBytes(); break; } case 16: { sumIn_ = input.readInt64(); break; } case 24: { avrIn_ = input.readInt64(); break; } case 32: { sumOut_ = input.readInt64(); break; } case 40: { avrOut_ = input.readInt64(); break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.Metric.internal_static_types_PeerMetric_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.Metric.internal_static_types_PeerMetric_fieldAccessorTable .ensureFieldAccessorsInitialized( types.Metric.PeerMetric.class, types.Metric.PeerMetric.Builder.class); } public static final int PEERID_FIELD_NUMBER = 1; private com.google.protobuf.ByteString peerID_; /** * bytes peerID = 1; * @return The peerID. */ @java.lang.Override public com.google.protobuf.ByteString getPeerID() { return peerID_; } public static final int SUMIN_FIELD_NUMBER = 2; private long sumIn_; /** * int64 sumIn = 2; * @return The sumIn. */ @java.lang.Override public long getSumIn() { return sumIn_; } public static final int AVRIN_FIELD_NUMBER = 3; private long avrIn_; /** * int64 avrIn = 3; * @return The avrIn. */ @java.lang.Override public long getAvrIn() { return avrIn_; } public static final int SUMOUT_FIELD_NUMBER = 4; private long sumOut_; /** * int64 sumOut = 4; * @return The sumOut. */ @java.lang.Override public long getSumOut() { return sumOut_; } public static final int AVROUT_FIELD_NUMBER = 5; private long avrOut_; /** * int64 avrOut = 5; * @return The avrOut. */ @java.lang.Override public long getAvrOut() { return avrOut_; } 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 (!peerID_.isEmpty()) { output.writeBytes(1, peerID_); } if (sumIn_ != 0L) { output.writeInt64(2, sumIn_); } if (avrIn_ != 0L) { output.writeInt64(3, avrIn_); } if (sumOut_ != 0L) { output.writeInt64(4, sumOut_); } if (avrOut_ != 0L) { output.writeInt64(5, avrOut_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!peerID_.isEmpty()) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(1, peerID_); } if (sumIn_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(2, sumIn_); } if (avrIn_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(3, avrIn_); } if (sumOut_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(4, sumOut_); } if (avrOut_ != 0L) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(5, avrOut_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof types.Metric.PeerMetric)) { return super.equals(obj); } types.Metric.PeerMetric other = (types.Metric.PeerMetric) obj; if (!getPeerID() .equals(other.getPeerID())) return false; if (getSumIn() != other.getSumIn()) return false; if (getAvrIn() != other.getAvrIn()) return false; if (getSumOut() != other.getSumOut()) return false; if (getAvrOut() != other.getAvrOut()) return false; if (!unknownFields.equals(other.unknownFields)) 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) + PEERID_FIELD_NUMBER; hash = (53 * hash) + getPeerID().hashCode(); hash = (37 * hash) + SUMIN_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getSumIn()); hash = (37 * hash) + AVRIN_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getAvrIn()); hash = (37 * hash) + SUMOUT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getSumOut()); hash = (37 * hash) + AVROUT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getAvrOut()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static types.Metric.PeerMetric parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.Metric.PeerMetric parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.Metric.PeerMetric parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.Metric.PeerMetric parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.Metric.PeerMetric parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static types.Metric.PeerMetric parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static types.Metric.PeerMetric parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.Metric.PeerMetric 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 types.Metric.PeerMetric parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static types.Metric.PeerMetric 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 types.Metric.PeerMetric parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static types.Metric.PeerMetric 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(types.Metric.PeerMetric 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; } /** * Protobuf type {@code types.PeerMetric} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:types.PeerMetric) types.Metric.PeerMetricOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return types.Metric.internal_static_types_PeerMetric_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return types.Metric.internal_static_types_PeerMetric_fieldAccessorTable .ensureFieldAccessorsInitialized( types.Metric.PeerMetric.class, types.Metric.PeerMetric.Builder.class); } // Construct using types.Metric.PeerMetric.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); peerID_ = com.google.protobuf.ByteString.EMPTY; sumIn_ = 0L; avrIn_ = 0L; sumOut_ = 0L; avrOut_ = 0L; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return types.Metric.internal_static_types_PeerMetric_descriptor; } @java.lang.Override public types.Metric.PeerMetric getDefaultInstanceForType() { return types.Metric.PeerMetric.getDefaultInstance(); } @java.lang.Override public types.Metric.PeerMetric build() { types.Metric.PeerMetric result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public types.Metric.PeerMetric buildPartial() { types.Metric.PeerMetric result = new types.Metric.PeerMetric(this); result.peerID_ = peerID_; result.sumIn_ = sumIn_; result.avrIn_ = avrIn_; result.sumOut_ = sumOut_; result.avrOut_ = avrOut_; onBuilt(); return result; } @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 types.Metric.PeerMetric) { return mergeFrom((types.Metric.PeerMetric)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(types.Metric.PeerMetric other) { if (other == types.Metric.PeerMetric.getDefaultInstance()) return this; if (other.getPeerID() != com.google.protobuf.ByteString.EMPTY) { setPeerID(other.getPeerID()); } if (other.getSumIn() != 0L) { setSumIn(other.getSumIn()); } if (other.getAvrIn() != 0L) { setAvrIn(other.getAvrIn()); } if (other.getSumOut() != 0L) { setSumOut(other.getSumOut()); } if (other.getAvrOut() != 0L) { setAvrOut(other.getAvrOut()); } this.mergeUnknownFields(other.unknownFields); 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 { types.Metric.PeerMetric parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (types.Metric.PeerMetric) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private com.google.protobuf.ByteString peerID_ = com.google.protobuf.ByteString.EMPTY; /** * bytes peerID = 1; * @return The peerID. */ @java.lang.Override public com.google.protobuf.ByteString getPeerID() { return peerID_; } /** * bytes peerID = 1; * @param value The peerID to set. * @return This builder for chaining. */ public Builder setPeerID(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } peerID_ = value; onChanged(); return this; } /** * bytes peerID = 1; * @return This builder for chaining. */ public Builder clearPeerID() { peerID_ = getDefaultInstance().getPeerID(); onChanged(); return this; } private long sumIn_ ; /** * int64 sumIn = 2; * @return The sumIn. */ @java.lang.Override public long getSumIn() { return sumIn_; } /** * int64 sumIn = 2; * @param value The sumIn to set. * @return This builder for chaining. */ public Builder setSumIn(long value) { sumIn_ = value; onChanged(); return this; } /** * int64 sumIn = 2; * @return This builder for chaining. */ public Builder clearSumIn() { sumIn_ = 0L; onChanged(); return this; } private long avrIn_ ; /** * int64 avrIn = 3; * @return The avrIn. */ @java.lang.Override public long getAvrIn() { return avrIn_; } /** * int64 avrIn = 3; * @param value The avrIn to set. * @return This builder for chaining. */ public Builder setAvrIn(long value) { avrIn_ = value; onChanged(); return this; } /** * int64 avrIn = 3; * @return This builder for chaining. */ public Builder clearAvrIn() { avrIn_ = 0L; onChanged(); return this; } private long sumOut_ ; /** * int64 sumOut = 4; * @return The sumOut. */ @java.lang.Override public long getSumOut() { return sumOut_; } /** * int64 sumOut = 4; * @param value The sumOut to set. * @return This builder for chaining. */ public Builder setSumOut(long value) { sumOut_ = value; onChanged(); return this; } /** * int64 sumOut = 4; * @return This builder for chaining. */ public Builder clearSumOut() { sumOut_ = 0L; onChanged(); return this; } private long avrOut_ ; /** * int64 avrOut = 5; * @return The avrOut. */ @java.lang.Override public long getAvrOut() { return avrOut_; } /** * int64 avrOut = 5; * @param value The avrOut to set. * @return This builder for chaining. */ public Builder setAvrOut(long value) { avrOut_ = value; onChanged(); return this; } /** * int64 avrOut = 5; * @return This builder for chaining. */ public Builder clearAvrOut() { avrOut_ = 0L; onChanged(); return this; } @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:types.PeerMetric) } // @@protoc_insertion_point(class_scope:types.PeerMetric) private static final types.Metric.PeerMetric DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new types.Metric.PeerMetric(); } public static types.Metric.PeerMetric getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public PeerMetric parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new PeerMetric(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public types.Metric.PeerMetric getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_MetricsRequest_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_MetricsRequest_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_Metrics_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_Metrics_fieldAccessorTable; private static final com.google.protobuf.Descriptors.Descriptor internal_static_types_PeerMetric_descriptor; private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_types_PeerMetric_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; } private static com.google.protobuf.Descriptors.FileDescriptor descriptor; static { java.lang.String[] descriptorData = { "\n\014metric.proto\022\005types\"2\n\016MetricsRequest\022" + " \n\005types\030\001 \003(\0162\021.types.MetricType\"+\n\007Met" + "rics\022 \n\005peers\030\001 \003(\0132\021.types.PeerMetric\"Z" + "\n\nPeerMetric\022\016\n\006peerID\030\001 \001(\014\022\r\n\005sumIn\030\002 " + "\001(\003\022\r\n\005avrIn\030\003 \001(\003\022\016\n\006sumOut\030\004 \001(\003\022\016\n\006av" + "rOut\030\005 \001(\003**\n\nMetricType\022\013\n\007NOTHING\020\000\022\017\n" + "\013P2P_NETWORK\020\001b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { }); internal_static_types_MetricsRequest_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_types_MetricsRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_MetricsRequest_descriptor, new java.lang.String[] { "Types", }); internal_static_types_Metrics_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_types_Metrics_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_Metrics_descriptor, new java.lang.String[] { "Peers", }); internal_static_types_PeerMetric_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_types_PeerMetric_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_types_PeerMetric_descriptor, new java.lang.String[] { "PeerID", "SumIn", "AvrIn", "SumOut", "AvrOut", }); } // @@protoc_insertion_point(outer_class_scope) }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy