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

alluxio.grpc.Metric Maven / Gradle / Ivy

There is a newer version: 313
Show newest version
// Generated by the protocol buffer alluxio.shaded.client.com.iler.  DO NOT EDIT!
// source: grpc/alluxio.shaded.client.com.on.proto

package alluxio.grpc;

/**
 * 
 **
 * Information about metrics.
 * 
* * Protobuf type {@code alluxio.grpc.Metric} */ public final class Metric extends alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:alluxio.grpc.Metric) MetricOrBuilder { private static final long serialVersionUID = 0L; // Use Metric.newBuilder() to construct. private Metric(alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Metric() { instance_ = ""; source_ = ""; name_ = ""; metricType_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Metric(); } @java.lang.Override public final alluxio.shaded.client.com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } public static final alluxio.shaded.client.com.google.protobuf.Descriptors.Descriptor getDescriptor() { return alluxio.grpc.CommonProto.internal_static_alluxio_grpc_Metric_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected alluxio.shaded.client.com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 6: return internalGetTags(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return alluxio.grpc.CommonProto.internal_static_alluxio_grpc_Metric_fieldAccessorTable .ensureFieldAccessorsInitialized( alluxio.grpc.Metric.class, alluxio.grpc.Metric.Builder.class); } private int bitField0_; public static final int INSTANCE_FIELD_NUMBER = 1; private volatile java.lang.Object instance_; /** * optional string instance = 1; * @return Whether the instance field is set. */ @java.lang.Override public boolean hasInstance() { return ((bitField0_ & 0x00000001) != 0); } /** * optional string instance = 1; * @return The instance. */ @java.lang.Override public java.lang.String getInstance() { java.lang.Object ref = instance_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { alluxio.shaded.client.com.google.protobuf.ByteString bs = (alluxio.shaded.client.com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { instance_ = s; } return s; } } /** * optional string instance = 1; * @return The bytes for instance. */ @java.lang.Override public alluxio.shaded.client.com.google.protobuf.ByteString getInstanceBytes() { java.lang.Object ref = instance_; if (ref instanceof java.lang.String) { alluxio.shaded.client.com.google.protobuf.ByteString b = alluxio.shaded.client.com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); instance_ = b; return b; } else { return (alluxio.shaded.client.com.google.protobuf.ByteString) ref; } } public static final int SOURCE_FIELD_NUMBER = 2; private volatile java.lang.Object source_; /** * optional string source = 2; * @return Whether the source field is set. */ @java.lang.Override public boolean hasSource() { return ((bitField0_ & 0x00000002) != 0); } /** * optional string source = 2; * @return The source. */ @java.lang.Override public java.lang.String getSource() { java.lang.Object ref = source_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { alluxio.shaded.client.com.google.protobuf.ByteString bs = (alluxio.shaded.client.com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { source_ = s; } return s; } } /** * optional string source = 2; * @return The bytes for source. */ @java.lang.Override public alluxio.shaded.client.com.google.protobuf.ByteString getSourceBytes() { java.lang.Object ref = source_; if (ref instanceof java.lang.String) { alluxio.shaded.client.com.google.protobuf.ByteString b = alluxio.shaded.client.com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); source_ = b; return b; } else { return (alluxio.shaded.client.com.google.protobuf.ByteString) ref; } } public static final int NAME_FIELD_NUMBER = 3; private volatile java.lang.Object name_; /** * optional string name = 3; * @return Whether the name field is set. */ @java.lang.Override public boolean hasName() { return ((bitField0_ & 0x00000004) != 0); } /** * optional string name = 3; * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { alluxio.shaded.client.com.google.protobuf.ByteString bs = (alluxio.shaded.client.com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { name_ = s; } return s; } } /** * optional string name = 3; * @return The bytes for name. */ @java.lang.Override public alluxio.shaded.client.com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { alluxio.shaded.client.com.google.protobuf.ByteString b = alluxio.shaded.client.com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (alluxio.shaded.client.com.google.protobuf.ByteString) ref; } } public static final int VALUE_FIELD_NUMBER = 4; private double value_; /** * optional double value = 4; * @return Whether the value field is set. */ @java.lang.Override public boolean hasValue() { return ((bitField0_ & 0x00000008) != 0); } /** * optional double value = 4; * @return The value. */ @java.lang.Override public double getValue() { return value_; } public static final int METRICTYPE_FIELD_NUMBER = 5; private int metricType_; /** * required .alluxio.grpc.MetricType metricType = 5; * @return Whether the metricType field is set. */ @java.lang.Override public boolean hasMetricType() { return ((bitField0_ & 0x00000010) != 0); } /** * required .alluxio.grpc.MetricType metricType = 5; * @return The metricType. */ @java.lang.Override public alluxio.grpc.MetricType getMetricType() { @SuppressWarnings("deprecation") alluxio.grpc.MetricType result = alluxio.grpc.MetricType.valueOf(metricType_); return result == null ? alluxio.grpc.MetricType.GAUGE : result; } public static final int TAGS_FIELD_NUMBER = 6; private static final class TagsDefaultEntryHolder { static final alluxio.shaded.client.com.google.protobuf.MapEntry< java.lang.String, java.lang.String> defaultEntry = alluxio.shaded.client.com.google.protobuf.MapEntry .newDefaultInstance( alluxio.grpc.CommonProto.internal_static_alluxio_grpc_Metric_TagsEntry_descriptor, alluxio.shaded.client.com.google.protobuf.WireFormat.FieldType.STRING, "", alluxio.shaded.client.com.google.protobuf.WireFormat.FieldType.STRING, ""); } private alluxio.shaded.client.com.google.protobuf.MapField< java.lang.String, java.lang.String> tags_; private alluxio.shaded.client.com.google.protobuf.MapField internalGetTags() { if (tags_ == null) { return alluxio.shaded.client.com.google.protobuf.MapField.emptyMapField( TagsDefaultEntryHolder.defaultEntry); } return tags_; } public int getTagsCount() { return internalGetTags().getMap().size(); } /** * map<string, string> tags = 6; */ @java.lang.Override public boolean containsTags( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetTags().getMap().containsKey(key); } /** * Use {@link #getTagsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getTags() { return getTagsMap(); } /** * map<string, string> tags = 6; */ @java.lang.Override public java.util.Map getTagsMap() { return internalGetTags().getMap(); } /** * map<string, string> tags = 6; */ @java.lang.Override public java.lang.String getTagsOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetTags().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * map<string, string> tags = 6; */ @java.lang.Override public java.lang.String getTagsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetTags().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; if (!hasMetricType()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(alluxio.shaded.client.com.google.protobuf.CodedOutputStream output) throws java.alluxio.shaded.client.io.IOException { if (((bitField0_ & 0x00000001) != 0)) { alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instance_); } if (((bitField0_ & 0x00000002) != 0)) { alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3.writeString(output, 2, source_); } if (((bitField0_ & 0x00000004) != 0)) { alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3.writeString(output, 3, name_); } if (((bitField0_ & 0x00000008) != 0)) { output.writeDouble(4, value_); } if (((bitField0_ & 0x00000010) != 0)) { output.writeEnum(5, metricType_); } alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetTags(), TagsDefaultEntryHolder.defaultEntry, 6); getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) != 0)) { size += alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3.alluxio.shaded.client.com.uteStringSize(1, instance_); } if (((bitField0_ & 0x00000002) != 0)) { size += alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3.alluxio.shaded.client.com.uteStringSize(2, source_); } if (((bitField0_ & 0x00000004) != 0)) { size += alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3.alluxio.shaded.client.com.uteStringSize(3, name_); } if (((bitField0_ & 0x00000008) != 0)) { size += alluxio.shaded.client.com.google.protobuf.CodedOutputStream .alluxio.shaded.client.com.uteDoubleSize(4, value_); } if (((bitField0_ & 0x00000010) != 0)) { size += alluxio.shaded.client.com.google.protobuf.CodedOutputStream .alluxio.shaded.client.com.uteEnumSize(5, metricType_); } for (java.util.Map.Entry entry : internalGetTags().getMap().entrySet()) { alluxio.shaded.client.com.google.protobuf.MapEntry tags__ = TagsDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += alluxio.shaded.client.com.google.protobuf.CodedOutputStream .alluxio.shaded.client.com.uteMessageSize(6, tags__); } 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 alluxio.grpc.Metric)) { return super.equals(obj); } alluxio.grpc.Metric other = (alluxio.grpc.Metric) obj; if (hasInstance() != other.hasInstance()) return false; if (hasInstance()) { if (!getInstance() .equals(other.getInstance())) return false; } if (hasSource() != other.hasSource()) return false; if (hasSource()) { if (!getSource() .equals(other.getSource())) return false; } if (hasName() != other.hasName()) return false; if (hasName()) { if (!getName() .equals(other.getName())) return false; } if (hasValue() != other.hasValue()) return false; if (hasValue()) { if (java.lang.Double.doubleToLongBits(getValue()) != java.lang.Double.doubleToLongBits( other.getValue())) return false; } if (hasMetricType() != other.hasMetricType()) return false; if (hasMetricType()) { if (metricType_ != other.metricType_) return false; } if (!internalGetTags().equals( other.internalGetTags())) return false; 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(); if (hasInstance()) { hash = (37 * hash) + INSTANCE_FIELD_NUMBER; hash = (53 * hash) + getInstance().hashCode(); } if (hasSource()) { hash = (37 * hash) + SOURCE_FIELD_NUMBER; hash = (53 * hash) + getSource().hashCode(); } if (hasName()) { hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); } if (hasValue()) { hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + alluxio.shaded.client.com.google.protobuf.Internal.hashLong( java.lang.Double.doubleToLongBits(getValue())); } if (hasMetricType()) { hash = (37 * hash) + METRICTYPE_FIELD_NUMBER; hash = (53 * hash) + metricType_; } if (!internalGetTags().getMap().isEmpty()) { hash = (37 * hash) + TAGS_FIELD_NUMBER; hash = (53 * hash) + internalGetTags().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static alluxio.grpc.Metric parseFrom( java.nio.ByteBuffer data) throws alluxio.shaded.client.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static alluxio.grpc.Metric parseFrom( java.nio.ByteBuffer data, alluxio.shaded.client.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws alluxio.shaded.client.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static alluxio.grpc.Metric parseFrom( alluxio.shaded.client.com.google.protobuf.ByteString data) throws alluxio.shaded.client.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static alluxio.grpc.Metric parseFrom( alluxio.shaded.client.com.google.protobuf.ByteString data, alluxio.shaded.client.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws alluxio.shaded.client.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static alluxio.grpc.Metric parseFrom(byte[] data) throws alluxio.shaded.client.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static alluxio.grpc.Metric parseFrom( byte[] data, alluxio.shaded.client.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws alluxio.shaded.client.com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static alluxio.grpc.Metric parseFrom(java.alluxio.shaded.client.io.InputStream input) throws java.alluxio.shaded.client.io.IOException { return alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static alluxio.grpc.Metric parseFrom( java.alluxio.shaded.client.io.InputStream input, alluxio.shaded.client.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.alluxio.shaded.client.io.IOException { return alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static alluxio.grpc.Metric parseDelimitedFrom(java.alluxio.shaded.client.io.InputStream input) throws java.alluxio.shaded.client.io.IOException { return alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static alluxio.grpc.Metric parseDelimitedFrom( java.alluxio.shaded.client.io.InputStream input, alluxio.shaded.client.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.alluxio.shaded.client.io.IOException { return alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static alluxio.grpc.Metric parseFrom( alluxio.shaded.client.com.google.protobuf.CodedInputStream input) throws java.alluxio.shaded.client.io.IOException { return alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static alluxio.grpc.Metric parseFrom( alluxio.shaded.client.com.google.protobuf.CodedInputStream input, alluxio.shaded.client.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.alluxio.shaded.client.io.IOException { return alluxio.shaded.client.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(alluxio.grpc.Metric 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( alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   **
   * Information about metrics.
   * 
* * Protobuf type {@code alluxio.grpc.Metric} */ public static final class Builder extends alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:alluxio.grpc.Metric) alluxio.grpc.MetricOrBuilder { public static final alluxio.shaded.client.com.google.protobuf.Descriptors.Descriptor getDescriptor() { return alluxio.grpc.CommonProto.internal_static_alluxio_grpc_Metric_descriptor; } @SuppressWarnings({"rawtypes"}) protected alluxio.shaded.client.com.google.protobuf.MapField internalGetMapField( int number) { switch (number) { case 6: return internalGetTags(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected alluxio.shaded.client.com.google.protobuf.MapField internalGetMutableMapField( int number) { switch (number) { case 6: return internalGetMutableTags(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return alluxio.grpc.CommonProto.internal_static_alluxio_grpc_Metric_fieldAccessorTable .ensureFieldAccessorsInitialized( alluxio.grpc.Metric.class, alluxio.grpc.Metric.Builder.class); } // Construct using alluxio.grpc.Metric.newBuilder() private Builder() { } private Builder( alluxio.shaded.client.com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); instance_ = ""; bitField0_ = (bitField0_ & ~0x00000001); source_ = ""; bitField0_ = (bitField0_ & ~0x00000002); name_ = ""; bitField0_ = (bitField0_ & ~0x00000004); value_ = 0D; bitField0_ = (bitField0_ & ~0x00000008); metricType_ = 0; bitField0_ = (bitField0_ & ~0x00000010); internalGetMutableTags().clear(); return this; } @java.lang.Override public alluxio.shaded.client.com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return alluxio.grpc.CommonProto.internal_static_alluxio_grpc_Metric_descriptor; } @java.lang.Override public alluxio.grpc.Metric getDefaultInstanceForType() { return alluxio.grpc.Metric.getDefaultInstance(); } @java.lang.Override public alluxio.grpc.Metric build() { alluxio.grpc.Metric result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public alluxio.grpc.Metric buildPartial() { alluxio.grpc.Metric result = new alluxio.grpc.Metric(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) != 0)) { to_bitField0_ |= 0x00000001; } result.instance_ = instance_; if (((from_bitField0_ & 0x00000002) != 0)) { to_bitField0_ |= 0x00000002; } result.source_ = source_; if (((from_bitField0_ & 0x00000004) != 0)) { to_bitField0_ |= 0x00000004; } result.name_ = name_; if (((from_bitField0_ & 0x00000008) != 0)) { result.value_ = value_; to_bitField0_ |= 0x00000008; } if (((from_bitField0_ & 0x00000010) != 0)) { to_bitField0_ |= 0x00000010; } result.metricType_ = metricType_; result.tags_ = internalGetTags(); result.tags_.makeImmutable(); result.bitField0_ = to_bitField0_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( alluxio.shaded.client.com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( alluxio.shaded.client.com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( alluxio.shaded.client.com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( alluxio.shaded.client.com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( alluxio.shaded.client.com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(alluxio.shaded.client.com.google.protobuf.Message other) { if (other instanceof alluxio.grpc.Metric) { return mergeFrom((alluxio.grpc.Metric)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(alluxio.grpc.Metric other) { if (other == alluxio.grpc.Metric.getDefaultInstance()) return this; if (other.hasInstance()) { bitField0_ |= 0x00000001; instance_ = other.instance_; onChanged(); } if (other.hasSource()) { bitField0_ |= 0x00000002; source_ = other.source_; onChanged(); } if (other.hasName()) { bitField0_ |= 0x00000004; name_ = other.name_; onChanged(); } if (other.hasValue()) { setValue(other.getValue()); } if (other.hasMetricType()) { setMetricType(other.getMetricType()); } internalGetMutableTags().mergeFrom( other.internalGetTags()); this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { if (!hasMetricType()) { return false; } return true; } @java.lang.Override public Builder mergeFrom( alluxio.shaded.client.com.google.protobuf.CodedInputStream input, alluxio.shaded.client.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.alluxio.shaded.client.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: { instance_ = input.readBytes(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { source_ = input.readBytes(); bitField0_ |= 0x00000002; break; } // case 18 case 26: { name_ = input.readBytes(); bitField0_ |= 0x00000004; break; } // case 26 case 33: { value_ = input.readDouble(); bitField0_ |= 0x00000008; break; } // case 33 case 40: { int tmpRaw = input.readEnum(); alluxio.grpc.MetricType tmpValue = alluxio.grpc.MetricType.forNumber(tmpRaw); if (tmpValue == null) { mergeUnknownVarintField(5, tmpRaw); } else { metricType_ = tmpRaw; bitField0_ |= 0x00000010; } break; } // case 40 case 50: { alluxio.shaded.client.com.google.protobuf.MapEntry tags__ = input.readMessage( TagsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableTags().getMutableMap().put( tags__.getKey(), tags__.getValue()); break; } // case 50 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (alluxio.shaded.client.com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.lang.Object instance_ = ""; /** * optional string instance = 1; * @return Whether the instance field is set. */ public boolean hasInstance() { return ((bitField0_ & 0x00000001) != 0); } /** * optional string instance = 1; * @return The instance. */ public java.lang.String getInstance() { java.lang.Object ref = instance_; if (!(ref instanceof java.lang.String)) { alluxio.shaded.client.com.google.protobuf.ByteString bs = (alluxio.shaded.client.com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { instance_ = s; } return s; } else { return (java.lang.String) ref; } } /** * optional string instance = 1; * @return The bytes for instance. */ public alluxio.shaded.client.com.google.protobuf.ByteString getInstanceBytes() { java.lang.Object ref = instance_; if (ref instanceof String) { alluxio.shaded.client.com.google.protobuf.ByteString b = alluxio.shaded.client.com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); instance_ = b; return b; } else { return (alluxio.shaded.client.com.google.protobuf.ByteString) ref; } } /** * optional string instance = 1; * @param value The instance to set. * @return This builder for chaining. */ public Builder setInstance( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; instance_ = value; onChanged(); return this; } /** * optional string instance = 1; * @return This builder for chaining. */ public Builder clearInstance() { bitField0_ = (bitField0_ & ~0x00000001); instance_ = getDefaultInstance().getInstance(); onChanged(); return this; } /** * optional string instance = 1; * @param value The bytes for instance to set. * @return This builder for chaining. */ public Builder setInstanceBytes( alluxio.shaded.client.com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000001; instance_ = value; onChanged(); return this; } private java.lang.Object source_ = ""; /** * optional string source = 2; * @return Whether the source field is set. */ public boolean hasSource() { return ((bitField0_ & 0x00000002) != 0); } /** * optional string source = 2; * @return The source. */ public java.lang.String getSource() { java.lang.Object ref = source_; if (!(ref instanceof java.lang.String)) { alluxio.shaded.client.com.google.protobuf.ByteString bs = (alluxio.shaded.client.com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { source_ = s; } return s; } else { return (java.lang.String) ref; } } /** * optional string source = 2; * @return The bytes for source. */ public alluxio.shaded.client.com.google.protobuf.ByteString getSourceBytes() { java.lang.Object ref = source_; if (ref instanceof String) { alluxio.shaded.client.com.google.protobuf.ByteString b = alluxio.shaded.client.com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); source_ = b; return b; } else { return (alluxio.shaded.client.com.google.protobuf.ByteString) ref; } } /** * optional string source = 2; * @param value The source to set. * @return This builder for chaining. */ public Builder setSource( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; source_ = value; onChanged(); return this; } /** * optional string source = 2; * @return This builder for chaining. */ public Builder clearSource() { bitField0_ = (bitField0_ & ~0x00000002); source_ = getDefaultInstance().getSource(); onChanged(); return this; } /** * optional string source = 2; * @param value The bytes for source to set. * @return This builder for chaining. */ public Builder setSourceBytes( alluxio.shaded.client.com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; source_ = value; onChanged(); return this; } private java.lang.Object name_ = ""; /** * optional string name = 3; * @return Whether the name field is set. */ public boolean hasName() { return ((bitField0_ & 0x00000004) != 0); } /** * optional string name = 3; * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { alluxio.shaded.client.com.google.protobuf.ByteString bs = (alluxio.shaded.client.com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (bs.isValidUtf8()) { name_ = s; } return s; } else { return (java.lang.String) ref; } } /** * optional string name = 3; * @return The bytes for name. */ public alluxio.shaded.client.com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { alluxio.shaded.client.com.google.protobuf.ByteString b = alluxio.shaded.client.com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (alluxio.shaded.client.com.google.protobuf.ByteString) ref; } } /** * optional string name = 3; * @param value The name to set. * @return This builder for chaining. */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; name_ = value; onChanged(); return this; } /** * optional string name = 3; * @return This builder for chaining. */ public Builder clearName() { bitField0_ = (bitField0_ & ~0x00000004); name_ = getDefaultInstance().getName(); onChanged(); return this; } /** * optional string name = 3; * @param value The bytes for name to set. * @return This builder for chaining. */ public Builder setNameBytes( alluxio.shaded.client.com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; name_ = value; onChanged(); return this; } private double value_ ; /** * optional double value = 4; * @return Whether the value field is set. */ @java.lang.Override public boolean hasValue() { return ((bitField0_ & 0x00000008) != 0); } /** * optional double value = 4; * @return The value. */ @java.lang.Override public double getValue() { return value_; } /** * optional double value = 4; * @param value The value to set. * @return This builder for chaining. */ public Builder setValue(double value) { bitField0_ |= 0x00000008; value_ = value; onChanged(); return this; } /** * optional double value = 4; * @return This builder for chaining. */ public Builder clearValue() { bitField0_ = (bitField0_ & ~0x00000008); value_ = 0D; onChanged(); return this; } private int metricType_ = 0; /** * required .alluxio.grpc.MetricType metricType = 5; * @return Whether the metricType field is set. */ @java.lang.Override public boolean hasMetricType() { return ((bitField0_ & 0x00000010) != 0); } /** * required .alluxio.grpc.MetricType metricType = 5; * @return The metricType. */ @java.lang.Override public alluxio.grpc.MetricType getMetricType() { @SuppressWarnings("deprecation") alluxio.grpc.MetricType result = alluxio.grpc.MetricType.valueOf(metricType_); return result == null ? alluxio.grpc.MetricType.GAUGE : result; } /** * required .alluxio.grpc.MetricType metricType = 5; * @param value The metricType to set. * @return This builder for chaining. */ public Builder setMetricType(alluxio.grpc.MetricType value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000010; metricType_ = value.getNumber(); onChanged(); return this; } /** * required .alluxio.grpc.MetricType metricType = 5; * @return This builder for chaining. */ public Builder clearMetricType() { bitField0_ = (bitField0_ & ~0x00000010); metricType_ = 0; onChanged(); return this; } private alluxio.shaded.client.com.google.protobuf.MapField< java.lang.String, java.lang.String> tags_; private alluxio.shaded.client.com.google.protobuf.MapField internalGetTags() { if (tags_ == null) { return alluxio.shaded.client.com.google.protobuf.MapField.emptyMapField( TagsDefaultEntryHolder.defaultEntry); } return tags_; } private alluxio.shaded.client.com.google.protobuf.MapField internalGetMutableTags() { onChanged();; if (tags_ == null) { tags_ = alluxio.shaded.client.com.google.protobuf.MapField.newMapField( TagsDefaultEntryHolder.defaultEntry); } if (!tags_.isMutable()) { tags_ = tags_.copy(); } return tags_; } public int getTagsCount() { return internalGetTags().getMap().size(); } /** * map<string, string> tags = 6; */ @java.lang.Override public boolean containsTags( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetTags().getMap().containsKey(key); } /** * Use {@link #getTagsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getTags() { return getTagsMap(); } /** * map<string, string> tags = 6; */ @java.lang.Override public java.util.Map getTagsMap() { return internalGetTags().getMap(); } /** * map<string, string> tags = 6; */ @java.lang.Override public java.lang.String getTagsOrDefault( java.lang.String key, java.lang.String defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetTags().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * map<string, string> tags = 6; */ @java.lang.Override public java.lang.String getTagsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetTags().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } public Builder clearTags() { internalGetMutableTags().getMutableMap() .clear(); return this; } /** * map<string, string> tags = 6; */ public Builder removeTags( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableTags().getMutableMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableTags() { return internalGetMutableTags().getMutableMap(); } /** * map<string, string> tags = 6; */ public Builder putTags( java.lang.String key, java.lang.String value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableTags().getMutableMap() .put(key, value); return this; } /** * map<string, string> tags = 6; */ public Builder putAllTags( java.util.Map values) { internalGetMutableTags().getMutableMap() .putAll(values); return this; } @java.lang.Override public final Builder setUnknownFields( final alluxio.shaded.client.com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final alluxio.shaded.client.com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:alluxio.grpc.Metric) } // @@protoc_insertion_point(class_scope:alluxio.grpc.Metric) private static final alluxio.grpc.Metric DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new alluxio.grpc.Metric(); } public static alluxio.grpc.Metric getDefaultInstance() { return DEFAULT_INSTANCE; } @java.lang.Deprecated public static final alluxio.shaded.client.com.google.protobuf.Parser PARSER = new alluxio.shaded.client.com.google.protobuf.AbstractParser() { @java.lang.Override public Metric parsePartialFrom( alluxio.shaded.client.com.google.protobuf.CodedInputStream input, alluxio.shaded.client.com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws alluxio.shaded.client.com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (alluxio.shaded.client.com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (alluxio.shaded.client.com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.alluxio.shaded.client.io.IOException e) { throw new alluxio.shaded.client.com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static alluxio.shaded.client.com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public alluxio.shaded.client.com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public alluxio.grpc.Metric getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy