Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
io.prometheus.client.Metrics Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: io/prometheus/client/metrics.proto
package io.prometheus.client;
public final class Metrics {
private Metrics() {}
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 io.prometheus.client.MetricType}
*/
public enum MetricType
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* COUNTER must use the Metric field "counter".
*
*
* COUNTER = 0;
*/
COUNTER(0),
/**
*
* GAUGE must use the Metric field "gauge".
*
*
* GAUGE = 1;
*/
GAUGE(1),
/**
*
* SUMMARY must use the Metric field "summary".
*
*
* SUMMARY = 2;
*/
SUMMARY(2),
/**
*
* UNTYPED must use the Metric field "untyped".
*
*
* UNTYPED = 3;
*/
UNTYPED(3),
/**
*
* HISTOGRAM must use the Metric field "histogram".
*
*
* HISTOGRAM = 4;
*/
HISTOGRAM(4),
/**
*
* GAUGE_HISTOGRAM must use the Metric field "histogram".
*
*
* GAUGE_HISTOGRAM = 5;
*/
GAUGE_HISTOGRAM(5),
;
/**
*
* COUNTER must use the Metric field "counter".
*
*
* COUNTER = 0;
*/
public static final int COUNTER_VALUE = 0;
/**
*
* GAUGE must use the Metric field "gauge".
*
*
* GAUGE = 1;
*/
public static final int GAUGE_VALUE = 1;
/**
*
* SUMMARY must use the Metric field "summary".
*
*
* SUMMARY = 2;
*/
public static final int SUMMARY_VALUE = 2;
/**
*
* UNTYPED must use the Metric field "untyped".
*
*
* UNTYPED = 3;
*/
public static final int UNTYPED_VALUE = 3;
/**
*
* HISTOGRAM must use the Metric field "histogram".
*
*
* HISTOGRAM = 4;
*/
public static final int HISTOGRAM_VALUE = 4;
/**
*
* GAUGE_HISTOGRAM must use the Metric field "histogram".
*
*
* GAUGE_HISTOGRAM = 5;
*/
public static final int GAUGE_HISTOGRAM_VALUE = 5;
public final int getNumber() {
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 COUNTER;
case 1: return GAUGE;
case 2: return SUMMARY;
case 3: return UNTYPED;
case 4: return HISTOGRAM;
case 5: return GAUGE_HISTOGRAM;
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() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return io.prometheus.client.Metrics.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.");
}
return VALUES[desc.getIndex()];
}
private final int value;
private MetricType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:io.prometheus.client.MetricType)
}
public interface LabelPairOrBuilder extends
// @@protoc_insertion_point(interface_extends:io.prometheus.client.LabelPair)
com.google.protobuf.MessageOrBuilder {
/**
* optional string name = 1;
* @return Whether the name field is set.
*/
boolean hasName();
/**
* optional string name = 1;
* @return The name.
*/
java.lang.String getName();
/**
* optional string name = 1;
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
* optional string value = 2;
* @return Whether the value field is set.
*/
boolean hasValue();
/**
* optional string value = 2;
* @return The value.
*/
java.lang.String getValue();
/**
* optional string value = 2;
* @return The bytes for value.
*/
com.google.protobuf.ByteString
getValueBytes();
}
/**
* Protobuf type {@code io.prometheus.client.LabelPair}
*/
public static final class LabelPair extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:io.prometheus.client.LabelPair)
LabelPairOrBuilder {
private static final long serialVersionUID = 0L;
// Use LabelPair.newBuilder() to construct.
private LabelPair(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LabelPair() {
name_ = "";
value_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new LabelPair();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private LabelPair(
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: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000001;
name_ = bs;
break;
}
case 18: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000002;
value_ = bs;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().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 io.prometheus.client.Metrics.internal_static_io_prometheus_client_LabelPair_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_LabelPair_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.prometheus.client.Metrics.LabelPair.class, io.prometheus.client.Metrics.LabelPair.Builder.class);
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
* optional string name = 1;
* @return Whether the name field is set.
*/
@java.lang.Override
public boolean hasName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional string name = 1;
* @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 {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
}
}
/**
* optional string name = 1;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VALUE_FIELD_NUMBER = 2;
private volatile java.lang.Object value_;
/**
* optional string value = 2;
* @return Whether the value field is set.
*/
@java.lang.Override
public boolean hasValue() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional string value = 2;
* @return The value.
*/
@java.lang.Override
public java.lang.String getValue() {
java.lang.Object ref = value_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
value_ = s;
}
return s;
}
}
/**
* optional string value = 2;
* @return The bytes for value.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getValueBytes() {
java.lang.Object ref = value_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
value_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
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 (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_);
}
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 io.prometheus.client.Metrics.LabelPair)) {
return super.equals(obj);
}
io.prometheus.client.Metrics.LabelPair other = (io.prometheus.client.Metrics.LabelPair) obj;
if (hasName() != other.hasName()) return false;
if (hasName()) {
if (!getName()
.equals(other.getName())) return false;
}
if (hasValue() != other.hasValue()) return false;
if (hasValue()) {
if (!getValue()
.equals(other.getValue())) 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 (hasName()) {
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
}
if (hasValue()) {
hash = (37 * hash) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + getValue().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.prometheus.client.Metrics.LabelPair parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.LabelPair parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.LabelPair parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.LabelPair parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.LabelPair parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.LabelPair parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.LabelPair parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.LabelPair parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.prometheus.client.Metrics.LabelPair parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.LabelPair parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.prometheus.client.Metrics.LabelPair parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.LabelPair parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.prometheus.client.Metrics.LabelPair 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 io.prometheus.client.LabelPair}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:io.prometheus.client.LabelPair)
io.prometheus.client.Metrics.LabelPairOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_LabelPair_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_LabelPair_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.prometheus.client.Metrics.LabelPair.class, io.prometheus.client.Metrics.LabelPair.Builder.class);
}
// Construct using io.prometheus.client.Metrics.LabelPair.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();
name_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
value_ = "";
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_LabelPair_descriptor;
}
@java.lang.Override
public io.prometheus.client.Metrics.LabelPair getDefaultInstanceForType() {
return io.prometheus.client.Metrics.LabelPair.getDefaultInstance();
}
@java.lang.Override
public io.prometheus.client.Metrics.LabelPair build() {
io.prometheus.client.Metrics.LabelPair result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.prometheus.client.Metrics.LabelPair buildPartial() {
io.prometheus.client.Metrics.LabelPair result = new io.prometheus.client.Metrics.LabelPair(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
to_bitField0_ |= 0x00000001;
}
result.name_ = name_;
if (((from_bitField0_ & 0x00000002) != 0)) {
to_bitField0_ |= 0x00000002;
}
result.value_ = value_;
result.bitField0_ = to_bitField0_;
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 io.prometheus.client.Metrics.LabelPair) {
return mergeFrom((io.prometheus.client.Metrics.LabelPair)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.prometheus.client.Metrics.LabelPair other) {
if (other == io.prometheus.client.Metrics.LabelPair.getDefaultInstance()) return this;
if (other.hasName()) {
bitField0_ |= 0x00000001;
name_ = other.name_;
onChanged();
}
if (other.hasValue()) {
bitField0_ |= 0x00000002;
value_ = other.value_;
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 {
io.prometheus.client.Metrics.LabelPair parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.prometheus.client.Metrics.LabelPair) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
* optional string name = 1;
* @return Whether the name field is set.
*/
public boolean hasName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional string name = 1;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(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 = 1;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string name = 1;
* @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_ |= 0x00000001;
name_ = value;
onChanged();
return this;
}
/**
* optional string name = 1;
* @return This builder for chaining.
*/
public Builder clearName() {
bitField0_ = (bitField0_ & ~0x00000001);
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
* optional string name = 1;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
name_ = value;
onChanged();
return this;
}
private java.lang.Object value_ = "";
/**
* optional string value = 2;
* @return Whether the value field is set.
*/
public boolean hasValue() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional string value = 2;
* @return The value.
*/
public java.lang.String getValue() {
java.lang.Object ref = value_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
value_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string value = 2;
* @return The bytes for value.
*/
public com.google.protobuf.ByteString
getValueBytes() {
java.lang.Object ref = value_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
value_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string value = 2;
* @param value The value to set.
* @return This builder for chaining.
*/
public Builder setValue(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
value_ = value;
onChanged();
return this;
}
/**
* optional string value = 2;
* @return This builder for chaining.
*/
public Builder clearValue() {
bitField0_ = (bitField0_ & ~0x00000002);
value_ = getDefaultInstance().getValue();
onChanged();
return this;
}
/**
* optional string value = 2;
* @param value The bytes for value to set.
* @return This builder for chaining.
*/
public Builder setValueBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
value_ = 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:io.prometheus.client.LabelPair)
}
// @@protoc_insertion_point(class_scope:io.prometheus.client.LabelPair)
private static final io.prometheus.client.Metrics.LabelPair DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.prometheus.client.Metrics.LabelPair();
}
public static io.prometheus.client.Metrics.LabelPair getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LabelPair parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new LabelPair(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 io.prometheus.client.Metrics.LabelPair getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface GaugeOrBuilder extends
// @@protoc_insertion_point(interface_extends:io.prometheus.client.Gauge)
com.google.protobuf.MessageOrBuilder {
/**
* optional double value = 1;
* @return Whether the value field is set.
*/
boolean hasValue();
/**
* optional double value = 1;
* @return The value.
*/
double getValue();
}
/**
* Protobuf type {@code io.prometheus.client.Gauge}
*/
public static final class Gauge extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:io.prometheus.client.Gauge)
GaugeOrBuilder {
private static final long serialVersionUID = 0L;
// Use Gauge.newBuilder() to construct.
private Gauge(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Gauge() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Gauge();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Gauge(
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 9: {
bitField0_ |= 0x00000001;
value_ = input.readDouble();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().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 io.prometheus.client.Metrics.internal_static_io_prometheus_client_Gauge_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Gauge_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.prometheus.client.Metrics.Gauge.class, io.prometheus.client.Metrics.Gauge.Builder.class);
}
private int bitField0_;
public static final int VALUE_FIELD_NUMBER = 1;
private double value_;
/**
* optional double value = 1;
* @return Whether the value field is set.
*/
@java.lang.Override
public boolean hasValue() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional double value = 1;
* @return The value.
*/
@java.lang.Override
public double getValue() {
return value_;
}
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 (((bitField0_ & 0x00000001) != 0)) {
output.writeDouble(1, value_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(1, value_);
}
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 io.prometheus.client.Metrics.Gauge)) {
return super.equals(obj);
}
io.prometheus.client.Metrics.Gauge other = (io.prometheus.client.Metrics.Gauge) obj;
if (hasValue() != other.hasValue()) return false;
if (hasValue()) {
if (java.lang.Double.doubleToLongBits(getValue())
!= java.lang.Double.doubleToLongBits(
other.getValue())) 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 (hasValue()) {
hash = (37 * hash) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getValue()));
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.prometheus.client.Metrics.Gauge parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.Gauge parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.Gauge parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.Gauge parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.Gauge parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.Gauge parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.Gauge parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.Gauge parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.prometheus.client.Metrics.Gauge parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.Gauge parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.prometheus.client.Metrics.Gauge parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.Gauge parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.prometheus.client.Metrics.Gauge 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 io.prometheus.client.Gauge}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:io.prometheus.client.Gauge)
io.prometheus.client.Metrics.GaugeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Gauge_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Gauge_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.prometheus.client.Metrics.Gauge.class, io.prometheus.client.Metrics.Gauge.Builder.class);
}
// Construct using io.prometheus.client.Metrics.Gauge.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();
value_ = 0D;
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Gauge_descriptor;
}
@java.lang.Override
public io.prometheus.client.Metrics.Gauge getDefaultInstanceForType() {
return io.prometheus.client.Metrics.Gauge.getDefaultInstance();
}
@java.lang.Override
public io.prometheus.client.Metrics.Gauge build() {
io.prometheus.client.Metrics.Gauge result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.prometheus.client.Metrics.Gauge buildPartial() {
io.prometheus.client.Metrics.Gauge result = new io.prometheus.client.Metrics.Gauge(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.value_ = value_;
to_bitField0_ |= 0x00000001;
}
result.bitField0_ = to_bitField0_;
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 io.prometheus.client.Metrics.Gauge) {
return mergeFrom((io.prometheus.client.Metrics.Gauge)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.prometheus.client.Metrics.Gauge other) {
if (other == io.prometheus.client.Metrics.Gauge.getDefaultInstance()) return this;
if (other.hasValue()) {
setValue(other.getValue());
}
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 {
io.prometheus.client.Metrics.Gauge parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.prometheus.client.Metrics.Gauge) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private double value_ ;
/**
* optional double value = 1;
* @return Whether the value field is set.
*/
@java.lang.Override
public boolean hasValue() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional double value = 1;
* @return The value.
*/
@java.lang.Override
public double getValue() {
return value_;
}
/**
* optional double value = 1;
* @param value The value to set.
* @return This builder for chaining.
*/
public Builder setValue(double value) {
bitField0_ |= 0x00000001;
value_ = value;
onChanged();
return this;
}
/**
* optional double value = 1;
* @return This builder for chaining.
*/
public Builder clearValue() {
bitField0_ = (bitField0_ & ~0x00000001);
value_ = 0D;
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:io.prometheus.client.Gauge)
}
// @@protoc_insertion_point(class_scope:io.prometheus.client.Gauge)
private static final io.prometheus.client.Metrics.Gauge DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.prometheus.client.Metrics.Gauge();
}
public static io.prometheus.client.Metrics.Gauge getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Gauge parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Gauge(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 io.prometheus.client.Metrics.Gauge getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CounterOrBuilder extends
// @@protoc_insertion_point(interface_extends:io.prometheus.client.Counter)
com.google.protobuf.MessageOrBuilder {
/**
* optional double value = 1;
* @return Whether the value field is set.
*/
boolean hasValue();
/**
* optional double value = 1;
* @return The value.
*/
double getValue();
/**
* optional .io.prometheus.client.Exemplar exemplar = 2;
* @return Whether the exemplar field is set.
*/
boolean hasExemplar();
/**
* optional .io.prometheus.client.Exemplar exemplar = 2;
* @return The exemplar.
*/
io.prometheus.client.Metrics.Exemplar getExemplar();
/**
* optional .io.prometheus.client.Exemplar exemplar = 2;
*/
io.prometheus.client.Metrics.ExemplarOrBuilder getExemplarOrBuilder();
}
/**
* Protobuf type {@code io.prometheus.client.Counter}
*/
public static final class Counter extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:io.prometheus.client.Counter)
CounterOrBuilder {
private static final long serialVersionUID = 0L;
// Use Counter.newBuilder() to construct.
private Counter(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Counter() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Counter();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Counter(
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 9: {
bitField0_ |= 0x00000001;
value_ = input.readDouble();
break;
}
case 18: {
io.prometheus.client.Metrics.Exemplar.Builder subBuilder = null;
if (((bitField0_ & 0x00000002) != 0)) {
subBuilder = exemplar_.toBuilder();
}
exemplar_ = input.readMessage(io.prometheus.client.Metrics.Exemplar.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(exemplar_);
exemplar_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000002;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().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 io.prometheus.client.Metrics.internal_static_io_prometheus_client_Counter_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Counter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.prometheus.client.Metrics.Counter.class, io.prometheus.client.Metrics.Counter.Builder.class);
}
private int bitField0_;
public static final int VALUE_FIELD_NUMBER = 1;
private double value_;
/**
* optional double value = 1;
* @return Whether the value field is set.
*/
@java.lang.Override
public boolean hasValue() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional double value = 1;
* @return The value.
*/
@java.lang.Override
public double getValue() {
return value_;
}
public static final int EXEMPLAR_FIELD_NUMBER = 2;
private io.prometheus.client.Metrics.Exemplar exemplar_;
/**
* optional .io.prometheus.client.Exemplar exemplar = 2;
* @return Whether the exemplar field is set.
*/
@java.lang.Override
public boolean hasExemplar() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional .io.prometheus.client.Exemplar exemplar = 2;
* @return The exemplar.
*/
@java.lang.Override
public io.prometheus.client.Metrics.Exemplar getExemplar() {
return exemplar_ == null ? io.prometheus.client.Metrics.Exemplar.getDefaultInstance() : exemplar_;
}
/**
* optional .io.prometheus.client.Exemplar exemplar = 2;
*/
@java.lang.Override
public io.prometheus.client.Metrics.ExemplarOrBuilder getExemplarOrBuilder() {
return exemplar_ == null ? io.prometheus.client.Metrics.Exemplar.getDefaultInstance() : exemplar_;
}
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 (((bitField0_ & 0x00000001) != 0)) {
output.writeDouble(1, value_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(2, getExemplar());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(1, value_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getExemplar());
}
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 io.prometheus.client.Metrics.Counter)) {
return super.equals(obj);
}
io.prometheus.client.Metrics.Counter other = (io.prometheus.client.Metrics.Counter) obj;
if (hasValue() != other.hasValue()) return false;
if (hasValue()) {
if (java.lang.Double.doubleToLongBits(getValue())
!= java.lang.Double.doubleToLongBits(
other.getValue())) return false;
}
if (hasExemplar() != other.hasExemplar()) return false;
if (hasExemplar()) {
if (!getExemplar()
.equals(other.getExemplar())) 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 (hasValue()) {
hash = (37 * hash) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getValue()));
}
if (hasExemplar()) {
hash = (37 * hash) + EXEMPLAR_FIELD_NUMBER;
hash = (53 * hash) + getExemplar().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.prometheus.client.Metrics.Counter parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.Counter parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.Counter parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.Counter parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.Counter parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.Counter parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.Counter parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.Counter parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.prometheus.client.Metrics.Counter parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.Counter parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.prometheus.client.Metrics.Counter parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.Counter parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.prometheus.client.Metrics.Counter 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 io.prometheus.client.Counter}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:io.prometheus.client.Counter)
io.prometheus.client.Metrics.CounterOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Counter_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Counter_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.prometheus.client.Metrics.Counter.class, io.prometheus.client.Metrics.Counter.Builder.class);
}
// Construct using io.prometheus.client.Metrics.Counter.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getExemplarFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
value_ = 0D;
bitField0_ = (bitField0_ & ~0x00000001);
if (exemplarBuilder_ == null) {
exemplar_ = null;
} else {
exemplarBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Counter_descriptor;
}
@java.lang.Override
public io.prometheus.client.Metrics.Counter getDefaultInstanceForType() {
return io.prometheus.client.Metrics.Counter.getDefaultInstance();
}
@java.lang.Override
public io.prometheus.client.Metrics.Counter build() {
io.prometheus.client.Metrics.Counter result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.prometheus.client.Metrics.Counter buildPartial() {
io.prometheus.client.Metrics.Counter result = new io.prometheus.client.Metrics.Counter(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.value_ = value_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
if (exemplarBuilder_ == null) {
result.exemplar_ = exemplar_;
} else {
result.exemplar_ = exemplarBuilder_.build();
}
to_bitField0_ |= 0x00000002;
}
result.bitField0_ = to_bitField0_;
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 io.prometheus.client.Metrics.Counter) {
return mergeFrom((io.prometheus.client.Metrics.Counter)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.prometheus.client.Metrics.Counter other) {
if (other == io.prometheus.client.Metrics.Counter.getDefaultInstance()) return this;
if (other.hasValue()) {
setValue(other.getValue());
}
if (other.hasExemplar()) {
mergeExemplar(other.getExemplar());
}
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 {
io.prometheus.client.Metrics.Counter parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.prometheus.client.Metrics.Counter) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private double value_ ;
/**
* optional double value = 1;
* @return Whether the value field is set.
*/
@java.lang.Override
public boolean hasValue() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional double value = 1;
* @return The value.
*/
@java.lang.Override
public double getValue() {
return value_;
}
/**
* optional double value = 1;
* @param value The value to set.
* @return This builder for chaining.
*/
public Builder setValue(double value) {
bitField0_ |= 0x00000001;
value_ = value;
onChanged();
return this;
}
/**
* optional double value = 1;
* @return This builder for chaining.
*/
public Builder clearValue() {
bitField0_ = (bitField0_ & ~0x00000001);
value_ = 0D;
onChanged();
return this;
}
private io.prometheus.client.Metrics.Exemplar exemplar_;
private com.google.protobuf.SingleFieldBuilderV3<
io.prometheus.client.Metrics.Exemplar, io.prometheus.client.Metrics.Exemplar.Builder, io.prometheus.client.Metrics.ExemplarOrBuilder> exemplarBuilder_;
/**
* optional .io.prometheus.client.Exemplar exemplar = 2;
* @return Whether the exemplar field is set.
*/
public boolean hasExemplar() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional .io.prometheus.client.Exemplar exemplar = 2;
* @return The exemplar.
*/
public io.prometheus.client.Metrics.Exemplar getExemplar() {
if (exemplarBuilder_ == null) {
return exemplar_ == null ? io.prometheus.client.Metrics.Exemplar.getDefaultInstance() : exemplar_;
} else {
return exemplarBuilder_.getMessage();
}
}
/**
* optional .io.prometheus.client.Exemplar exemplar = 2;
*/
public Builder setExemplar(io.prometheus.client.Metrics.Exemplar value) {
if (exemplarBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
exemplar_ = value;
onChanged();
} else {
exemplarBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
* optional .io.prometheus.client.Exemplar exemplar = 2;
*/
public Builder setExemplar(
io.prometheus.client.Metrics.Exemplar.Builder builderForValue) {
if (exemplarBuilder_ == null) {
exemplar_ = builderForValue.build();
onChanged();
} else {
exemplarBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
return this;
}
/**
* optional .io.prometheus.client.Exemplar exemplar = 2;
*/
public Builder mergeExemplar(io.prometheus.client.Metrics.Exemplar value) {
if (exemplarBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
exemplar_ != null &&
exemplar_ != io.prometheus.client.Metrics.Exemplar.getDefaultInstance()) {
exemplar_ =
io.prometheus.client.Metrics.Exemplar.newBuilder(exemplar_).mergeFrom(value).buildPartial();
} else {
exemplar_ = value;
}
onChanged();
} else {
exemplarBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
* optional .io.prometheus.client.Exemplar exemplar = 2;
*/
public Builder clearExemplar() {
if (exemplarBuilder_ == null) {
exemplar_ = null;
onChanged();
} else {
exemplarBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
/**
* optional .io.prometheus.client.Exemplar exemplar = 2;
*/
public io.prometheus.client.Metrics.Exemplar.Builder getExemplarBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getExemplarFieldBuilder().getBuilder();
}
/**
* optional .io.prometheus.client.Exemplar exemplar = 2;
*/
public io.prometheus.client.Metrics.ExemplarOrBuilder getExemplarOrBuilder() {
if (exemplarBuilder_ != null) {
return exemplarBuilder_.getMessageOrBuilder();
} else {
return exemplar_ == null ?
io.prometheus.client.Metrics.Exemplar.getDefaultInstance() : exemplar_;
}
}
/**
* optional .io.prometheus.client.Exemplar exemplar = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.prometheus.client.Metrics.Exemplar, io.prometheus.client.Metrics.Exemplar.Builder, io.prometheus.client.Metrics.ExemplarOrBuilder>
getExemplarFieldBuilder() {
if (exemplarBuilder_ == null) {
exemplarBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.prometheus.client.Metrics.Exemplar, io.prometheus.client.Metrics.Exemplar.Builder, io.prometheus.client.Metrics.ExemplarOrBuilder>(
getExemplar(),
getParentForChildren(),
isClean());
exemplar_ = null;
}
return exemplarBuilder_;
}
@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:io.prometheus.client.Counter)
}
// @@protoc_insertion_point(class_scope:io.prometheus.client.Counter)
private static final io.prometheus.client.Metrics.Counter DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.prometheus.client.Metrics.Counter();
}
public static io.prometheus.client.Metrics.Counter getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Counter parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Counter(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 io.prometheus.client.Metrics.Counter getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface QuantileOrBuilder extends
// @@protoc_insertion_point(interface_extends:io.prometheus.client.Quantile)
com.google.protobuf.MessageOrBuilder {
/**
* optional double quantile = 1;
* @return Whether the quantile field is set.
*/
boolean hasQuantile();
/**
* optional double quantile = 1;
* @return The quantile.
*/
double getQuantile();
/**
* optional double value = 2;
* @return Whether the value field is set.
*/
boolean hasValue();
/**
* optional double value = 2;
* @return The value.
*/
double getValue();
}
/**
* Protobuf type {@code io.prometheus.client.Quantile}
*/
public static final class Quantile extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:io.prometheus.client.Quantile)
QuantileOrBuilder {
private static final long serialVersionUID = 0L;
// Use Quantile.newBuilder() to construct.
private Quantile(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Quantile() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Quantile();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Quantile(
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 9: {
bitField0_ |= 0x00000001;
quantile_ = input.readDouble();
break;
}
case 17: {
bitField0_ |= 0x00000002;
value_ = input.readDouble();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().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 io.prometheus.client.Metrics.internal_static_io_prometheus_client_Quantile_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Quantile_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.prometheus.client.Metrics.Quantile.class, io.prometheus.client.Metrics.Quantile.Builder.class);
}
private int bitField0_;
public static final int QUANTILE_FIELD_NUMBER = 1;
private double quantile_;
/**
* optional double quantile = 1;
* @return Whether the quantile field is set.
*/
@java.lang.Override
public boolean hasQuantile() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional double quantile = 1;
* @return The quantile.
*/
@java.lang.Override
public double getQuantile() {
return quantile_;
}
public static final int VALUE_FIELD_NUMBER = 2;
private double value_;
/**
* optional double value = 2;
* @return Whether the value field is set.
*/
@java.lang.Override
public boolean hasValue() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional double value = 2;
* @return The value.
*/
@java.lang.Override
public double getValue() {
return value_;
}
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 (((bitField0_ & 0x00000001) != 0)) {
output.writeDouble(1, quantile_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeDouble(2, value_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(1, quantile_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(2, value_);
}
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 io.prometheus.client.Metrics.Quantile)) {
return super.equals(obj);
}
io.prometheus.client.Metrics.Quantile other = (io.prometheus.client.Metrics.Quantile) obj;
if (hasQuantile() != other.hasQuantile()) return false;
if (hasQuantile()) {
if (java.lang.Double.doubleToLongBits(getQuantile())
!= java.lang.Double.doubleToLongBits(
other.getQuantile())) 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 (!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 (hasQuantile()) {
hash = (37 * hash) + QUANTILE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getQuantile()));
}
if (hasValue()) {
hash = (37 * hash) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getValue()));
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.prometheus.client.Metrics.Quantile parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.Quantile parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.Quantile parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.Quantile parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.Quantile parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.Quantile parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.Quantile parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.Quantile parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.prometheus.client.Metrics.Quantile parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.Quantile parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.prometheus.client.Metrics.Quantile parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.Quantile parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.prometheus.client.Metrics.Quantile 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 io.prometheus.client.Quantile}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:io.prometheus.client.Quantile)
io.prometheus.client.Metrics.QuantileOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Quantile_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Quantile_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.prometheus.client.Metrics.Quantile.class, io.prometheus.client.Metrics.Quantile.Builder.class);
}
// Construct using io.prometheus.client.Metrics.Quantile.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();
quantile_ = 0D;
bitField0_ = (bitField0_ & ~0x00000001);
value_ = 0D;
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Quantile_descriptor;
}
@java.lang.Override
public io.prometheus.client.Metrics.Quantile getDefaultInstanceForType() {
return io.prometheus.client.Metrics.Quantile.getDefaultInstance();
}
@java.lang.Override
public io.prometheus.client.Metrics.Quantile build() {
io.prometheus.client.Metrics.Quantile result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.prometheus.client.Metrics.Quantile buildPartial() {
io.prometheus.client.Metrics.Quantile result = new io.prometheus.client.Metrics.Quantile(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.quantile_ = quantile_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.value_ = value_;
to_bitField0_ |= 0x00000002;
}
result.bitField0_ = to_bitField0_;
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 io.prometheus.client.Metrics.Quantile) {
return mergeFrom((io.prometheus.client.Metrics.Quantile)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.prometheus.client.Metrics.Quantile other) {
if (other == io.prometheus.client.Metrics.Quantile.getDefaultInstance()) return this;
if (other.hasQuantile()) {
setQuantile(other.getQuantile());
}
if (other.hasValue()) {
setValue(other.getValue());
}
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 {
io.prometheus.client.Metrics.Quantile parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.prometheus.client.Metrics.Quantile) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private double quantile_ ;
/**
* optional double quantile = 1;
* @return Whether the quantile field is set.
*/
@java.lang.Override
public boolean hasQuantile() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional double quantile = 1;
* @return The quantile.
*/
@java.lang.Override
public double getQuantile() {
return quantile_;
}
/**
* optional double quantile = 1;
* @param value The quantile to set.
* @return This builder for chaining.
*/
public Builder setQuantile(double value) {
bitField0_ |= 0x00000001;
quantile_ = value;
onChanged();
return this;
}
/**
* optional double quantile = 1;
* @return This builder for chaining.
*/
public Builder clearQuantile() {
bitField0_ = (bitField0_ & ~0x00000001);
quantile_ = 0D;
onChanged();
return this;
}
private double value_ ;
/**
* optional double value = 2;
* @return Whether the value field is set.
*/
@java.lang.Override
public boolean hasValue() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional double value = 2;
* @return The value.
*/
@java.lang.Override
public double getValue() {
return value_;
}
/**
* optional double value = 2;
* @param value The value to set.
* @return This builder for chaining.
*/
public Builder setValue(double value) {
bitField0_ |= 0x00000002;
value_ = value;
onChanged();
return this;
}
/**
* optional double value = 2;
* @return This builder for chaining.
*/
public Builder clearValue() {
bitField0_ = (bitField0_ & ~0x00000002);
value_ = 0D;
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:io.prometheus.client.Quantile)
}
// @@protoc_insertion_point(class_scope:io.prometheus.client.Quantile)
private static final io.prometheus.client.Metrics.Quantile DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.prometheus.client.Metrics.Quantile();
}
public static io.prometheus.client.Metrics.Quantile getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Quantile parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Quantile(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 io.prometheus.client.Metrics.Quantile getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface SummaryOrBuilder extends
// @@protoc_insertion_point(interface_extends:io.prometheus.client.Summary)
com.google.protobuf.MessageOrBuilder {
/**
* optional uint64 sample_count = 1;
* @return Whether the sampleCount field is set.
*/
boolean hasSampleCount();
/**
* optional uint64 sample_count = 1;
* @return The sampleCount.
*/
long getSampleCount();
/**
* optional double sample_sum = 2;
* @return Whether the sampleSum field is set.
*/
boolean hasSampleSum();
/**
* optional double sample_sum = 2;
* @return The sampleSum.
*/
double getSampleSum();
/**
* repeated .io.prometheus.client.Quantile quantile = 3;
*/
java.util.List
getQuantileList();
/**
* repeated .io.prometheus.client.Quantile quantile = 3;
*/
io.prometheus.client.Metrics.Quantile getQuantile(int index);
/**
* repeated .io.prometheus.client.Quantile quantile = 3;
*/
int getQuantileCount();
/**
* repeated .io.prometheus.client.Quantile quantile = 3;
*/
java.util.List extends io.prometheus.client.Metrics.QuantileOrBuilder>
getQuantileOrBuilderList();
/**
* repeated .io.prometheus.client.Quantile quantile = 3;
*/
io.prometheus.client.Metrics.QuantileOrBuilder getQuantileOrBuilder(
int index);
}
/**
* Protobuf type {@code io.prometheus.client.Summary}
*/
public static final class Summary extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:io.prometheus.client.Summary)
SummaryOrBuilder {
private static final long serialVersionUID = 0L;
// Use Summary.newBuilder() to construct.
private Summary(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Summary() {
quantile_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Summary();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Summary(
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: {
bitField0_ |= 0x00000001;
sampleCount_ = input.readUInt64();
break;
}
case 17: {
bitField0_ |= 0x00000002;
sampleSum_ = input.readDouble();
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
quantile_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
quantile_.add(
input.readMessage(io.prometheus.client.Metrics.Quantile.PARSER, extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000004) != 0)) {
quantile_ = java.util.Collections.unmodifiableList(quantile_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Summary_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Summary_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.prometheus.client.Metrics.Summary.class, io.prometheus.client.Metrics.Summary.Builder.class);
}
private int bitField0_;
public static final int SAMPLE_COUNT_FIELD_NUMBER = 1;
private long sampleCount_;
/**
* optional uint64 sample_count = 1;
* @return Whether the sampleCount field is set.
*/
@java.lang.Override
public boolean hasSampleCount() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional uint64 sample_count = 1;
* @return The sampleCount.
*/
@java.lang.Override
public long getSampleCount() {
return sampleCount_;
}
public static final int SAMPLE_SUM_FIELD_NUMBER = 2;
private double sampleSum_;
/**
* optional double sample_sum = 2;
* @return Whether the sampleSum field is set.
*/
@java.lang.Override
public boolean hasSampleSum() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional double sample_sum = 2;
* @return The sampleSum.
*/
@java.lang.Override
public double getSampleSum() {
return sampleSum_;
}
public static final int QUANTILE_FIELD_NUMBER = 3;
private java.util.List quantile_;
/**
* repeated .io.prometheus.client.Quantile quantile = 3;
*/
@java.lang.Override
public java.util.List getQuantileList() {
return quantile_;
}
/**
* repeated .io.prometheus.client.Quantile quantile = 3;
*/
@java.lang.Override
public java.util.List extends io.prometheus.client.Metrics.QuantileOrBuilder>
getQuantileOrBuilderList() {
return quantile_;
}
/**
* repeated .io.prometheus.client.Quantile quantile = 3;
*/
@java.lang.Override
public int getQuantileCount() {
return quantile_.size();
}
/**
* repeated .io.prometheus.client.Quantile quantile = 3;
*/
@java.lang.Override
public io.prometheus.client.Metrics.Quantile getQuantile(int index) {
return quantile_.get(index);
}
/**
* repeated .io.prometheus.client.Quantile quantile = 3;
*/
@java.lang.Override
public io.prometheus.client.Metrics.QuantileOrBuilder getQuantileOrBuilder(
int index) {
return quantile_.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 {
if (((bitField0_ & 0x00000001) != 0)) {
output.writeUInt64(1, sampleCount_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeDouble(2, sampleSum_);
}
for (int i = 0; i < quantile_.size(); i++) {
output.writeMessage(3, quantile_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, sampleCount_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(2, sampleSum_);
}
for (int i = 0; i < quantile_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, quantile_.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 io.prometheus.client.Metrics.Summary)) {
return super.equals(obj);
}
io.prometheus.client.Metrics.Summary other = (io.prometheus.client.Metrics.Summary) obj;
if (hasSampleCount() != other.hasSampleCount()) return false;
if (hasSampleCount()) {
if (getSampleCount()
!= other.getSampleCount()) return false;
}
if (hasSampleSum() != other.hasSampleSum()) return false;
if (hasSampleSum()) {
if (java.lang.Double.doubleToLongBits(getSampleSum())
!= java.lang.Double.doubleToLongBits(
other.getSampleSum())) return false;
}
if (!getQuantileList()
.equals(other.getQuantileList())) 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 (hasSampleCount()) {
hash = (37 * hash) + SAMPLE_COUNT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getSampleCount());
}
if (hasSampleSum()) {
hash = (37 * hash) + SAMPLE_SUM_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getSampleSum()));
}
if (getQuantileCount() > 0) {
hash = (37 * hash) + QUANTILE_FIELD_NUMBER;
hash = (53 * hash) + getQuantileList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.prometheus.client.Metrics.Summary parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.Summary parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.Summary parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.Summary parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.Summary parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.Summary parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.Summary parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.Summary parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.prometheus.client.Metrics.Summary parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.Summary parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.prometheus.client.Metrics.Summary parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.Summary parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.prometheus.client.Metrics.Summary 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 io.prometheus.client.Summary}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:io.prometheus.client.Summary)
io.prometheus.client.Metrics.SummaryOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Summary_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Summary_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.prometheus.client.Metrics.Summary.class, io.prometheus.client.Metrics.Summary.Builder.class);
}
// Construct using io.prometheus.client.Metrics.Summary.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getQuantileFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
sampleCount_ = 0L;
bitField0_ = (bitField0_ & ~0x00000001);
sampleSum_ = 0D;
bitField0_ = (bitField0_ & ~0x00000002);
if (quantileBuilder_ == null) {
quantile_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
} else {
quantileBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Summary_descriptor;
}
@java.lang.Override
public io.prometheus.client.Metrics.Summary getDefaultInstanceForType() {
return io.prometheus.client.Metrics.Summary.getDefaultInstance();
}
@java.lang.Override
public io.prometheus.client.Metrics.Summary build() {
io.prometheus.client.Metrics.Summary result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.prometheus.client.Metrics.Summary buildPartial() {
io.prometheus.client.Metrics.Summary result = new io.prometheus.client.Metrics.Summary(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.sampleCount_ = sampleCount_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.sampleSum_ = sampleSum_;
to_bitField0_ |= 0x00000002;
}
if (quantileBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
quantile_ = java.util.Collections.unmodifiableList(quantile_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.quantile_ = quantile_;
} else {
result.quantile_ = quantileBuilder_.build();
}
result.bitField0_ = to_bitField0_;
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 io.prometheus.client.Metrics.Summary) {
return mergeFrom((io.prometheus.client.Metrics.Summary)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.prometheus.client.Metrics.Summary other) {
if (other == io.prometheus.client.Metrics.Summary.getDefaultInstance()) return this;
if (other.hasSampleCount()) {
setSampleCount(other.getSampleCount());
}
if (other.hasSampleSum()) {
setSampleSum(other.getSampleSum());
}
if (quantileBuilder_ == null) {
if (!other.quantile_.isEmpty()) {
if (quantile_.isEmpty()) {
quantile_ = other.quantile_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureQuantileIsMutable();
quantile_.addAll(other.quantile_);
}
onChanged();
}
} else {
if (!other.quantile_.isEmpty()) {
if (quantileBuilder_.isEmpty()) {
quantileBuilder_.dispose();
quantileBuilder_ = null;
quantile_ = other.quantile_;
bitField0_ = (bitField0_ & ~0x00000004);
quantileBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getQuantileFieldBuilder() : null;
} else {
quantileBuilder_.addAllMessages(other.quantile_);
}
}
}
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 {
io.prometheus.client.Metrics.Summary parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.prometheus.client.Metrics.Summary) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private long sampleCount_ ;
/**
* optional uint64 sample_count = 1;
* @return Whether the sampleCount field is set.
*/
@java.lang.Override
public boolean hasSampleCount() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional uint64 sample_count = 1;
* @return The sampleCount.
*/
@java.lang.Override
public long getSampleCount() {
return sampleCount_;
}
/**
* optional uint64 sample_count = 1;
* @param value The sampleCount to set.
* @return This builder for chaining.
*/
public Builder setSampleCount(long value) {
bitField0_ |= 0x00000001;
sampleCount_ = value;
onChanged();
return this;
}
/**
* optional uint64 sample_count = 1;
* @return This builder for chaining.
*/
public Builder clearSampleCount() {
bitField0_ = (bitField0_ & ~0x00000001);
sampleCount_ = 0L;
onChanged();
return this;
}
private double sampleSum_ ;
/**
* optional double sample_sum = 2;
* @return Whether the sampleSum field is set.
*/
@java.lang.Override
public boolean hasSampleSum() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional double sample_sum = 2;
* @return The sampleSum.
*/
@java.lang.Override
public double getSampleSum() {
return sampleSum_;
}
/**
* optional double sample_sum = 2;
* @param value The sampleSum to set.
* @return This builder for chaining.
*/
public Builder setSampleSum(double value) {
bitField0_ |= 0x00000002;
sampleSum_ = value;
onChanged();
return this;
}
/**
* optional double sample_sum = 2;
* @return This builder for chaining.
*/
public Builder clearSampleSum() {
bitField0_ = (bitField0_ & ~0x00000002);
sampleSum_ = 0D;
onChanged();
return this;
}
private java.util.List quantile_ =
java.util.Collections.emptyList();
private void ensureQuantileIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
quantile_ = new java.util.ArrayList(quantile_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.prometheus.client.Metrics.Quantile, io.prometheus.client.Metrics.Quantile.Builder, io.prometheus.client.Metrics.QuantileOrBuilder> quantileBuilder_;
/**
* repeated .io.prometheus.client.Quantile quantile = 3;
*/
public java.util.List getQuantileList() {
if (quantileBuilder_ == null) {
return java.util.Collections.unmodifiableList(quantile_);
} else {
return quantileBuilder_.getMessageList();
}
}
/**
* repeated .io.prometheus.client.Quantile quantile = 3;
*/
public int getQuantileCount() {
if (quantileBuilder_ == null) {
return quantile_.size();
} else {
return quantileBuilder_.getCount();
}
}
/**
* repeated .io.prometheus.client.Quantile quantile = 3;
*/
public io.prometheus.client.Metrics.Quantile getQuantile(int index) {
if (quantileBuilder_ == null) {
return quantile_.get(index);
} else {
return quantileBuilder_.getMessage(index);
}
}
/**
* repeated .io.prometheus.client.Quantile quantile = 3;
*/
public Builder setQuantile(
int index, io.prometheus.client.Metrics.Quantile value) {
if (quantileBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureQuantileIsMutable();
quantile_.set(index, value);
onChanged();
} else {
quantileBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .io.prometheus.client.Quantile quantile = 3;
*/
public Builder setQuantile(
int index, io.prometheus.client.Metrics.Quantile.Builder builderForValue) {
if (quantileBuilder_ == null) {
ensureQuantileIsMutable();
quantile_.set(index, builderForValue.build());
onChanged();
} else {
quantileBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .io.prometheus.client.Quantile quantile = 3;
*/
public Builder addQuantile(io.prometheus.client.Metrics.Quantile value) {
if (quantileBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureQuantileIsMutable();
quantile_.add(value);
onChanged();
} else {
quantileBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .io.prometheus.client.Quantile quantile = 3;
*/
public Builder addQuantile(
int index, io.prometheus.client.Metrics.Quantile value) {
if (quantileBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureQuantileIsMutable();
quantile_.add(index, value);
onChanged();
} else {
quantileBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .io.prometheus.client.Quantile quantile = 3;
*/
public Builder addQuantile(
io.prometheus.client.Metrics.Quantile.Builder builderForValue) {
if (quantileBuilder_ == null) {
ensureQuantileIsMutable();
quantile_.add(builderForValue.build());
onChanged();
} else {
quantileBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .io.prometheus.client.Quantile quantile = 3;
*/
public Builder addQuantile(
int index, io.prometheus.client.Metrics.Quantile.Builder builderForValue) {
if (quantileBuilder_ == null) {
ensureQuantileIsMutable();
quantile_.add(index, builderForValue.build());
onChanged();
} else {
quantileBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .io.prometheus.client.Quantile quantile = 3;
*/
public Builder addAllQuantile(
java.lang.Iterable extends io.prometheus.client.Metrics.Quantile> values) {
if (quantileBuilder_ == null) {
ensureQuantileIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, quantile_);
onChanged();
} else {
quantileBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .io.prometheus.client.Quantile quantile = 3;
*/
public Builder clearQuantile() {
if (quantileBuilder_ == null) {
quantile_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
quantileBuilder_.clear();
}
return this;
}
/**
* repeated .io.prometheus.client.Quantile quantile = 3;
*/
public Builder removeQuantile(int index) {
if (quantileBuilder_ == null) {
ensureQuantileIsMutable();
quantile_.remove(index);
onChanged();
} else {
quantileBuilder_.remove(index);
}
return this;
}
/**
* repeated .io.prometheus.client.Quantile quantile = 3;
*/
public io.prometheus.client.Metrics.Quantile.Builder getQuantileBuilder(
int index) {
return getQuantileFieldBuilder().getBuilder(index);
}
/**
* repeated .io.prometheus.client.Quantile quantile = 3;
*/
public io.prometheus.client.Metrics.QuantileOrBuilder getQuantileOrBuilder(
int index) {
if (quantileBuilder_ == null) {
return quantile_.get(index); } else {
return quantileBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .io.prometheus.client.Quantile quantile = 3;
*/
public java.util.List extends io.prometheus.client.Metrics.QuantileOrBuilder>
getQuantileOrBuilderList() {
if (quantileBuilder_ != null) {
return quantileBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(quantile_);
}
}
/**
* repeated .io.prometheus.client.Quantile quantile = 3;
*/
public io.prometheus.client.Metrics.Quantile.Builder addQuantileBuilder() {
return getQuantileFieldBuilder().addBuilder(
io.prometheus.client.Metrics.Quantile.getDefaultInstance());
}
/**
* repeated .io.prometheus.client.Quantile quantile = 3;
*/
public io.prometheus.client.Metrics.Quantile.Builder addQuantileBuilder(
int index) {
return getQuantileFieldBuilder().addBuilder(
index, io.prometheus.client.Metrics.Quantile.getDefaultInstance());
}
/**
* repeated .io.prometheus.client.Quantile quantile = 3;
*/
public java.util.List
getQuantileBuilderList() {
return getQuantileFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.prometheus.client.Metrics.Quantile, io.prometheus.client.Metrics.Quantile.Builder, io.prometheus.client.Metrics.QuantileOrBuilder>
getQuantileFieldBuilder() {
if (quantileBuilder_ == null) {
quantileBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.prometheus.client.Metrics.Quantile, io.prometheus.client.Metrics.Quantile.Builder, io.prometheus.client.Metrics.QuantileOrBuilder>(
quantile_,
((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
quantile_ = null;
}
return quantileBuilder_;
}
@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:io.prometheus.client.Summary)
}
// @@protoc_insertion_point(class_scope:io.prometheus.client.Summary)
private static final io.prometheus.client.Metrics.Summary DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.prometheus.client.Metrics.Summary();
}
public static io.prometheus.client.Metrics.Summary getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Summary parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Summary(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 io.prometheus.client.Metrics.Summary getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface UntypedOrBuilder extends
// @@protoc_insertion_point(interface_extends:io.prometheus.client.Untyped)
com.google.protobuf.MessageOrBuilder {
/**
* optional double value = 1;
* @return Whether the value field is set.
*/
boolean hasValue();
/**
* optional double value = 1;
* @return The value.
*/
double getValue();
}
/**
* Protobuf type {@code io.prometheus.client.Untyped}
*/
public static final class Untyped extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:io.prometheus.client.Untyped)
UntypedOrBuilder {
private static final long serialVersionUID = 0L;
// Use Untyped.newBuilder() to construct.
private Untyped(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Untyped() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Untyped();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Untyped(
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 9: {
bitField0_ |= 0x00000001;
value_ = input.readDouble();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().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 io.prometheus.client.Metrics.internal_static_io_prometheus_client_Untyped_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Untyped_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.prometheus.client.Metrics.Untyped.class, io.prometheus.client.Metrics.Untyped.Builder.class);
}
private int bitField0_;
public static final int VALUE_FIELD_NUMBER = 1;
private double value_;
/**
* optional double value = 1;
* @return Whether the value field is set.
*/
@java.lang.Override
public boolean hasValue() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional double value = 1;
* @return The value.
*/
@java.lang.Override
public double getValue() {
return value_;
}
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 (((bitField0_ & 0x00000001) != 0)) {
output.writeDouble(1, value_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(1, value_);
}
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 io.prometheus.client.Metrics.Untyped)) {
return super.equals(obj);
}
io.prometheus.client.Metrics.Untyped other = (io.prometheus.client.Metrics.Untyped) obj;
if (hasValue() != other.hasValue()) return false;
if (hasValue()) {
if (java.lang.Double.doubleToLongBits(getValue())
!= java.lang.Double.doubleToLongBits(
other.getValue())) 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 (hasValue()) {
hash = (37 * hash) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getValue()));
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.prometheus.client.Metrics.Untyped parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.Untyped parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.Untyped parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.Untyped parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.Untyped parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.Untyped parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.Untyped parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.Untyped parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.prometheus.client.Metrics.Untyped parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.Untyped parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.prometheus.client.Metrics.Untyped parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.Untyped parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.prometheus.client.Metrics.Untyped 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 io.prometheus.client.Untyped}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:io.prometheus.client.Untyped)
io.prometheus.client.Metrics.UntypedOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Untyped_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Untyped_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.prometheus.client.Metrics.Untyped.class, io.prometheus.client.Metrics.Untyped.Builder.class);
}
// Construct using io.prometheus.client.Metrics.Untyped.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();
value_ = 0D;
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Untyped_descriptor;
}
@java.lang.Override
public io.prometheus.client.Metrics.Untyped getDefaultInstanceForType() {
return io.prometheus.client.Metrics.Untyped.getDefaultInstance();
}
@java.lang.Override
public io.prometheus.client.Metrics.Untyped build() {
io.prometheus.client.Metrics.Untyped result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.prometheus.client.Metrics.Untyped buildPartial() {
io.prometheus.client.Metrics.Untyped result = new io.prometheus.client.Metrics.Untyped(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.value_ = value_;
to_bitField0_ |= 0x00000001;
}
result.bitField0_ = to_bitField0_;
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 io.prometheus.client.Metrics.Untyped) {
return mergeFrom((io.prometheus.client.Metrics.Untyped)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.prometheus.client.Metrics.Untyped other) {
if (other == io.prometheus.client.Metrics.Untyped.getDefaultInstance()) return this;
if (other.hasValue()) {
setValue(other.getValue());
}
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 {
io.prometheus.client.Metrics.Untyped parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.prometheus.client.Metrics.Untyped) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private double value_ ;
/**
* optional double value = 1;
* @return Whether the value field is set.
*/
@java.lang.Override
public boolean hasValue() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional double value = 1;
* @return The value.
*/
@java.lang.Override
public double getValue() {
return value_;
}
/**
* optional double value = 1;
* @param value The value to set.
* @return This builder for chaining.
*/
public Builder setValue(double value) {
bitField0_ |= 0x00000001;
value_ = value;
onChanged();
return this;
}
/**
* optional double value = 1;
* @return This builder for chaining.
*/
public Builder clearValue() {
bitField0_ = (bitField0_ & ~0x00000001);
value_ = 0D;
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:io.prometheus.client.Untyped)
}
// @@protoc_insertion_point(class_scope:io.prometheus.client.Untyped)
private static final io.prometheus.client.Metrics.Untyped DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.prometheus.client.Metrics.Untyped();
}
public static io.prometheus.client.Metrics.Untyped getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Untyped parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Untyped(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 io.prometheus.client.Metrics.Untyped getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface HistogramOrBuilder extends
// @@protoc_insertion_point(interface_extends:io.prometheus.client.Histogram)
com.google.protobuf.MessageOrBuilder {
/**
* optional uint64 sample_count = 1;
* @return Whether the sampleCount field is set.
*/
boolean hasSampleCount();
/**
* optional uint64 sample_count = 1;
* @return The sampleCount.
*/
long getSampleCount();
/**
*
* Overrides sample_count if > 0.
*
*
* optional double sample_count_float = 4;
* @return Whether the sampleCountFloat field is set.
*/
boolean hasSampleCountFloat();
/**
*
* Overrides sample_count if > 0.
*
*
* optional double sample_count_float = 4;
* @return The sampleCountFloat.
*/
double getSampleCountFloat();
/**
* optional double sample_sum = 2;
* @return Whether the sampleSum field is set.
*/
boolean hasSampleSum();
/**
* optional double sample_sum = 2;
* @return The sampleSum.
*/
double getSampleSum();
/**
*
* Buckets for the conventional histogram.
*
*
* repeated .io.prometheus.client.Bucket bucket = 3;
*/
java.util.List
getBucketList();
/**
*
* Buckets for the conventional histogram.
*
*
* repeated .io.prometheus.client.Bucket bucket = 3;
*/
io.prometheus.client.Metrics.Bucket getBucket(int index);
/**
*
* Buckets for the conventional histogram.
*
*
* repeated .io.prometheus.client.Bucket bucket = 3;
*/
int getBucketCount();
/**
*
* Buckets for the conventional histogram.
*
*
* repeated .io.prometheus.client.Bucket bucket = 3;
*/
java.util.List extends io.prometheus.client.Metrics.BucketOrBuilder>
getBucketOrBuilderList();
/**
*
* Buckets for the conventional histogram.
*
*
* repeated .io.prometheus.client.Bucket bucket = 3;
*/
io.prometheus.client.Metrics.BucketOrBuilder getBucketOrBuilder(
int index);
/**
*
* schema defines the bucket schema. Currently, valid numbers are -4 <= n <= 8.
* They are all for base-2 bucket schemas, where 1 is a bucket boundary in each case, and
* then each power of two is divided into 2^n logarithmic buckets.
* Or in other words, each bucket boundary is the previous boundary times 2^(2^-n).
* In the future, more bucket schemas may be added using numbers < -4 or > 8.
*
*
* optional sint32 schema = 5;
* @return Whether the schema field is set.
*/
boolean hasSchema();
/**
*
* schema defines the bucket schema. Currently, valid numbers are -4 <= n <= 8.
* They are all for base-2 bucket schemas, where 1 is a bucket boundary in each case, and
* then each power of two is divided into 2^n logarithmic buckets.
* Or in other words, each bucket boundary is the previous boundary times 2^(2^-n).
* In the future, more bucket schemas may be added using numbers < -4 or > 8.
*
*
* optional sint32 schema = 5;
* @return The schema.
*/
int getSchema();
/**
*
* Breadth of the zero bucket.
*
*
* optional double zero_threshold = 6;
* @return Whether the zeroThreshold field is set.
*/
boolean hasZeroThreshold();
/**
*
* Breadth of the zero bucket.
*
*
* optional double zero_threshold = 6;
* @return The zeroThreshold.
*/
double getZeroThreshold();
/**
*
* Count in zero bucket.
*
*
* optional uint64 zero_count = 7;
* @return Whether the zeroCount field is set.
*/
boolean hasZeroCount();
/**
*
* Count in zero bucket.
*
*
* optional uint64 zero_count = 7;
* @return The zeroCount.
*/
long getZeroCount();
/**
*
* Overrides sb_zero_count if > 0.
*
*
* optional double zero_count_float = 8;
* @return Whether the zeroCountFloat field is set.
*/
boolean hasZeroCountFloat();
/**
*
* Overrides sb_zero_count if > 0.
*
*
* optional double zero_count_float = 8;
* @return The zeroCountFloat.
*/
double getZeroCountFloat();
/**
*
* Negative buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan negative_span = 9;
*/
java.util.List
getNegativeSpanList();
/**
*
* Negative buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan negative_span = 9;
*/
io.prometheus.client.Metrics.BucketSpan getNegativeSpan(int index);
/**
*
* Negative buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan negative_span = 9;
*/
int getNegativeSpanCount();
/**
*
* Negative buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan negative_span = 9;
*/
java.util.List extends io.prometheus.client.Metrics.BucketSpanOrBuilder>
getNegativeSpanOrBuilderList();
/**
*
* Negative buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan negative_span = 9;
*/
io.prometheus.client.Metrics.BucketSpanOrBuilder getNegativeSpanOrBuilder(
int index);
/**
*
* Use either "negative_delta" or "negative_count", the former for
* regular histograms with integer counts, the latter for float
* histograms.
*
*
* repeated sint64 negative_delta = 10;
* @return A list containing the negativeDelta.
*/
java.util.List getNegativeDeltaList();
/**
*
* Use either "negative_delta" or "negative_count", the former for
* regular histograms with integer counts, the latter for float
* histograms.
*
*
* repeated sint64 negative_delta = 10;
* @return The count of negativeDelta.
*/
int getNegativeDeltaCount();
/**
*
* Use either "negative_delta" or "negative_count", the former for
* regular histograms with integer counts, the latter for float
* histograms.
*
*
* repeated sint64 negative_delta = 10;
* @param index The index of the element to return.
* @return The negativeDelta at the given index.
*/
long getNegativeDelta(int index);
/**
*
* Absolute count of each bucket.
*
*
* repeated double negative_count = 11;
* @return A list containing the negativeCount.
*/
java.util.List getNegativeCountList();
/**
*
* Absolute count of each bucket.
*
*
* repeated double negative_count = 11;
* @return The count of negativeCount.
*/
int getNegativeCountCount();
/**
*
* Absolute count of each bucket.
*
*
* repeated double negative_count = 11;
* @param index The index of the element to return.
* @return The negativeCount at the given index.
*/
double getNegativeCount(int index);
/**
*
* Positive buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan positive_span = 12;
*/
java.util.List
getPositiveSpanList();
/**
*
* Positive buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan positive_span = 12;
*/
io.prometheus.client.Metrics.BucketSpan getPositiveSpan(int index);
/**
*
* Positive buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan positive_span = 12;
*/
int getPositiveSpanCount();
/**
*
* Positive buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan positive_span = 12;
*/
java.util.List extends io.prometheus.client.Metrics.BucketSpanOrBuilder>
getPositiveSpanOrBuilderList();
/**
*
* Positive buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan positive_span = 12;
*/
io.prometheus.client.Metrics.BucketSpanOrBuilder getPositiveSpanOrBuilder(
int index);
/**
*
* Use either "positive_delta" or "positive_count", the former for
* regular histograms with integer counts, the latter for float
* histograms.
*
*
* repeated sint64 positive_delta = 13;
* @return A list containing the positiveDelta.
*/
java.util.List getPositiveDeltaList();
/**
*
* Use either "positive_delta" or "positive_count", the former for
* regular histograms with integer counts, the latter for float
* histograms.
*
*
* repeated sint64 positive_delta = 13;
* @return The count of positiveDelta.
*/
int getPositiveDeltaCount();
/**
*
* Use either "positive_delta" or "positive_count", the former for
* regular histograms with integer counts, the latter for float
* histograms.
*
*
* repeated sint64 positive_delta = 13;
* @param index The index of the element to return.
* @return The positiveDelta at the given index.
*/
long getPositiveDelta(int index);
/**
*
* Absolute count of each bucket.
*
*
* repeated double positive_count = 14;
* @return A list containing the positiveCount.
*/
java.util.List getPositiveCountList();
/**
*
* Absolute count of each bucket.
*
*
* repeated double positive_count = 14;
* @return The count of positiveCount.
*/
int getPositiveCountCount();
/**
*
* Absolute count of each bucket.
*
*
* repeated double positive_count = 14;
* @param index The index of the element to return.
* @return The positiveCount at the given index.
*/
double getPositiveCount(int index);
}
/**
* Protobuf type {@code io.prometheus.client.Histogram}
*/
public static final class Histogram extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:io.prometheus.client.Histogram)
HistogramOrBuilder {
private static final long serialVersionUID = 0L;
// Use Histogram.newBuilder() to construct.
private Histogram(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Histogram() {
bucket_ = java.util.Collections.emptyList();
negativeSpan_ = java.util.Collections.emptyList();
negativeDelta_ = emptyLongList();
negativeCount_ = emptyDoubleList();
positiveSpan_ = java.util.Collections.emptyList();
positiveDelta_ = emptyLongList();
positiveCount_ = emptyDoubleList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Histogram();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Histogram(
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: {
bitField0_ |= 0x00000001;
sampleCount_ = input.readUInt64();
break;
}
case 17: {
bitField0_ |= 0x00000004;
sampleSum_ = input.readDouble();
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000008) != 0)) {
bucket_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
bucket_.add(
input.readMessage(io.prometheus.client.Metrics.Bucket.PARSER, extensionRegistry));
break;
}
case 33: {
bitField0_ |= 0x00000002;
sampleCountFloat_ = input.readDouble();
break;
}
case 40: {
bitField0_ |= 0x00000008;
schema_ = input.readSInt32();
break;
}
case 49: {
bitField0_ |= 0x00000010;
zeroThreshold_ = input.readDouble();
break;
}
case 56: {
bitField0_ |= 0x00000020;
zeroCount_ = input.readUInt64();
break;
}
case 65: {
bitField0_ |= 0x00000040;
zeroCountFloat_ = input.readDouble();
break;
}
case 74: {
if (!((mutable_bitField0_ & 0x00000100) != 0)) {
negativeSpan_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000100;
}
negativeSpan_.add(
input.readMessage(io.prometheus.client.Metrics.BucketSpan.PARSER, extensionRegistry));
break;
}
case 80: {
if (!((mutable_bitField0_ & 0x00000200) != 0)) {
negativeDelta_ = newLongList();
mutable_bitField0_ |= 0x00000200;
}
negativeDelta_.addLong(input.readSInt64());
break;
}
case 82: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000200) != 0) && input.getBytesUntilLimit() > 0) {
negativeDelta_ = newLongList();
mutable_bitField0_ |= 0x00000200;
}
while (input.getBytesUntilLimit() > 0) {
negativeDelta_.addLong(input.readSInt64());
}
input.popLimit(limit);
break;
}
case 89: {
if (!((mutable_bitField0_ & 0x00000400) != 0)) {
negativeCount_ = newDoubleList();
mutable_bitField0_ |= 0x00000400;
}
negativeCount_.addDouble(input.readDouble());
break;
}
case 90: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00000400) != 0) && input.getBytesUntilLimit() > 0) {
negativeCount_ = newDoubleList();
mutable_bitField0_ |= 0x00000400;
}
while (input.getBytesUntilLimit() > 0) {
negativeCount_.addDouble(input.readDouble());
}
input.popLimit(limit);
break;
}
case 98: {
if (!((mutable_bitField0_ & 0x00000800) != 0)) {
positiveSpan_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000800;
}
positiveSpan_.add(
input.readMessage(io.prometheus.client.Metrics.BucketSpan.PARSER, extensionRegistry));
break;
}
case 104: {
if (!((mutable_bitField0_ & 0x00001000) != 0)) {
positiveDelta_ = newLongList();
mutable_bitField0_ |= 0x00001000;
}
positiveDelta_.addLong(input.readSInt64());
break;
}
case 106: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00001000) != 0) && input.getBytesUntilLimit() > 0) {
positiveDelta_ = newLongList();
mutable_bitField0_ |= 0x00001000;
}
while (input.getBytesUntilLimit() > 0) {
positiveDelta_.addLong(input.readSInt64());
}
input.popLimit(limit);
break;
}
case 113: {
if (!((mutable_bitField0_ & 0x00002000) != 0)) {
positiveCount_ = newDoubleList();
mutable_bitField0_ |= 0x00002000;
}
positiveCount_.addDouble(input.readDouble());
break;
}
case 114: {
int length = input.readRawVarint32();
int limit = input.pushLimit(length);
if (!((mutable_bitField0_ & 0x00002000) != 0) && input.getBytesUntilLimit() > 0) {
positiveCount_ = newDoubleList();
mutable_bitField0_ |= 0x00002000;
}
while (input.getBytesUntilLimit() > 0) {
positiveCount_.addDouble(input.readDouble());
}
input.popLimit(limit);
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000008) != 0)) {
bucket_ = java.util.Collections.unmodifiableList(bucket_);
}
if (((mutable_bitField0_ & 0x00000100) != 0)) {
negativeSpan_ = java.util.Collections.unmodifiableList(negativeSpan_);
}
if (((mutable_bitField0_ & 0x00000200) != 0)) {
negativeDelta_.makeImmutable(); // C
}
if (((mutable_bitField0_ & 0x00000400) != 0)) {
negativeCount_.makeImmutable(); // C
}
if (((mutable_bitField0_ & 0x00000800) != 0)) {
positiveSpan_ = java.util.Collections.unmodifiableList(positiveSpan_);
}
if (((mutable_bitField0_ & 0x00001000) != 0)) {
positiveDelta_.makeImmutable(); // C
}
if (((mutable_bitField0_ & 0x00002000) != 0)) {
positiveCount_.makeImmutable(); // C
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Histogram_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Histogram_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.prometheus.client.Metrics.Histogram.class, io.prometheus.client.Metrics.Histogram.Builder.class);
}
private int bitField0_;
public static final int SAMPLE_COUNT_FIELD_NUMBER = 1;
private long sampleCount_;
/**
* optional uint64 sample_count = 1;
* @return Whether the sampleCount field is set.
*/
@java.lang.Override
public boolean hasSampleCount() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional uint64 sample_count = 1;
* @return The sampleCount.
*/
@java.lang.Override
public long getSampleCount() {
return sampleCount_;
}
public static final int SAMPLE_COUNT_FLOAT_FIELD_NUMBER = 4;
private double sampleCountFloat_;
/**
*
* Overrides sample_count if > 0.
*
*
* optional double sample_count_float = 4;
* @return Whether the sampleCountFloat field is set.
*/
@java.lang.Override
public boolean hasSampleCountFloat() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Overrides sample_count if > 0.
*
*
* optional double sample_count_float = 4;
* @return The sampleCountFloat.
*/
@java.lang.Override
public double getSampleCountFloat() {
return sampleCountFloat_;
}
public static final int SAMPLE_SUM_FIELD_NUMBER = 2;
private double sampleSum_;
/**
* optional double sample_sum = 2;
* @return Whether the sampleSum field is set.
*/
@java.lang.Override
public boolean hasSampleSum() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* optional double sample_sum = 2;
* @return The sampleSum.
*/
@java.lang.Override
public double getSampleSum() {
return sampleSum_;
}
public static final int BUCKET_FIELD_NUMBER = 3;
private java.util.List bucket_;
/**
*
* Buckets for the conventional histogram.
*
*
* repeated .io.prometheus.client.Bucket bucket = 3;
*/
@java.lang.Override
public java.util.List getBucketList() {
return bucket_;
}
/**
*
* Buckets for the conventional histogram.
*
*
* repeated .io.prometheus.client.Bucket bucket = 3;
*/
@java.lang.Override
public java.util.List extends io.prometheus.client.Metrics.BucketOrBuilder>
getBucketOrBuilderList() {
return bucket_;
}
/**
*
* Buckets for the conventional histogram.
*
*
* repeated .io.prometheus.client.Bucket bucket = 3;
*/
@java.lang.Override
public int getBucketCount() {
return bucket_.size();
}
/**
*
* Buckets for the conventional histogram.
*
*
* repeated .io.prometheus.client.Bucket bucket = 3;
*/
@java.lang.Override
public io.prometheus.client.Metrics.Bucket getBucket(int index) {
return bucket_.get(index);
}
/**
*
* Buckets for the conventional histogram.
*
*
* repeated .io.prometheus.client.Bucket bucket = 3;
*/
@java.lang.Override
public io.prometheus.client.Metrics.BucketOrBuilder getBucketOrBuilder(
int index) {
return bucket_.get(index);
}
public static final int SCHEMA_FIELD_NUMBER = 5;
private int schema_;
/**
*
* schema defines the bucket schema. Currently, valid numbers are -4 <= n <= 8.
* They are all for base-2 bucket schemas, where 1 is a bucket boundary in each case, and
* then each power of two is divided into 2^n logarithmic buckets.
* Or in other words, each bucket boundary is the previous boundary times 2^(2^-n).
* In the future, more bucket schemas may be added using numbers < -4 or > 8.
*
*
* optional sint32 schema = 5;
* @return Whether the schema field is set.
*/
@java.lang.Override
public boolean hasSchema() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* schema defines the bucket schema. Currently, valid numbers are -4 <= n <= 8.
* They are all for base-2 bucket schemas, where 1 is a bucket boundary in each case, and
* then each power of two is divided into 2^n logarithmic buckets.
* Or in other words, each bucket boundary is the previous boundary times 2^(2^-n).
* In the future, more bucket schemas may be added using numbers < -4 or > 8.
*
*
* optional sint32 schema = 5;
* @return The schema.
*/
@java.lang.Override
public int getSchema() {
return schema_;
}
public static final int ZERO_THRESHOLD_FIELD_NUMBER = 6;
private double zeroThreshold_;
/**
*
* Breadth of the zero bucket.
*
*
* optional double zero_threshold = 6;
* @return Whether the zeroThreshold field is set.
*/
@java.lang.Override
public boolean hasZeroThreshold() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* Breadth of the zero bucket.
*
*
* optional double zero_threshold = 6;
* @return The zeroThreshold.
*/
@java.lang.Override
public double getZeroThreshold() {
return zeroThreshold_;
}
public static final int ZERO_COUNT_FIELD_NUMBER = 7;
private long zeroCount_;
/**
*
* Count in zero bucket.
*
*
* optional uint64 zero_count = 7;
* @return Whether the zeroCount field is set.
*/
@java.lang.Override
public boolean hasZeroCount() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* Count in zero bucket.
*
*
* optional uint64 zero_count = 7;
* @return The zeroCount.
*/
@java.lang.Override
public long getZeroCount() {
return zeroCount_;
}
public static final int ZERO_COUNT_FLOAT_FIELD_NUMBER = 8;
private double zeroCountFloat_;
/**
*
* Overrides sb_zero_count if > 0.
*
*
* optional double zero_count_float = 8;
* @return Whether the zeroCountFloat field is set.
*/
@java.lang.Override
public boolean hasZeroCountFloat() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
* Overrides sb_zero_count if > 0.
*
*
* optional double zero_count_float = 8;
* @return The zeroCountFloat.
*/
@java.lang.Override
public double getZeroCountFloat() {
return zeroCountFloat_;
}
public static final int NEGATIVE_SPAN_FIELD_NUMBER = 9;
private java.util.List negativeSpan_;
/**
*
* Negative buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan negative_span = 9;
*/
@java.lang.Override
public java.util.List getNegativeSpanList() {
return negativeSpan_;
}
/**
*
* Negative buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan negative_span = 9;
*/
@java.lang.Override
public java.util.List extends io.prometheus.client.Metrics.BucketSpanOrBuilder>
getNegativeSpanOrBuilderList() {
return negativeSpan_;
}
/**
*
* Negative buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan negative_span = 9;
*/
@java.lang.Override
public int getNegativeSpanCount() {
return negativeSpan_.size();
}
/**
*
* Negative buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan negative_span = 9;
*/
@java.lang.Override
public io.prometheus.client.Metrics.BucketSpan getNegativeSpan(int index) {
return negativeSpan_.get(index);
}
/**
*
* Negative buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan negative_span = 9;
*/
@java.lang.Override
public io.prometheus.client.Metrics.BucketSpanOrBuilder getNegativeSpanOrBuilder(
int index) {
return negativeSpan_.get(index);
}
public static final int NEGATIVE_DELTA_FIELD_NUMBER = 10;
private com.google.protobuf.Internal.LongList negativeDelta_;
/**
*
* Use either "negative_delta" or "negative_count", the former for
* regular histograms with integer counts, the latter for float
* histograms.
*
*
* repeated sint64 negative_delta = 10;
* @return A list containing the negativeDelta.
*/
@java.lang.Override
public java.util.List
getNegativeDeltaList() {
return negativeDelta_;
}
/**
*
* Use either "negative_delta" or "negative_count", the former for
* regular histograms with integer counts, the latter for float
* histograms.
*
*
* repeated sint64 negative_delta = 10;
* @return The count of negativeDelta.
*/
public int getNegativeDeltaCount() {
return negativeDelta_.size();
}
/**
*
* Use either "negative_delta" or "negative_count", the former for
* regular histograms with integer counts, the latter for float
* histograms.
*
*
* repeated sint64 negative_delta = 10;
* @param index The index of the element to return.
* @return The negativeDelta at the given index.
*/
public long getNegativeDelta(int index) {
return negativeDelta_.getLong(index);
}
public static final int NEGATIVE_COUNT_FIELD_NUMBER = 11;
private com.google.protobuf.Internal.DoubleList negativeCount_;
/**
*
* Absolute count of each bucket.
*
*
* repeated double negative_count = 11;
* @return A list containing the negativeCount.
*/
@java.lang.Override
public java.util.List
getNegativeCountList() {
return negativeCount_;
}
/**
*
* Absolute count of each bucket.
*
*
* repeated double negative_count = 11;
* @return The count of negativeCount.
*/
public int getNegativeCountCount() {
return negativeCount_.size();
}
/**
*
* Absolute count of each bucket.
*
*
* repeated double negative_count = 11;
* @param index The index of the element to return.
* @return The negativeCount at the given index.
*/
public double getNegativeCount(int index) {
return negativeCount_.getDouble(index);
}
public static final int POSITIVE_SPAN_FIELD_NUMBER = 12;
private java.util.List positiveSpan_;
/**
*
* Positive buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan positive_span = 12;
*/
@java.lang.Override
public java.util.List getPositiveSpanList() {
return positiveSpan_;
}
/**
*
* Positive buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan positive_span = 12;
*/
@java.lang.Override
public java.util.List extends io.prometheus.client.Metrics.BucketSpanOrBuilder>
getPositiveSpanOrBuilderList() {
return positiveSpan_;
}
/**
*
* Positive buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan positive_span = 12;
*/
@java.lang.Override
public int getPositiveSpanCount() {
return positiveSpan_.size();
}
/**
*
* Positive buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan positive_span = 12;
*/
@java.lang.Override
public io.prometheus.client.Metrics.BucketSpan getPositiveSpan(int index) {
return positiveSpan_.get(index);
}
/**
*
* Positive buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan positive_span = 12;
*/
@java.lang.Override
public io.prometheus.client.Metrics.BucketSpanOrBuilder getPositiveSpanOrBuilder(
int index) {
return positiveSpan_.get(index);
}
public static final int POSITIVE_DELTA_FIELD_NUMBER = 13;
private com.google.protobuf.Internal.LongList positiveDelta_;
/**
*
* Use either "positive_delta" or "positive_count", the former for
* regular histograms with integer counts, the latter for float
* histograms.
*
*
* repeated sint64 positive_delta = 13;
* @return A list containing the positiveDelta.
*/
@java.lang.Override
public java.util.List
getPositiveDeltaList() {
return positiveDelta_;
}
/**
*
* Use either "positive_delta" or "positive_count", the former for
* regular histograms with integer counts, the latter for float
* histograms.
*
*
* repeated sint64 positive_delta = 13;
* @return The count of positiveDelta.
*/
public int getPositiveDeltaCount() {
return positiveDelta_.size();
}
/**
*
* Use either "positive_delta" or "positive_count", the former for
* regular histograms with integer counts, the latter for float
* histograms.
*
*
* repeated sint64 positive_delta = 13;
* @param index The index of the element to return.
* @return The positiveDelta at the given index.
*/
public long getPositiveDelta(int index) {
return positiveDelta_.getLong(index);
}
public static final int POSITIVE_COUNT_FIELD_NUMBER = 14;
private com.google.protobuf.Internal.DoubleList positiveCount_;
/**
*
* Absolute count of each bucket.
*
*
* repeated double positive_count = 14;
* @return A list containing the positiveCount.
*/
@java.lang.Override
public java.util.List
getPositiveCountList() {
return positiveCount_;
}
/**
*
* Absolute count of each bucket.
*
*
* repeated double positive_count = 14;
* @return The count of positiveCount.
*/
public int getPositiveCountCount() {
return positiveCount_.size();
}
/**
*
* Absolute count of each bucket.
*
*
* repeated double positive_count = 14;
* @param index The index of the element to return.
* @return The positiveCount at the given index.
*/
public double getPositiveCount(int index) {
return positiveCount_.getDouble(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 {
if (((bitField0_ & 0x00000001) != 0)) {
output.writeUInt64(1, sampleCount_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeDouble(2, sampleSum_);
}
for (int i = 0; i < bucket_.size(); i++) {
output.writeMessage(3, bucket_.get(i));
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeDouble(4, sampleCountFloat_);
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeSInt32(5, schema_);
}
if (((bitField0_ & 0x00000010) != 0)) {
output.writeDouble(6, zeroThreshold_);
}
if (((bitField0_ & 0x00000020) != 0)) {
output.writeUInt64(7, zeroCount_);
}
if (((bitField0_ & 0x00000040) != 0)) {
output.writeDouble(8, zeroCountFloat_);
}
for (int i = 0; i < negativeSpan_.size(); i++) {
output.writeMessage(9, negativeSpan_.get(i));
}
for (int i = 0; i < negativeDelta_.size(); i++) {
output.writeSInt64(10, negativeDelta_.getLong(i));
}
for (int i = 0; i < negativeCount_.size(); i++) {
output.writeDouble(11, negativeCount_.getDouble(i));
}
for (int i = 0; i < positiveSpan_.size(); i++) {
output.writeMessage(12, positiveSpan_.get(i));
}
for (int i = 0; i < positiveDelta_.size(); i++) {
output.writeSInt64(13, positiveDelta_.getLong(i));
}
for (int i = 0; i < positiveCount_.size(); i++) {
output.writeDouble(14, positiveCount_.getDouble(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, sampleCount_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(2, sampleSum_);
}
for (int i = 0; i < bucket_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, bucket_.get(i));
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(4, sampleCountFloat_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeSInt32Size(5, schema_);
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(6, zeroThreshold_);
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(7, zeroCount_);
}
if (((bitField0_ & 0x00000040) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(8, zeroCountFloat_);
}
for (int i = 0; i < negativeSpan_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, negativeSpan_.get(i));
}
{
int dataSize = 0;
for (int i = 0; i < negativeDelta_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeSInt64SizeNoTag(negativeDelta_.getLong(i));
}
size += dataSize;
size += 1 * getNegativeDeltaList().size();
}
{
int dataSize = 0;
dataSize = 8 * getNegativeCountList().size();
size += dataSize;
size += 1 * getNegativeCountList().size();
}
for (int i = 0; i < positiveSpan_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(12, positiveSpan_.get(i));
}
{
int dataSize = 0;
for (int i = 0; i < positiveDelta_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeSInt64SizeNoTag(positiveDelta_.getLong(i));
}
size += dataSize;
size += 1 * getPositiveDeltaList().size();
}
{
int dataSize = 0;
dataSize = 8 * getPositiveCountList().size();
size += dataSize;
size += 1 * getPositiveCountList().size();
}
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 io.prometheus.client.Metrics.Histogram)) {
return super.equals(obj);
}
io.prometheus.client.Metrics.Histogram other = (io.prometheus.client.Metrics.Histogram) obj;
if (hasSampleCount() != other.hasSampleCount()) return false;
if (hasSampleCount()) {
if (getSampleCount()
!= other.getSampleCount()) return false;
}
if (hasSampleCountFloat() != other.hasSampleCountFloat()) return false;
if (hasSampleCountFloat()) {
if (java.lang.Double.doubleToLongBits(getSampleCountFloat())
!= java.lang.Double.doubleToLongBits(
other.getSampleCountFloat())) return false;
}
if (hasSampleSum() != other.hasSampleSum()) return false;
if (hasSampleSum()) {
if (java.lang.Double.doubleToLongBits(getSampleSum())
!= java.lang.Double.doubleToLongBits(
other.getSampleSum())) return false;
}
if (!getBucketList()
.equals(other.getBucketList())) return false;
if (hasSchema() != other.hasSchema()) return false;
if (hasSchema()) {
if (getSchema()
!= other.getSchema()) return false;
}
if (hasZeroThreshold() != other.hasZeroThreshold()) return false;
if (hasZeroThreshold()) {
if (java.lang.Double.doubleToLongBits(getZeroThreshold())
!= java.lang.Double.doubleToLongBits(
other.getZeroThreshold())) return false;
}
if (hasZeroCount() != other.hasZeroCount()) return false;
if (hasZeroCount()) {
if (getZeroCount()
!= other.getZeroCount()) return false;
}
if (hasZeroCountFloat() != other.hasZeroCountFloat()) return false;
if (hasZeroCountFloat()) {
if (java.lang.Double.doubleToLongBits(getZeroCountFloat())
!= java.lang.Double.doubleToLongBits(
other.getZeroCountFloat())) return false;
}
if (!getNegativeSpanList()
.equals(other.getNegativeSpanList())) return false;
if (!getNegativeDeltaList()
.equals(other.getNegativeDeltaList())) return false;
if (!getNegativeCountList()
.equals(other.getNegativeCountList())) return false;
if (!getPositiveSpanList()
.equals(other.getPositiveSpanList())) return false;
if (!getPositiveDeltaList()
.equals(other.getPositiveDeltaList())) return false;
if (!getPositiveCountList()
.equals(other.getPositiveCountList())) 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 (hasSampleCount()) {
hash = (37 * hash) + SAMPLE_COUNT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getSampleCount());
}
if (hasSampleCountFloat()) {
hash = (37 * hash) + SAMPLE_COUNT_FLOAT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getSampleCountFloat()));
}
if (hasSampleSum()) {
hash = (37 * hash) + SAMPLE_SUM_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getSampleSum()));
}
if (getBucketCount() > 0) {
hash = (37 * hash) + BUCKET_FIELD_NUMBER;
hash = (53 * hash) + getBucketList().hashCode();
}
if (hasSchema()) {
hash = (37 * hash) + SCHEMA_FIELD_NUMBER;
hash = (53 * hash) + getSchema();
}
if (hasZeroThreshold()) {
hash = (37 * hash) + ZERO_THRESHOLD_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getZeroThreshold()));
}
if (hasZeroCount()) {
hash = (37 * hash) + ZERO_COUNT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getZeroCount());
}
if (hasZeroCountFloat()) {
hash = (37 * hash) + ZERO_COUNT_FLOAT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getZeroCountFloat()));
}
if (getNegativeSpanCount() > 0) {
hash = (37 * hash) + NEGATIVE_SPAN_FIELD_NUMBER;
hash = (53 * hash) + getNegativeSpanList().hashCode();
}
if (getNegativeDeltaCount() > 0) {
hash = (37 * hash) + NEGATIVE_DELTA_FIELD_NUMBER;
hash = (53 * hash) + getNegativeDeltaList().hashCode();
}
if (getNegativeCountCount() > 0) {
hash = (37 * hash) + NEGATIVE_COUNT_FIELD_NUMBER;
hash = (53 * hash) + getNegativeCountList().hashCode();
}
if (getPositiveSpanCount() > 0) {
hash = (37 * hash) + POSITIVE_SPAN_FIELD_NUMBER;
hash = (53 * hash) + getPositiveSpanList().hashCode();
}
if (getPositiveDeltaCount() > 0) {
hash = (37 * hash) + POSITIVE_DELTA_FIELD_NUMBER;
hash = (53 * hash) + getPositiveDeltaList().hashCode();
}
if (getPositiveCountCount() > 0) {
hash = (37 * hash) + POSITIVE_COUNT_FIELD_NUMBER;
hash = (53 * hash) + getPositiveCountList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.prometheus.client.Metrics.Histogram parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.Histogram parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.Histogram parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.Histogram parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.Histogram parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.Histogram parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.Histogram parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.Histogram parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.prometheus.client.Metrics.Histogram parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.Histogram parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.prometheus.client.Metrics.Histogram parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.Histogram parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.prometheus.client.Metrics.Histogram 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 io.prometheus.client.Histogram}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:io.prometheus.client.Histogram)
io.prometheus.client.Metrics.HistogramOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Histogram_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Histogram_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.prometheus.client.Metrics.Histogram.class, io.prometheus.client.Metrics.Histogram.Builder.class);
}
// Construct using io.prometheus.client.Metrics.Histogram.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getBucketFieldBuilder();
getNegativeSpanFieldBuilder();
getPositiveSpanFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
sampleCount_ = 0L;
bitField0_ = (bitField0_ & ~0x00000001);
sampleCountFloat_ = 0D;
bitField0_ = (bitField0_ & ~0x00000002);
sampleSum_ = 0D;
bitField0_ = (bitField0_ & ~0x00000004);
if (bucketBuilder_ == null) {
bucket_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
} else {
bucketBuilder_.clear();
}
schema_ = 0;
bitField0_ = (bitField0_ & ~0x00000010);
zeroThreshold_ = 0D;
bitField0_ = (bitField0_ & ~0x00000020);
zeroCount_ = 0L;
bitField0_ = (bitField0_ & ~0x00000040);
zeroCountFloat_ = 0D;
bitField0_ = (bitField0_ & ~0x00000080);
if (negativeSpanBuilder_ == null) {
negativeSpan_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000100);
} else {
negativeSpanBuilder_.clear();
}
negativeDelta_ = emptyLongList();
bitField0_ = (bitField0_ & ~0x00000200);
negativeCount_ = emptyDoubleList();
bitField0_ = (bitField0_ & ~0x00000400);
if (positiveSpanBuilder_ == null) {
positiveSpan_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000800);
} else {
positiveSpanBuilder_.clear();
}
positiveDelta_ = emptyLongList();
bitField0_ = (bitField0_ & ~0x00001000);
positiveCount_ = emptyDoubleList();
bitField0_ = (bitField0_ & ~0x00002000);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Histogram_descriptor;
}
@java.lang.Override
public io.prometheus.client.Metrics.Histogram getDefaultInstanceForType() {
return io.prometheus.client.Metrics.Histogram.getDefaultInstance();
}
@java.lang.Override
public io.prometheus.client.Metrics.Histogram build() {
io.prometheus.client.Metrics.Histogram result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.prometheus.client.Metrics.Histogram buildPartial() {
io.prometheus.client.Metrics.Histogram result = new io.prometheus.client.Metrics.Histogram(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.sampleCount_ = sampleCount_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.sampleCountFloat_ = sampleCountFloat_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.sampleSum_ = sampleSum_;
to_bitField0_ |= 0x00000004;
}
if (bucketBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)) {
bucket_ = java.util.Collections.unmodifiableList(bucket_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.bucket_ = bucket_;
} else {
result.bucket_ = bucketBuilder_.build();
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.schema_ = schema_;
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.zeroThreshold_ = zeroThreshold_;
to_bitField0_ |= 0x00000010;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.zeroCount_ = zeroCount_;
to_bitField0_ |= 0x00000020;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.zeroCountFloat_ = zeroCountFloat_;
to_bitField0_ |= 0x00000040;
}
if (negativeSpanBuilder_ == null) {
if (((bitField0_ & 0x00000100) != 0)) {
negativeSpan_ = java.util.Collections.unmodifiableList(negativeSpan_);
bitField0_ = (bitField0_ & ~0x00000100);
}
result.negativeSpan_ = negativeSpan_;
} else {
result.negativeSpan_ = negativeSpanBuilder_.build();
}
if (((bitField0_ & 0x00000200) != 0)) {
negativeDelta_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00000200);
}
result.negativeDelta_ = negativeDelta_;
if (((bitField0_ & 0x00000400) != 0)) {
negativeCount_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00000400);
}
result.negativeCount_ = negativeCount_;
if (positiveSpanBuilder_ == null) {
if (((bitField0_ & 0x00000800) != 0)) {
positiveSpan_ = java.util.Collections.unmodifiableList(positiveSpan_);
bitField0_ = (bitField0_ & ~0x00000800);
}
result.positiveSpan_ = positiveSpan_;
} else {
result.positiveSpan_ = positiveSpanBuilder_.build();
}
if (((bitField0_ & 0x00001000) != 0)) {
positiveDelta_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00001000);
}
result.positiveDelta_ = positiveDelta_;
if (((bitField0_ & 0x00002000) != 0)) {
positiveCount_.makeImmutable();
bitField0_ = (bitField0_ & ~0x00002000);
}
result.positiveCount_ = positiveCount_;
result.bitField0_ = to_bitField0_;
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 io.prometheus.client.Metrics.Histogram) {
return mergeFrom((io.prometheus.client.Metrics.Histogram)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.prometheus.client.Metrics.Histogram other) {
if (other == io.prometheus.client.Metrics.Histogram.getDefaultInstance()) return this;
if (other.hasSampleCount()) {
setSampleCount(other.getSampleCount());
}
if (other.hasSampleCountFloat()) {
setSampleCountFloat(other.getSampleCountFloat());
}
if (other.hasSampleSum()) {
setSampleSum(other.getSampleSum());
}
if (bucketBuilder_ == null) {
if (!other.bucket_.isEmpty()) {
if (bucket_.isEmpty()) {
bucket_ = other.bucket_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureBucketIsMutable();
bucket_.addAll(other.bucket_);
}
onChanged();
}
} else {
if (!other.bucket_.isEmpty()) {
if (bucketBuilder_.isEmpty()) {
bucketBuilder_.dispose();
bucketBuilder_ = null;
bucket_ = other.bucket_;
bitField0_ = (bitField0_ & ~0x00000008);
bucketBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getBucketFieldBuilder() : null;
} else {
bucketBuilder_.addAllMessages(other.bucket_);
}
}
}
if (other.hasSchema()) {
setSchema(other.getSchema());
}
if (other.hasZeroThreshold()) {
setZeroThreshold(other.getZeroThreshold());
}
if (other.hasZeroCount()) {
setZeroCount(other.getZeroCount());
}
if (other.hasZeroCountFloat()) {
setZeroCountFloat(other.getZeroCountFloat());
}
if (negativeSpanBuilder_ == null) {
if (!other.negativeSpan_.isEmpty()) {
if (negativeSpan_.isEmpty()) {
negativeSpan_ = other.negativeSpan_;
bitField0_ = (bitField0_ & ~0x00000100);
} else {
ensureNegativeSpanIsMutable();
negativeSpan_.addAll(other.negativeSpan_);
}
onChanged();
}
} else {
if (!other.negativeSpan_.isEmpty()) {
if (negativeSpanBuilder_.isEmpty()) {
negativeSpanBuilder_.dispose();
negativeSpanBuilder_ = null;
negativeSpan_ = other.negativeSpan_;
bitField0_ = (bitField0_ & ~0x00000100);
negativeSpanBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getNegativeSpanFieldBuilder() : null;
} else {
negativeSpanBuilder_.addAllMessages(other.negativeSpan_);
}
}
}
if (!other.negativeDelta_.isEmpty()) {
if (negativeDelta_.isEmpty()) {
negativeDelta_ = other.negativeDelta_;
bitField0_ = (bitField0_ & ~0x00000200);
} else {
ensureNegativeDeltaIsMutable();
negativeDelta_.addAll(other.negativeDelta_);
}
onChanged();
}
if (!other.negativeCount_.isEmpty()) {
if (negativeCount_.isEmpty()) {
negativeCount_ = other.negativeCount_;
bitField0_ = (bitField0_ & ~0x00000400);
} else {
ensureNegativeCountIsMutable();
negativeCount_.addAll(other.negativeCount_);
}
onChanged();
}
if (positiveSpanBuilder_ == null) {
if (!other.positiveSpan_.isEmpty()) {
if (positiveSpan_.isEmpty()) {
positiveSpan_ = other.positiveSpan_;
bitField0_ = (bitField0_ & ~0x00000800);
} else {
ensurePositiveSpanIsMutable();
positiveSpan_.addAll(other.positiveSpan_);
}
onChanged();
}
} else {
if (!other.positiveSpan_.isEmpty()) {
if (positiveSpanBuilder_.isEmpty()) {
positiveSpanBuilder_.dispose();
positiveSpanBuilder_ = null;
positiveSpan_ = other.positiveSpan_;
bitField0_ = (bitField0_ & ~0x00000800);
positiveSpanBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getPositiveSpanFieldBuilder() : null;
} else {
positiveSpanBuilder_.addAllMessages(other.positiveSpan_);
}
}
}
if (!other.positiveDelta_.isEmpty()) {
if (positiveDelta_.isEmpty()) {
positiveDelta_ = other.positiveDelta_;
bitField0_ = (bitField0_ & ~0x00001000);
} else {
ensurePositiveDeltaIsMutable();
positiveDelta_.addAll(other.positiveDelta_);
}
onChanged();
}
if (!other.positiveCount_.isEmpty()) {
if (positiveCount_.isEmpty()) {
positiveCount_ = other.positiveCount_;
bitField0_ = (bitField0_ & ~0x00002000);
} else {
ensurePositiveCountIsMutable();
positiveCount_.addAll(other.positiveCount_);
}
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 {
io.prometheus.client.Metrics.Histogram parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.prometheus.client.Metrics.Histogram) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private long sampleCount_ ;
/**
* optional uint64 sample_count = 1;
* @return Whether the sampleCount field is set.
*/
@java.lang.Override
public boolean hasSampleCount() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional uint64 sample_count = 1;
* @return The sampleCount.
*/
@java.lang.Override
public long getSampleCount() {
return sampleCount_;
}
/**
* optional uint64 sample_count = 1;
* @param value The sampleCount to set.
* @return This builder for chaining.
*/
public Builder setSampleCount(long value) {
bitField0_ |= 0x00000001;
sampleCount_ = value;
onChanged();
return this;
}
/**
* optional uint64 sample_count = 1;
* @return This builder for chaining.
*/
public Builder clearSampleCount() {
bitField0_ = (bitField0_ & ~0x00000001);
sampleCount_ = 0L;
onChanged();
return this;
}
private double sampleCountFloat_ ;
/**
*
* Overrides sample_count if > 0.
*
*
* optional double sample_count_float = 4;
* @return Whether the sampleCountFloat field is set.
*/
@java.lang.Override
public boolean hasSampleCountFloat() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Overrides sample_count if > 0.
*
*
* optional double sample_count_float = 4;
* @return The sampleCountFloat.
*/
@java.lang.Override
public double getSampleCountFloat() {
return sampleCountFloat_;
}
/**
*
* Overrides sample_count if > 0.
*
*
* optional double sample_count_float = 4;
* @param value The sampleCountFloat to set.
* @return This builder for chaining.
*/
public Builder setSampleCountFloat(double value) {
bitField0_ |= 0x00000002;
sampleCountFloat_ = value;
onChanged();
return this;
}
/**
*
* Overrides sample_count if > 0.
*
*
* optional double sample_count_float = 4;
* @return This builder for chaining.
*/
public Builder clearSampleCountFloat() {
bitField0_ = (bitField0_ & ~0x00000002);
sampleCountFloat_ = 0D;
onChanged();
return this;
}
private double sampleSum_ ;
/**
* optional double sample_sum = 2;
* @return Whether the sampleSum field is set.
*/
@java.lang.Override
public boolean hasSampleSum() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* optional double sample_sum = 2;
* @return The sampleSum.
*/
@java.lang.Override
public double getSampleSum() {
return sampleSum_;
}
/**
* optional double sample_sum = 2;
* @param value The sampleSum to set.
* @return This builder for chaining.
*/
public Builder setSampleSum(double value) {
bitField0_ |= 0x00000004;
sampleSum_ = value;
onChanged();
return this;
}
/**
* optional double sample_sum = 2;
* @return This builder for chaining.
*/
public Builder clearSampleSum() {
bitField0_ = (bitField0_ & ~0x00000004);
sampleSum_ = 0D;
onChanged();
return this;
}
private java.util.List bucket_ =
java.util.Collections.emptyList();
private void ensureBucketIsMutable() {
if (!((bitField0_ & 0x00000008) != 0)) {
bucket_ = new java.util.ArrayList(bucket_);
bitField0_ |= 0x00000008;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.prometheus.client.Metrics.Bucket, io.prometheus.client.Metrics.Bucket.Builder, io.prometheus.client.Metrics.BucketOrBuilder> bucketBuilder_;
/**
*
* Buckets for the conventional histogram.
*
*
* repeated .io.prometheus.client.Bucket bucket = 3;
*/
public java.util.List getBucketList() {
if (bucketBuilder_ == null) {
return java.util.Collections.unmodifiableList(bucket_);
} else {
return bucketBuilder_.getMessageList();
}
}
/**
*
* Buckets for the conventional histogram.
*
*
* repeated .io.prometheus.client.Bucket bucket = 3;
*/
public int getBucketCount() {
if (bucketBuilder_ == null) {
return bucket_.size();
} else {
return bucketBuilder_.getCount();
}
}
/**
*
* Buckets for the conventional histogram.
*
*
* repeated .io.prometheus.client.Bucket bucket = 3;
*/
public io.prometheus.client.Metrics.Bucket getBucket(int index) {
if (bucketBuilder_ == null) {
return bucket_.get(index);
} else {
return bucketBuilder_.getMessage(index);
}
}
/**
*
* Buckets for the conventional histogram.
*
*
* repeated .io.prometheus.client.Bucket bucket = 3;
*/
public Builder setBucket(
int index, io.prometheus.client.Metrics.Bucket value) {
if (bucketBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureBucketIsMutable();
bucket_.set(index, value);
onChanged();
} else {
bucketBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Buckets for the conventional histogram.
*
*
* repeated .io.prometheus.client.Bucket bucket = 3;
*/
public Builder setBucket(
int index, io.prometheus.client.Metrics.Bucket.Builder builderForValue) {
if (bucketBuilder_ == null) {
ensureBucketIsMutable();
bucket_.set(index, builderForValue.build());
onChanged();
} else {
bucketBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Buckets for the conventional histogram.
*
*
* repeated .io.prometheus.client.Bucket bucket = 3;
*/
public Builder addBucket(io.prometheus.client.Metrics.Bucket value) {
if (bucketBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureBucketIsMutable();
bucket_.add(value);
onChanged();
} else {
bucketBuilder_.addMessage(value);
}
return this;
}
/**
*
* Buckets for the conventional histogram.
*
*
* repeated .io.prometheus.client.Bucket bucket = 3;
*/
public Builder addBucket(
int index, io.prometheus.client.Metrics.Bucket value) {
if (bucketBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureBucketIsMutable();
bucket_.add(index, value);
onChanged();
} else {
bucketBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Buckets for the conventional histogram.
*
*
* repeated .io.prometheus.client.Bucket bucket = 3;
*/
public Builder addBucket(
io.prometheus.client.Metrics.Bucket.Builder builderForValue) {
if (bucketBuilder_ == null) {
ensureBucketIsMutable();
bucket_.add(builderForValue.build());
onChanged();
} else {
bucketBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Buckets for the conventional histogram.
*
*
* repeated .io.prometheus.client.Bucket bucket = 3;
*/
public Builder addBucket(
int index, io.prometheus.client.Metrics.Bucket.Builder builderForValue) {
if (bucketBuilder_ == null) {
ensureBucketIsMutable();
bucket_.add(index, builderForValue.build());
onChanged();
} else {
bucketBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Buckets for the conventional histogram.
*
*
* repeated .io.prometheus.client.Bucket bucket = 3;
*/
public Builder addAllBucket(
java.lang.Iterable extends io.prometheus.client.Metrics.Bucket> values) {
if (bucketBuilder_ == null) {
ensureBucketIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, bucket_);
onChanged();
} else {
bucketBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Buckets for the conventional histogram.
*
*
* repeated .io.prometheus.client.Bucket bucket = 3;
*/
public Builder clearBucket() {
if (bucketBuilder_ == null) {
bucket_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
bucketBuilder_.clear();
}
return this;
}
/**
*
* Buckets for the conventional histogram.
*
*
* repeated .io.prometheus.client.Bucket bucket = 3;
*/
public Builder removeBucket(int index) {
if (bucketBuilder_ == null) {
ensureBucketIsMutable();
bucket_.remove(index);
onChanged();
} else {
bucketBuilder_.remove(index);
}
return this;
}
/**
*
* Buckets for the conventional histogram.
*
*
* repeated .io.prometheus.client.Bucket bucket = 3;
*/
public io.prometheus.client.Metrics.Bucket.Builder getBucketBuilder(
int index) {
return getBucketFieldBuilder().getBuilder(index);
}
/**
*
* Buckets for the conventional histogram.
*
*
* repeated .io.prometheus.client.Bucket bucket = 3;
*/
public io.prometheus.client.Metrics.BucketOrBuilder getBucketOrBuilder(
int index) {
if (bucketBuilder_ == null) {
return bucket_.get(index); } else {
return bucketBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Buckets for the conventional histogram.
*
*
* repeated .io.prometheus.client.Bucket bucket = 3;
*/
public java.util.List extends io.prometheus.client.Metrics.BucketOrBuilder>
getBucketOrBuilderList() {
if (bucketBuilder_ != null) {
return bucketBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(bucket_);
}
}
/**
*
* Buckets for the conventional histogram.
*
*
* repeated .io.prometheus.client.Bucket bucket = 3;
*/
public io.prometheus.client.Metrics.Bucket.Builder addBucketBuilder() {
return getBucketFieldBuilder().addBuilder(
io.prometheus.client.Metrics.Bucket.getDefaultInstance());
}
/**
*
* Buckets for the conventional histogram.
*
*
* repeated .io.prometheus.client.Bucket bucket = 3;
*/
public io.prometheus.client.Metrics.Bucket.Builder addBucketBuilder(
int index) {
return getBucketFieldBuilder().addBuilder(
index, io.prometheus.client.Metrics.Bucket.getDefaultInstance());
}
/**
*
* Buckets for the conventional histogram.
*
*
* repeated .io.prometheus.client.Bucket bucket = 3;
*/
public java.util.List
getBucketBuilderList() {
return getBucketFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.prometheus.client.Metrics.Bucket, io.prometheus.client.Metrics.Bucket.Builder, io.prometheus.client.Metrics.BucketOrBuilder>
getBucketFieldBuilder() {
if (bucketBuilder_ == null) {
bucketBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.prometheus.client.Metrics.Bucket, io.prometheus.client.Metrics.Bucket.Builder, io.prometheus.client.Metrics.BucketOrBuilder>(
bucket_,
((bitField0_ & 0x00000008) != 0),
getParentForChildren(),
isClean());
bucket_ = null;
}
return bucketBuilder_;
}
private int schema_ ;
/**
*
* schema defines the bucket schema. Currently, valid numbers are -4 <= n <= 8.
* They are all for base-2 bucket schemas, where 1 is a bucket boundary in each case, and
* then each power of two is divided into 2^n logarithmic buckets.
* Or in other words, each bucket boundary is the previous boundary times 2^(2^-n).
* In the future, more bucket schemas may be added using numbers < -4 or > 8.
*
*
* optional sint32 schema = 5;
* @return Whether the schema field is set.
*/
@java.lang.Override
public boolean hasSchema() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* schema defines the bucket schema. Currently, valid numbers are -4 <= n <= 8.
* They are all for base-2 bucket schemas, where 1 is a bucket boundary in each case, and
* then each power of two is divided into 2^n logarithmic buckets.
* Or in other words, each bucket boundary is the previous boundary times 2^(2^-n).
* In the future, more bucket schemas may be added using numbers < -4 or > 8.
*
*
* optional sint32 schema = 5;
* @return The schema.
*/
@java.lang.Override
public int getSchema() {
return schema_;
}
/**
*
* schema defines the bucket schema. Currently, valid numbers are -4 <= n <= 8.
* They are all for base-2 bucket schemas, where 1 is a bucket boundary in each case, and
* then each power of two is divided into 2^n logarithmic buckets.
* Or in other words, each bucket boundary is the previous boundary times 2^(2^-n).
* In the future, more bucket schemas may be added using numbers < -4 or > 8.
*
*
* optional sint32 schema = 5;
* @param value The schema to set.
* @return This builder for chaining.
*/
public Builder setSchema(int value) {
bitField0_ |= 0x00000010;
schema_ = value;
onChanged();
return this;
}
/**
*
* schema defines the bucket schema. Currently, valid numbers are -4 <= n <= 8.
* They are all for base-2 bucket schemas, where 1 is a bucket boundary in each case, and
* then each power of two is divided into 2^n logarithmic buckets.
* Or in other words, each bucket boundary is the previous boundary times 2^(2^-n).
* In the future, more bucket schemas may be added using numbers < -4 or > 8.
*
*
* optional sint32 schema = 5;
* @return This builder for chaining.
*/
public Builder clearSchema() {
bitField0_ = (bitField0_ & ~0x00000010);
schema_ = 0;
onChanged();
return this;
}
private double zeroThreshold_ ;
/**
*
* Breadth of the zero bucket.
*
*
* optional double zero_threshold = 6;
* @return Whether the zeroThreshold field is set.
*/
@java.lang.Override
public boolean hasZeroThreshold() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* Breadth of the zero bucket.
*
*
* optional double zero_threshold = 6;
* @return The zeroThreshold.
*/
@java.lang.Override
public double getZeroThreshold() {
return zeroThreshold_;
}
/**
*
* Breadth of the zero bucket.
*
*
* optional double zero_threshold = 6;
* @param value The zeroThreshold to set.
* @return This builder for chaining.
*/
public Builder setZeroThreshold(double value) {
bitField0_ |= 0x00000020;
zeroThreshold_ = value;
onChanged();
return this;
}
/**
*
* Breadth of the zero bucket.
*
*
* optional double zero_threshold = 6;
* @return This builder for chaining.
*/
public Builder clearZeroThreshold() {
bitField0_ = (bitField0_ & ~0x00000020);
zeroThreshold_ = 0D;
onChanged();
return this;
}
private long zeroCount_ ;
/**
*
* Count in zero bucket.
*
*
* optional uint64 zero_count = 7;
* @return Whether the zeroCount field is set.
*/
@java.lang.Override
public boolean hasZeroCount() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
* Count in zero bucket.
*
*
* optional uint64 zero_count = 7;
* @return The zeroCount.
*/
@java.lang.Override
public long getZeroCount() {
return zeroCount_;
}
/**
*
* Count in zero bucket.
*
*
* optional uint64 zero_count = 7;
* @param value The zeroCount to set.
* @return This builder for chaining.
*/
public Builder setZeroCount(long value) {
bitField0_ |= 0x00000040;
zeroCount_ = value;
onChanged();
return this;
}
/**
*
* Count in zero bucket.
*
*
* optional uint64 zero_count = 7;
* @return This builder for chaining.
*/
public Builder clearZeroCount() {
bitField0_ = (bitField0_ & ~0x00000040);
zeroCount_ = 0L;
onChanged();
return this;
}
private double zeroCountFloat_ ;
/**
*
* Overrides sb_zero_count if > 0.
*
*
* optional double zero_count_float = 8;
* @return Whether the zeroCountFloat field is set.
*/
@java.lang.Override
public boolean hasZeroCountFloat() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
* Overrides sb_zero_count if > 0.
*
*
* optional double zero_count_float = 8;
* @return The zeroCountFloat.
*/
@java.lang.Override
public double getZeroCountFloat() {
return zeroCountFloat_;
}
/**
*
* Overrides sb_zero_count if > 0.
*
*
* optional double zero_count_float = 8;
* @param value The zeroCountFloat to set.
* @return This builder for chaining.
*/
public Builder setZeroCountFloat(double value) {
bitField0_ |= 0x00000080;
zeroCountFloat_ = value;
onChanged();
return this;
}
/**
*
* Overrides sb_zero_count if > 0.
*
*
* optional double zero_count_float = 8;
* @return This builder for chaining.
*/
public Builder clearZeroCountFloat() {
bitField0_ = (bitField0_ & ~0x00000080);
zeroCountFloat_ = 0D;
onChanged();
return this;
}
private java.util.List negativeSpan_ =
java.util.Collections.emptyList();
private void ensureNegativeSpanIsMutable() {
if (!((bitField0_ & 0x00000100) != 0)) {
negativeSpan_ = new java.util.ArrayList(negativeSpan_);
bitField0_ |= 0x00000100;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.prometheus.client.Metrics.BucketSpan, io.prometheus.client.Metrics.BucketSpan.Builder, io.prometheus.client.Metrics.BucketSpanOrBuilder> negativeSpanBuilder_;
/**
*
* Negative buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan negative_span = 9;
*/
public java.util.List getNegativeSpanList() {
if (negativeSpanBuilder_ == null) {
return java.util.Collections.unmodifiableList(negativeSpan_);
} else {
return negativeSpanBuilder_.getMessageList();
}
}
/**
*
* Negative buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan negative_span = 9;
*/
public int getNegativeSpanCount() {
if (negativeSpanBuilder_ == null) {
return negativeSpan_.size();
} else {
return negativeSpanBuilder_.getCount();
}
}
/**
*
* Negative buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan negative_span = 9;
*/
public io.prometheus.client.Metrics.BucketSpan getNegativeSpan(int index) {
if (negativeSpanBuilder_ == null) {
return negativeSpan_.get(index);
} else {
return negativeSpanBuilder_.getMessage(index);
}
}
/**
*
* Negative buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan negative_span = 9;
*/
public Builder setNegativeSpan(
int index, io.prometheus.client.Metrics.BucketSpan value) {
if (negativeSpanBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNegativeSpanIsMutable();
negativeSpan_.set(index, value);
onChanged();
} else {
negativeSpanBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Negative buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan negative_span = 9;
*/
public Builder setNegativeSpan(
int index, io.prometheus.client.Metrics.BucketSpan.Builder builderForValue) {
if (negativeSpanBuilder_ == null) {
ensureNegativeSpanIsMutable();
negativeSpan_.set(index, builderForValue.build());
onChanged();
} else {
negativeSpanBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Negative buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan negative_span = 9;
*/
public Builder addNegativeSpan(io.prometheus.client.Metrics.BucketSpan value) {
if (negativeSpanBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNegativeSpanIsMutable();
negativeSpan_.add(value);
onChanged();
} else {
negativeSpanBuilder_.addMessage(value);
}
return this;
}
/**
*
* Negative buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan negative_span = 9;
*/
public Builder addNegativeSpan(
int index, io.prometheus.client.Metrics.BucketSpan value) {
if (negativeSpanBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNegativeSpanIsMutable();
negativeSpan_.add(index, value);
onChanged();
} else {
negativeSpanBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Negative buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan negative_span = 9;
*/
public Builder addNegativeSpan(
io.prometheus.client.Metrics.BucketSpan.Builder builderForValue) {
if (negativeSpanBuilder_ == null) {
ensureNegativeSpanIsMutable();
negativeSpan_.add(builderForValue.build());
onChanged();
} else {
negativeSpanBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Negative buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan negative_span = 9;
*/
public Builder addNegativeSpan(
int index, io.prometheus.client.Metrics.BucketSpan.Builder builderForValue) {
if (negativeSpanBuilder_ == null) {
ensureNegativeSpanIsMutable();
negativeSpan_.add(index, builderForValue.build());
onChanged();
} else {
negativeSpanBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Negative buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan negative_span = 9;
*/
public Builder addAllNegativeSpan(
java.lang.Iterable extends io.prometheus.client.Metrics.BucketSpan> values) {
if (negativeSpanBuilder_ == null) {
ensureNegativeSpanIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, negativeSpan_);
onChanged();
} else {
negativeSpanBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Negative buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan negative_span = 9;
*/
public Builder clearNegativeSpan() {
if (negativeSpanBuilder_ == null) {
negativeSpan_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000100);
onChanged();
} else {
negativeSpanBuilder_.clear();
}
return this;
}
/**
*
* Negative buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan negative_span = 9;
*/
public Builder removeNegativeSpan(int index) {
if (negativeSpanBuilder_ == null) {
ensureNegativeSpanIsMutable();
negativeSpan_.remove(index);
onChanged();
} else {
negativeSpanBuilder_.remove(index);
}
return this;
}
/**
*
* Negative buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan negative_span = 9;
*/
public io.prometheus.client.Metrics.BucketSpan.Builder getNegativeSpanBuilder(
int index) {
return getNegativeSpanFieldBuilder().getBuilder(index);
}
/**
*
* Negative buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan negative_span = 9;
*/
public io.prometheus.client.Metrics.BucketSpanOrBuilder getNegativeSpanOrBuilder(
int index) {
if (negativeSpanBuilder_ == null) {
return negativeSpan_.get(index); } else {
return negativeSpanBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Negative buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan negative_span = 9;
*/
public java.util.List extends io.prometheus.client.Metrics.BucketSpanOrBuilder>
getNegativeSpanOrBuilderList() {
if (negativeSpanBuilder_ != null) {
return negativeSpanBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(negativeSpan_);
}
}
/**
*
* Negative buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan negative_span = 9;
*/
public io.prometheus.client.Metrics.BucketSpan.Builder addNegativeSpanBuilder() {
return getNegativeSpanFieldBuilder().addBuilder(
io.prometheus.client.Metrics.BucketSpan.getDefaultInstance());
}
/**
*
* Negative buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan negative_span = 9;
*/
public io.prometheus.client.Metrics.BucketSpan.Builder addNegativeSpanBuilder(
int index) {
return getNegativeSpanFieldBuilder().addBuilder(
index, io.prometheus.client.Metrics.BucketSpan.getDefaultInstance());
}
/**
*
* Negative buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan negative_span = 9;
*/
public java.util.List
getNegativeSpanBuilderList() {
return getNegativeSpanFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.prometheus.client.Metrics.BucketSpan, io.prometheus.client.Metrics.BucketSpan.Builder, io.prometheus.client.Metrics.BucketSpanOrBuilder>
getNegativeSpanFieldBuilder() {
if (negativeSpanBuilder_ == null) {
negativeSpanBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.prometheus.client.Metrics.BucketSpan, io.prometheus.client.Metrics.BucketSpan.Builder, io.prometheus.client.Metrics.BucketSpanOrBuilder>(
negativeSpan_,
((bitField0_ & 0x00000100) != 0),
getParentForChildren(),
isClean());
negativeSpan_ = null;
}
return negativeSpanBuilder_;
}
private com.google.protobuf.Internal.LongList negativeDelta_ = emptyLongList();
private void ensureNegativeDeltaIsMutable() {
if (!((bitField0_ & 0x00000200) != 0)) {
negativeDelta_ = mutableCopy(negativeDelta_);
bitField0_ |= 0x00000200;
}
}
/**
*
* Use either "negative_delta" or "negative_count", the former for
* regular histograms with integer counts, the latter for float
* histograms.
*
*
* repeated sint64 negative_delta = 10;
* @return A list containing the negativeDelta.
*/
public java.util.List
getNegativeDeltaList() {
return ((bitField0_ & 0x00000200) != 0) ?
java.util.Collections.unmodifiableList(negativeDelta_) : negativeDelta_;
}
/**
*
* Use either "negative_delta" or "negative_count", the former for
* regular histograms with integer counts, the latter for float
* histograms.
*
*
* repeated sint64 negative_delta = 10;
* @return The count of negativeDelta.
*/
public int getNegativeDeltaCount() {
return negativeDelta_.size();
}
/**
*
* Use either "negative_delta" or "negative_count", the former for
* regular histograms with integer counts, the latter for float
* histograms.
*
*
* repeated sint64 negative_delta = 10;
* @param index The index of the element to return.
* @return The negativeDelta at the given index.
*/
public long getNegativeDelta(int index) {
return negativeDelta_.getLong(index);
}
/**
*
* Use either "negative_delta" or "negative_count", the former for
* regular histograms with integer counts, the latter for float
* histograms.
*
*
* repeated sint64 negative_delta = 10;
* @param index The index to set the value at.
* @param value The negativeDelta to set.
* @return This builder for chaining.
*/
public Builder setNegativeDelta(
int index, long value) {
ensureNegativeDeltaIsMutable();
negativeDelta_.setLong(index, value);
onChanged();
return this;
}
/**
*
* Use either "negative_delta" or "negative_count", the former for
* regular histograms with integer counts, the latter for float
* histograms.
*
*
* repeated sint64 negative_delta = 10;
* @param value The negativeDelta to add.
* @return This builder for chaining.
*/
public Builder addNegativeDelta(long value) {
ensureNegativeDeltaIsMutable();
negativeDelta_.addLong(value);
onChanged();
return this;
}
/**
*
* Use either "negative_delta" or "negative_count", the former for
* regular histograms with integer counts, the latter for float
* histograms.
*
*
* repeated sint64 negative_delta = 10;
* @param values The negativeDelta to add.
* @return This builder for chaining.
*/
public Builder addAllNegativeDelta(
java.lang.Iterable extends java.lang.Long> values) {
ensureNegativeDeltaIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, negativeDelta_);
onChanged();
return this;
}
/**
*
* Use either "negative_delta" or "negative_count", the former for
* regular histograms with integer counts, the latter for float
* histograms.
*
*
* repeated sint64 negative_delta = 10;
* @return This builder for chaining.
*/
public Builder clearNegativeDelta() {
negativeDelta_ = emptyLongList();
bitField0_ = (bitField0_ & ~0x00000200);
onChanged();
return this;
}
private com.google.protobuf.Internal.DoubleList negativeCount_ = emptyDoubleList();
private void ensureNegativeCountIsMutable() {
if (!((bitField0_ & 0x00000400) != 0)) {
negativeCount_ = mutableCopy(negativeCount_);
bitField0_ |= 0x00000400;
}
}
/**
*
* Absolute count of each bucket.
*
*
* repeated double negative_count = 11;
* @return A list containing the negativeCount.
*/
public java.util.List
getNegativeCountList() {
return ((bitField0_ & 0x00000400) != 0) ?
java.util.Collections.unmodifiableList(negativeCount_) : negativeCount_;
}
/**
*
* Absolute count of each bucket.
*
*
* repeated double negative_count = 11;
* @return The count of negativeCount.
*/
public int getNegativeCountCount() {
return negativeCount_.size();
}
/**
*
* Absolute count of each bucket.
*
*
* repeated double negative_count = 11;
* @param index The index of the element to return.
* @return The negativeCount at the given index.
*/
public double getNegativeCount(int index) {
return negativeCount_.getDouble(index);
}
/**
*
* Absolute count of each bucket.
*
*
* repeated double negative_count = 11;
* @param index The index to set the value at.
* @param value The negativeCount to set.
* @return This builder for chaining.
*/
public Builder setNegativeCount(
int index, double value) {
ensureNegativeCountIsMutable();
negativeCount_.setDouble(index, value);
onChanged();
return this;
}
/**
*
* Absolute count of each bucket.
*
*
* repeated double negative_count = 11;
* @param value The negativeCount to add.
* @return This builder for chaining.
*/
public Builder addNegativeCount(double value) {
ensureNegativeCountIsMutable();
negativeCount_.addDouble(value);
onChanged();
return this;
}
/**
*
* Absolute count of each bucket.
*
*
* repeated double negative_count = 11;
* @param values The negativeCount to add.
* @return This builder for chaining.
*/
public Builder addAllNegativeCount(
java.lang.Iterable extends java.lang.Double> values) {
ensureNegativeCountIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, negativeCount_);
onChanged();
return this;
}
/**
*
* Absolute count of each bucket.
*
*
* repeated double negative_count = 11;
* @return This builder for chaining.
*/
public Builder clearNegativeCount() {
negativeCount_ = emptyDoubleList();
bitField0_ = (bitField0_ & ~0x00000400);
onChanged();
return this;
}
private java.util.List positiveSpan_ =
java.util.Collections.emptyList();
private void ensurePositiveSpanIsMutable() {
if (!((bitField0_ & 0x00000800) != 0)) {
positiveSpan_ = new java.util.ArrayList(positiveSpan_);
bitField0_ |= 0x00000800;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.prometheus.client.Metrics.BucketSpan, io.prometheus.client.Metrics.BucketSpan.Builder, io.prometheus.client.Metrics.BucketSpanOrBuilder> positiveSpanBuilder_;
/**
*
* Positive buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan positive_span = 12;
*/
public java.util.List getPositiveSpanList() {
if (positiveSpanBuilder_ == null) {
return java.util.Collections.unmodifiableList(positiveSpan_);
} else {
return positiveSpanBuilder_.getMessageList();
}
}
/**
*
* Positive buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan positive_span = 12;
*/
public int getPositiveSpanCount() {
if (positiveSpanBuilder_ == null) {
return positiveSpan_.size();
} else {
return positiveSpanBuilder_.getCount();
}
}
/**
*
* Positive buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan positive_span = 12;
*/
public io.prometheus.client.Metrics.BucketSpan getPositiveSpan(int index) {
if (positiveSpanBuilder_ == null) {
return positiveSpan_.get(index);
} else {
return positiveSpanBuilder_.getMessage(index);
}
}
/**
*
* Positive buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan positive_span = 12;
*/
public Builder setPositiveSpan(
int index, io.prometheus.client.Metrics.BucketSpan value) {
if (positiveSpanBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePositiveSpanIsMutable();
positiveSpan_.set(index, value);
onChanged();
} else {
positiveSpanBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Positive buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan positive_span = 12;
*/
public Builder setPositiveSpan(
int index, io.prometheus.client.Metrics.BucketSpan.Builder builderForValue) {
if (positiveSpanBuilder_ == null) {
ensurePositiveSpanIsMutable();
positiveSpan_.set(index, builderForValue.build());
onChanged();
} else {
positiveSpanBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Positive buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan positive_span = 12;
*/
public Builder addPositiveSpan(io.prometheus.client.Metrics.BucketSpan value) {
if (positiveSpanBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePositiveSpanIsMutable();
positiveSpan_.add(value);
onChanged();
} else {
positiveSpanBuilder_.addMessage(value);
}
return this;
}
/**
*
* Positive buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan positive_span = 12;
*/
public Builder addPositiveSpan(
int index, io.prometheus.client.Metrics.BucketSpan value) {
if (positiveSpanBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePositiveSpanIsMutable();
positiveSpan_.add(index, value);
onChanged();
} else {
positiveSpanBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Positive buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan positive_span = 12;
*/
public Builder addPositiveSpan(
io.prometheus.client.Metrics.BucketSpan.Builder builderForValue) {
if (positiveSpanBuilder_ == null) {
ensurePositiveSpanIsMutable();
positiveSpan_.add(builderForValue.build());
onChanged();
} else {
positiveSpanBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Positive buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan positive_span = 12;
*/
public Builder addPositiveSpan(
int index, io.prometheus.client.Metrics.BucketSpan.Builder builderForValue) {
if (positiveSpanBuilder_ == null) {
ensurePositiveSpanIsMutable();
positiveSpan_.add(index, builderForValue.build());
onChanged();
} else {
positiveSpanBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Positive buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan positive_span = 12;
*/
public Builder addAllPositiveSpan(
java.lang.Iterable extends io.prometheus.client.Metrics.BucketSpan> values) {
if (positiveSpanBuilder_ == null) {
ensurePositiveSpanIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, positiveSpan_);
onChanged();
} else {
positiveSpanBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Positive buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan positive_span = 12;
*/
public Builder clearPositiveSpan() {
if (positiveSpanBuilder_ == null) {
positiveSpan_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000800);
onChanged();
} else {
positiveSpanBuilder_.clear();
}
return this;
}
/**
*
* Positive buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan positive_span = 12;
*/
public Builder removePositiveSpan(int index) {
if (positiveSpanBuilder_ == null) {
ensurePositiveSpanIsMutable();
positiveSpan_.remove(index);
onChanged();
} else {
positiveSpanBuilder_.remove(index);
}
return this;
}
/**
*
* Positive buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan positive_span = 12;
*/
public io.prometheus.client.Metrics.BucketSpan.Builder getPositiveSpanBuilder(
int index) {
return getPositiveSpanFieldBuilder().getBuilder(index);
}
/**
*
* Positive buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan positive_span = 12;
*/
public io.prometheus.client.Metrics.BucketSpanOrBuilder getPositiveSpanOrBuilder(
int index) {
if (positiveSpanBuilder_ == null) {
return positiveSpan_.get(index); } else {
return positiveSpanBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Positive buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan positive_span = 12;
*/
public java.util.List extends io.prometheus.client.Metrics.BucketSpanOrBuilder>
getPositiveSpanOrBuilderList() {
if (positiveSpanBuilder_ != null) {
return positiveSpanBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(positiveSpan_);
}
}
/**
*
* Positive buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan positive_span = 12;
*/
public io.prometheus.client.Metrics.BucketSpan.Builder addPositiveSpanBuilder() {
return getPositiveSpanFieldBuilder().addBuilder(
io.prometheus.client.Metrics.BucketSpan.getDefaultInstance());
}
/**
*
* Positive buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan positive_span = 12;
*/
public io.prometheus.client.Metrics.BucketSpan.Builder addPositiveSpanBuilder(
int index) {
return getPositiveSpanFieldBuilder().addBuilder(
index, io.prometheus.client.Metrics.BucketSpan.getDefaultInstance());
}
/**
*
* Positive buckets for the native histogram.
*
*
* repeated .io.prometheus.client.BucketSpan positive_span = 12;
*/
public java.util.List
getPositiveSpanBuilderList() {
return getPositiveSpanFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.prometheus.client.Metrics.BucketSpan, io.prometheus.client.Metrics.BucketSpan.Builder, io.prometheus.client.Metrics.BucketSpanOrBuilder>
getPositiveSpanFieldBuilder() {
if (positiveSpanBuilder_ == null) {
positiveSpanBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.prometheus.client.Metrics.BucketSpan, io.prometheus.client.Metrics.BucketSpan.Builder, io.prometheus.client.Metrics.BucketSpanOrBuilder>(
positiveSpan_,
((bitField0_ & 0x00000800) != 0),
getParentForChildren(),
isClean());
positiveSpan_ = null;
}
return positiveSpanBuilder_;
}
private com.google.protobuf.Internal.LongList positiveDelta_ = emptyLongList();
private void ensurePositiveDeltaIsMutable() {
if (!((bitField0_ & 0x00001000) != 0)) {
positiveDelta_ = mutableCopy(positiveDelta_);
bitField0_ |= 0x00001000;
}
}
/**
*
* Use either "positive_delta" or "positive_count", the former for
* regular histograms with integer counts, the latter for float
* histograms.
*
*
* repeated sint64 positive_delta = 13;
* @return A list containing the positiveDelta.
*/
public java.util.List
getPositiveDeltaList() {
return ((bitField0_ & 0x00001000) != 0) ?
java.util.Collections.unmodifiableList(positiveDelta_) : positiveDelta_;
}
/**
*
* Use either "positive_delta" or "positive_count", the former for
* regular histograms with integer counts, the latter for float
* histograms.
*
*
* repeated sint64 positive_delta = 13;
* @return The count of positiveDelta.
*/
public int getPositiveDeltaCount() {
return positiveDelta_.size();
}
/**
*
* Use either "positive_delta" or "positive_count", the former for
* regular histograms with integer counts, the latter for float
* histograms.
*
*
* repeated sint64 positive_delta = 13;
* @param index The index of the element to return.
* @return The positiveDelta at the given index.
*/
public long getPositiveDelta(int index) {
return positiveDelta_.getLong(index);
}
/**
*
* Use either "positive_delta" or "positive_count", the former for
* regular histograms with integer counts, the latter for float
* histograms.
*
*
* repeated sint64 positive_delta = 13;
* @param index The index to set the value at.
* @param value The positiveDelta to set.
* @return This builder for chaining.
*/
public Builder setPositiveDelta(
int index, long value) {
ensurePositiveDeltaIsMutable();
positiveDelta_.setLong(index, value);
onChanged();
return this;
}
/**
*
* Use either "positive_delta" or "positive_count", the former for
* regular histograms with integer counts, the latter for float
* histograms.
*
*
* repeated sint64 positive_delta = 13;
* @param value The positiveDelta to add.
* @return This builder for chaining.
*/
public Builder addPositiveDelta(long value) {
ensurePositiveDeltaIsMutable();
positiveDelta_.addLong(value);
onChanged();
return this;
}
/**
*
* Use either "positive_delta" or "positive_count", the former for
* regular histograms with integer counts, the latter for float
* histograms.
*
*
* repeated sint64 positive_delta = 13;
* @param values The positiveDelta to add.
* @return This builder for chaining.
*/
public Builder addAllPositiveDelta(
java.lang.Iterable extends java.lang.Long> values) {
ensurePositiveDeltaIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, positiveDelta_);
onChanged();
return this;
}
/**
*
* Use either "positive_delta" or "positive_count", the former for
* regular histograms with integer counts, the latter for float
* histograms.
*
*
* repeated sint64 positive_delta = 13;
* @return This builder for chaining.
*/
public Builder clearPositiveDelta() {
positiveDelta_ = emptyLongList();
bitField0_ = (bitField0_ & ~0x00001000);
onChanged();
return this;
}
private com.google.protobuf.Internal.DoubleList positiveCount_ = emptyDoubleList();
private void ensurePositiveCountIsMutable() {
if (!((bitField0_ & 0x00002000) != 0)) {
positiveCount_ = mutableCopy(positiveCount_);
bitField0_ |= 0x00002000;
}
}
/**
*
* Absolute count of each bucket.
*
*
* repeated double positive_count = 14;
* @return A list containing the positiveCount.
*/
public java.util.List
getPositiveCountList() {
return ((bitField0_ & 0x00002000) != 0) ?
java.util.Collections.unmodifiableList(positiveCount_) : positiveCount_;
}
/**
*
* Absolute count of each bucket.
*
*
* repeated double positive_count = 14;
* @return The count of positiveCount.
*/
public int getPositiveCountCount() {
return positiveCount_.size();
}
/**
*
* Absolute count of each bucket.
*
*
* repeated double positive_count = 14;
* @param index The index of the element to return.
* @return The positiveCount at the given index.
*/
public double getPositiveCount(int index) {
return positiveCount_.getDouble(index);
}
/**
*
* Absolute count of each bucket.
*
*
* repeated double positive_count = 14;
* @param index The index to set the value at.
* @param value The positiveCount to set.
* @return This builder for chaining.
*/
public Builder setPositiveCount(
int index, double value) {
ensurePositiveCountIsMutable();
positiveCount_.setDouble(index, value);
onChanged();
return this;
}
/**
*
* Absolute count of each bucket.
*
*
* repeated double positive_count = 14;
* @param value The positiveCount to add.
* @return This builder for chaining.
*/
public Builder addPositiveCount(double value) {
ensurePositiveCountIsMutable();
positiveCount_.addDouble(value);
onChanged();
return this;
}
/**
*
* Absolute count of each bucket.
*
*
* repeated double positive_count = 14;
* @param values The positiveCount to add.
* @return This builder for chaining.
*/
public Builder addAllPositiveCount(
java.lang.Iterable extends java.lang.Double> values) {
ensurePositiveCountIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, positiveCount_);
onChanged();
return this;
}
/**
*
* Absolute count of each bucket.
*
*
* repeated double positive_count = 14;
* @return This builder for chaining.
*/
public Builder clearPositiveCount() {
positiveCount_ = emptyDoubleList();
bitField0_ = (bitField0_ & ~0x00002000);
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:io.prometheus.client.Histogram)
}
// @@protoc_insertion_point(class_scope:io.prometheus.client.Histogram)
private static final io.prometheus.client.Metrics.Histogram DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.prometheus.client.Metrics.Histogram();
}
public static io.prometheus.client.Metrics.Histogram getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Histogram parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Histogram(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 io.prometheus.client.Metrics.Histogram getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface BucketOrBuilder extends
// @@protoc_insertion_point(interface_extends:io.prometheus.client.Bucket)
com.google.protobuf.MessageOrBuilder {
/**
*
* Cumulative in increasing order.
*
*
* optional uint64 cumulative_count = 1;
* @return Whether the cumulativeCount field is set.
*/
boolean hasCumulativeCount();
/**
*
* Cumulative in increasing order.
*
*
* optional uint64 cumulative_count = 1;
* @return The cumulativeCount.
*/
long getCumulativeCount();
/**
*
* Overrides cumulative_count if > 0.
*
*
* optional double cumulative_count_float = 4;
* @return Whether the cumulativeCountFloat field is set.
*/
boolean hasCumulativeCountFloat();
/**
*
* Overrides cumulative_count if > 0.
*
*
* optional double cumulative_count_float = 4;
* @return The cumulativeCountFloat.
*/
double getCumulativeCountFloat();
/**
*
* Inclusive.
*
*
* optional double upper_bound = 2;
* @return Whether the upperBound field is set.
*/
boolean hasUpperBound();
/**
*
* Inclusive.
*
*
* optional double upper_bound = 2;
* @return The upperBound.
*/
double getUpperBound();
/**
* optional .io.prometheus.client.Exemplar exemplar = 3;
* @return Whether the exemplar field is set.
*/
boolean hasExemplar();
/**
* optional .io.prometheus.client.Exemplar exemplar = 3;
* @return The exemplar.
*/
io.prometheus.client.Metrics.Exemplar getExemplar();
/**
* optional .io.prometheus.client.Exemplar exemplar = 3;
*/
io.prometheus.client.Metrics.ExemplarOrBuilder getExemplarOrBuilder();
}
/**
*
* A Bucket of a conventional histogram, each of which is treated as
* an individual counter-like time series by Prometheus.
*
*
* Protobuf type {@code io.prometheus.client.Bucket}
*/
public static final class Bucket extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:io.prometheus.client.Bucket)
BucketOrBuilder {
private static final long serialVersionUID = 0L;
// Use Bucket.newBuilder() to construct.
private Bucket(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Bucket() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Bucket();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Bucket(
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: {
bitField0_ |= 0x00000001;
cumulativeCount_ = input.readUInt64();
break;
}
case 17: {
bitField0_ |= 0x00000004;
upperBound_ = input.readDouble();
break;
}
case 26: {
io.prometheus.client.Metrics.Exemplar.Builder subBuilder = null;
if (((bitField0_ & 0x00000008) != 0)) {
subBuilder = exemplar_.toBuilder();
}
exemplar_ = input.readMessage(io.prometheus.client.Metrics.Exemplar.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(exemplar_);
exemplar_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000008;
break;
}
case 33: {
bitField0_ |= 0x00000002;
cumulativeCountFloat_ = input.readDouble();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().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 io.prometheus.client.Metrics.internal_static_io_prometheus_client_Bucket_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Bucket_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.prometheus.client.Metrics.Bucket.class, io.prometheus.client.Metrics.Bucket.Builder.class);
}
private int bitField0_;
public static final int CUMULATIVE_COUNT_FIELD_NUMBER = 1;
private long cumulativeCount_;
/**
*
* Cumulative in increasing order.
*
*
* optional uint64 cumulative_count = 1;
* @return Whether the cumulativeCount field is set.
*/
@java.lang.Override
public boolean hasCumulativeCount() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Cumulative in increasing order.
*
*
* optional uint64 cumulative_count = 1;
* @return The cumulativeCount.
*/
@java.lang.Override
public long getCumulativeCount() {
return cumulativeCount_;
}
public static final int CUMULATIVE_COUNT_FLOAT_FIELD_NUMBER = 4;
private double cumulativeCountFloat_;
/**
*
* Overrides cumulative_count if > 0.
*
*
* optional double cumulative_count_float = 4;
* @return Whether the cumulativeCountFloat field is set.
*/
@java.lang.Override
public boolean hasCumulativeCountFloat() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Overrides cumulative_count if > 0.
*
*
* optional double cumulative_count_float = 4;
* @return The cumulativeCountFloat.
*/
@java.lang.Override
public double getCumulativeCountFloat() {
return cumulativeCountFloat_;
}
public static final int UPPER_BOUND_FIELD_NUMBER = 2;
private double upperBound_;
/**
*
* Inclusive.
*
*
* optional double upper_bound = 2;
* @return Whether the upperBound field is set.
*/
@java.lang.Override
public boolean hasUpperBound() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Inclusive.
*
*
* optional double upper_bound = 2;
* @return The upperBound.
*/
@java.lang.Override
public double getUpperBound() {
return upperBound_;
}
public static final int EXEMPLAR_FIELD_NUMBER = 3;
private io.prometheus.client.Metrics.Exemplar exemplar_;
/**
* optional .io.prometheus.client.Exemplar exemplar = 3;
* @return Whether the exemplar field is set.
*/
@java.lang.Override
public boolean hasExemplar() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional .io.prometheus.client.Exemplar exemplar = 3;
* @return The exemplar.
*/
@java.lang.Override
public io.prometheus.client.Metrics.Exemplar getExemplar() {
return exemplar_ == null ? io.prometheus.client.Metrics.Exemplar.getDefaultInstance() : exemplar_;
}
/**
* optional .io.prometheus.client.Exemplar exemplar = 3;
*/
@java.lang.Override
public io.prometheus.client.Metrics.ExemplarOrBuilder getExemplarOrBuilder() {
return exemplar_ == null ? io.prometheus.client.Metrics.Exemplar.getDefaultInstance() : exemplar_;
}
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 (((bitField0_ & 0x00000001) != 0)) {
output.writeUInt64(1, cumulativeCount_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeDouble(2, upperBound_);
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(3, getExemplar());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeDouble(4, cumulativeCountFloat_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt64Size(1, cumulativeCount_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(2, upperBound_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getExemplar());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(4, cumulativeCountFloat_);
}
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 io.prometheus.client.Metrics.Bucket)) {
return super.equals(obj);
}
io.prometheus.client.Metrics.Bucket other = (io.prometheus.client.Metrics.Bucket) obj;
if (hasCumulativeCount() != other.hasCumulativeCount()) return false;
if (hasCumulativeCount()) {
if (getCumulativeCount()
!= other.getCumulativeCount()) return false;
}
if (hasCumulativeCountFloat() != other.hasCumulativeCountFloat()) return false;
if (hasCumulativeCountFloat()) {
if (java.lang.Double.doubleToLongBits(getCumulativeCountFloat())
!= java.lang.Double.doubleToLongBits(
other.getCumulativeCountFloat())) return false;
}
if (hasUpperBound() != other.hasUpperBound()) return false;
if (hasUpperBound()) {
if (java.lang.Double.doubleToLongBits(getUpperBound())
!= java.lang.Double.doubleToLongBits(
other.getUpperBound())) return false;
}
if (hasExemplar() != other.hasExemplar()) return false;
if (hasExemplar()) {
if (!getExemplar()
.equals(other.getExemplar())) 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 (hasCumulativeCount()) {
hash = (37 * hash) + CUMULATIVE_COUNT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getCumulativeCount());
}
if (hasCumulativeCountFloat()) {
hash = (37 * hash) + CUMULATIVE_COUNT_FLOAT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getCumulativeCountFloat()));
}
if (hasUpperBound()) {
hash = (37 * hash) + UPPER_BOUND_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getUpperBound()));
}
if (hasExemplar()) {
hash = (37 * hash) + EXEMPLAR_FIELD_NUMBER;
hash = (53 * hash) + getExemplar().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.prometheus.client.Metrics.Bucket parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.Bucket parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.Bucket parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.Bucket parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.Bucket parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.Bucket parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.Bucket parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.Bucket parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.prometheus.client.Metrics.Bucket parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.Bucket parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.prometheus.client.Metrics.Bucket parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.Bucket parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.prometheus.client.Metrics.Bucket prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* A Bucket of a conventional histogram, each of which is treated as
* an individual counter-like time series by Prometheus.
*
*
* Protobuf type {@code io.prometheus.client.Bucket}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:io.prometheus.client.Bucket)
io.prometheus.client.Metrics.BucketOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Bucket_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Bucket_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.prometheus.client.Metrics.Bucket.class, io.prometheus.client.Metrics.Bucket.Builder.class);
}
// Construct using io.prometheus.client.Metrics.Bucket.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getExemplarFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
cumulativeCount_ = 0L;
bitField0_ = (bitField0_ & ~0x00000001);
cumulativeCountFloat_ = 0D;
bitField0_ = (bitField0_ & ~0x00000002);
upperBound_ = 0D;
bitField0_ = (bitField0_ & ~0x00000004);
if (exemplarBuilder_ == null) {
exemplar_ = null;
} else {
exemplarBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Bucket_descriptor;
}
@java.lang.Override
public io.prometheus.client.Metrics.Bucket getDefaultInstanceForType() {
return io.prometheus.client.Metrics.Bucket.getDefaultInstance();
}
@java.lang.Override
public io.prometheus.client.Metrics.Bucket build() {
io.prometheus.client.Metrics.Bucket result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.prometheus.client.Metrics.Bucket buildPartial() {
io.prometheus.client.Metrics.Bucket result = new io.prometheus.client.Metrics.Bucket(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.cumulativeCount_ = cumulativeCount_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.cumulativeCountFloat_ = cumulativeCountFloat_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.upperBound_ = upperBound_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
if (exemplarBuilder_ == null) {
result.exemplar_ = exemplar_;
} else {
result.exemplar_ = exemplarBuilder_.build();
}
to_bitField0_ |= 0x00000008;
}
result.bitField0_ = to_bitField0_;
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 io.prometheus.client.Metrics.Bucket) {
return mergeFrom((io.prometheus.client.Metrics.Bucket)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.prometheus.client.Metrics.Bucket other) {
if (other == io.prometheus.client.Metrics.Bucket.getDefaultInstance()) return this;
if (other.hasCumulativeCount()) {
setCumulativeCount(other.getCumulativeCount());
}
if (other.hasCumulativeCountFloat()) {
setCumulativeCountFloat(other.getCumulativeCountFloat());
}
if (other.hasUpperBound()) {
setUpperBound(other.getUpperBound());
}
if (other.hasExemplar()) {
mergeExemplar(other.getExemplar());
}
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 {
io.prometheus.client.Metrics.Bucket parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.prometheus.client.Metrics.Bucket) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private long cumulativeCount_ ;
/**
*
* Cumulative in increasing order.
*
*
* optional uint64 cumulative_count = 1;
* @return Whether the cumulativeCount field is set.
*/
@java.lang.Override
public boolean hasCumulativeCount() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Cumulative in increasing order.
*
*
* optional uint64 cumulative_count = 1;
* @return The cumulativeCount.
*/
@java.lang.Override
public long getCumulativeCount() {
return cumulativeCount_;
}
/**
*
* Cumulative in increasing order.
*
*
* optional uint64 cumulative_count = 1;
* @param value The cumulativeCount to set.
* @return This builder for chaining.
*/
public Builder setCumulativeCount(long value) {
bitField0_ |= 0x00000001;
cumulativeCount_ = value;
onChanged();
return this;
}
/**
*
* Cumulative in increasing order.
*
*
* optional uint64 cumulative_count = 1;
* @return This builder for chaining.
*/
public Builder clearCumulativeCount() {
bitField0_ = (bitField0_ & ~0x00000001);
cumulativeCount_ = 0L;
onChanged();
return this;
}
private double cumulativeCountFloat_ ;
/**
*
* Overrides cumulative_count if > 0.
*
*
* optional double cumulative_count_float = 4;
* @return Whether the cumulativeCountFloat field is set.
*/
@java.lang.Override
public boolean hasCumulativeCountFloat() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Overrides cumulative_count if > 0.
*
*
* optional double cumulative_count_float = 4;
* @return The cumulativeCountFloat.
*/
@java.lang.Override
public double getCumulativeCountFloat() {
return cumulativeCountFloat_;
}
/**
*
* Overrides cumulative_count if > 0.
*
*
* optional double cumulative_count_float = 4;
* @param value The cumulativeCountFloat to set.
* @return This builder for chaining.
*/
public Builder setCumulativeCountFloat(double value) {
bitField0_ |= 0x00000002;
cumulativeCountFloat_ = value;
onChanged();
return this;
}
/**
*
* Overrides cumulative_count if > 0.
*
*
* optional double cumulative_count_float = 4;
* @return This builder for chaining.
*/
public Builder clearCumulativeCountFloat() {
bitField0_ = (bitField0_ & ~0x00000002);
cumulativeCountFloat_ = 0D;
onChanged();
return this;
}
private double upperBound_ ;
/**
*
* Inclusive.
*
*
* optional double upper_bound = 2;
* @return Whether the upperBound field is set.
*/
@java.lang.Override
public boolean hasUpperBound() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Inclusive.
*
*
* optional double upper_bound = 2;
* @return The upperBound.
*/
@java.lang.Override
public double getUpperBound() {
return upperBound_;
}
/**
*
* Inclusive.
*
*
* optional double upper_bound = 2;
* @param value The upperBound to set.
* @return This builder for chaining.
*/
public Builder setUpperBound(double value) {
bitField0_ |= 0x00000004;
upperBound_ = value;
onChanged();
return this;
}
/**
*
* Inclusive.
*
*
* optional double upper_bound = 2;
* @return This builder for chaining.
*/
public Builder clearUpperBound() {
bitField0_ = (bitField0_ & ~0x00000004);
upperBound_ = 0D;
onChanged();
return this;
}
private io.prometheus.client.Metrics.Exemplar exemplar_;
private com.google.protobuf.SingleFieldBuilderV3<
io.prometheus.client.Metrics.Exemplar, io.prometheus.client.Metrics.Exemplar.Builder, io.prometheus.client.Metrics.ExemplarOrBuilder> exemplarBuilder_;
/**
* optional .io.prometheus.client.Exemplar exemplar = 3;
* @return Whether the exemplar field is set.
*/
public boolean hasExemplar() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional .io.prometheus.client.Exemplar exemplar = 3;
* @return The exemplar.
*/
public io.prometheus.client.Metrics.Exemplar getExemplar() {
if (exemplarBuilder_ == null) {
return exemplar_ == null ? io.prometheus.client.Metrics.Exemplar.getDefaultInstance() : exemplar_;
} else {
return exemplarBuilder_.getMessage();
}
}
/**
* optional .io.prometheus.client.Exemplar exemplar = 3;
*/
public Builder setExemplar(io.prometheus.client.Metrics.Exemplar value) {
if (exemplarBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
exemplar_ = value;
onChanged();
} else {
exemplarBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
* optional .io.prometheus.client.Exemplar exemplar = 3;
*/
public Builder setExemplar(
io.prometheus.client.Metrics.Exemplar.Builder builderForValue) {
if (exemplarBuilder_ == null) {
exemplar_ = builderForValue.build();
onChanged();
} else {
exemplarBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
return this;
}
/**
* optional .io.prometheus.client.Exemplar exemplar = 3;
*/
public Builder mergeExemplar(io.prometheus.client.Metrics.Exemplar value) {
if (exemplarBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0) &&
exemplar_ != null &&
exemplar_ != io.prometheus.client.Metrics.Exemplar.getDefaultInstance()) {
exemplar_ =
io.prometheus.client.Metrics.Exemplar.newBuilder(exemplar_).mergeFrom(value).buildPartial();
} else {
exemplar_ = value;
}
onChanged();
} else {
exemplarBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
* optional .io.prometheus.client.Exemplar exemplar = 3;
*/
public Builder clearExemplar() {
if (exemplarBuilder_ == null) {
exemplar_ = null;
onChanged();
} else {
exemplarBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
/**
* optional .io.prometheus.client.Exemplar exemplar = 3;
*/
public io.prometheus.client.Metrics.Exemplar.Builder getExemplarBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getExemplarFieldBuilder().getBuilder();
}
/**
* optional .io.prometheus.client.Exemplar exemplar = 3;
*/
public io.prometheus.client.Metrics.ExemplarOrBuilder getExemplarOrBuilder() {
if (exemplarBuilder_ != null) {
return exemplarBuilder_.getMessageOrBuilder();
} else {
return exemplar_ == null ?
io.prometheus.client.Metrics.Exemplar.getDefaultInstance() : exemplar_;
}
}
/**
* optional .io.prometheus.client.Exemplar exemplar = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.prometheus.client.Metrics.Exemplar, io.prometheus.client.Metrics.Exemplar.Builder, io.prometheus.client.Metrics.ExemplarOrBuilder>
getExemplarFieldBuilder() {
if (exemplarBuilder_ == null) {
exemplarBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.prometheus.client.Metrics.Exemplar, io.prometheus.client.Metrics.Exemplar.Builder, io.prometheus.client.Metrics.ExemplarOrBuilder>(
getExemplar(),
getParentForChildren(),
isClean());
exemplar_ = null;
}
return exemplarBuilder_;
}
@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:io.prometheus.client.Bucket)
}
// @@protoc_insertion_point(class_scope:io.prometheus.client.Bucket)
private static final io.prometheus.client.Metrics.Bucket DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.prometheus.client.Metrics.Bucket();
}
public static io.prometheus.client.Metrics.Bucket getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Bucket parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Bucket(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 io.prometheus.client.Metrics.Bucket getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface BucketSpanOrBuilder extends
// @@protoc_insertion_point(interface_extends:io.prometheus.client.BucketSpan)
com.google.protobuf.MessageOrBuilder {
/**
*
* Gap to previous span, or starting point for 1st span (which can be negative).
*
*
* optional sint32 offset = 1;
* @return Whether the offset field is set.
*/
boolean hasOffset();
/**
*
* Gap to previous span, or starting point for 1st span (which can be negative).
*
*
* optional sint32 offset = 1;
* @return The offset.
*/
int getOffset();
/**
*
* Length of consecutive buckets.
*
*
* optional uint32 length = 2;
* @return Whether the length field is set.
*/
boolean hasLength();
/**
*
* Length of consecutive buckets.
*
*
* optional uint32 length = 2;
* @return The length.
*/
int getLength();
}
/**
*
* A BucketSpan defines a number of consecutive buckets in a native
* histogram with their offset. Logically, it would be more
* straightforward to include the bucket counts in the Span. However,
* the protobuf representation is more compact in the way the data is
* structured here (with all the buckets in a single array separate
* from the Spans).
*
*
* Protobuf type {@code io.prometheus.client.BucketSpan}
*/
public static final class BucketSpan extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:io.prometheus.client.BucketSpan)
BucketSpanOrBuilder {
private static final long serialVersionUID = 0L;
// Use BucketSpan.newBuilder() to construct.
private BucketSpan(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private BucketSpan() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new BucketSpan();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private BucketSpan(
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: {
bitField0_ |= 0x00000001;
offset_ = input.readSInt32();
break;
}
case 16: {
bitField0_ |= 0x00000002;
length_ = input.readUInt32();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().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 io.prometheus.client.Metrics.internal_static_io_prometheus_client_BucketSpan_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_BucketSpan_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.prometheus.client.Metrics.BucketSpan.class, io.prometheus.client.Metrics.BucketSpan.Builder.class);
}
private int bitField0_;
public static final int OFFSET_FIELD_NUMBER = 1;
private int offset_;
/**
*
* Gap to previous span, or starting point for 1st span (which can be negative).
*
*
* optional sint32 offset = 1;
* @return Whether the offset field is set.
*/
@java.lang.Override
public boolean hasOffset() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Gap to previous span, or starting point for 1st span (which can be negative).
*
*
* optional sint32 offset = 1;
* @return The offset.
*/
@java.lang.Override
public int getOffset() {
return offset_;
}
public static final int LENGTH_FIELD_NUMBER = 2;
private int length_;
/**
*
* Length of consecutive buckets.
*
*
* optional uint32 length = 2;
* @return Whether the length field is set.
*/
@java.lang.Override
public boolean hasLength() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Length of consecutive buckets.
*
*
* optional uint32 length = 2;
* @return The length.
*/
@java.lang.Override
public int getLength() {
return length_;
}
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 (((bitField0_ & 0x00000001) != 0)) {
output.writeSInt32(1, offset_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeUInt32(2, length_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeSInt32Size(1, offset_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(2, length_);
}
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 io.prometheus.client.Metrics.BucketSpan)) {
return super.equals(obj);
}
io.prometheus.client.Metrics.BucketSpan other = (io.prometheus.client.Metrics.BucketSpan) obj;
if (hasOffset() != other.hasOffset()) return false;
if (hasOffset()) {
if (getOffset()
!= other.getOffset()) return false;
}
if (hasLength() != other.hasLength()) return false;
if (hasLength()) {
if (getLength()
!= other.getLength()) 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 (hasOffset()) {
hash = (37 * hash) + OFFSET_FIELD_NUMBER;
hash = (53 * hash) + getOffset();
}
if (hasLength()) {
hash = (37 * hash) + LENGTH_FIELD_NUMBER;
hash = (53 * hash) + getLength();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.prometheus.client.Metrics.BucketSpan parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.BucketSpan parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.BucketSpan parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.BucketSpan parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.BucketSpan parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.BucketSpan parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.BucketSpan parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.BucketSpan parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.prometheus.client.Metrics.BucketSpan parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.BucketSpan parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.prometheus.client.Metrics.BucketSpan parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.BucketSpan parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.prometheus.client.Metrics.BucketSpan prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* A BucketSpan defines a number of consecutive buckets in a native
* histogram with their offset. Logically, it would be more
* straightforward to include the bucket counts in the Span. However,
* the protobuf representation is more compact in the way the data is
* structured here (with all the buckets in a single array separate
* from the Spans).
*
*
* Protobuf type {@code io.prometheus.client.BucketSpan}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:io.prometheus.client.BucketSpan)
io.prometheus.client.Metrics.BucketSpanOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_BucketSpan_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_BucketSpan_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.prometheus.client.Metrics.BucketSpan.class, io.prometheus.client.Metrics.BucketSpan.Builder.class);
}
// Construct using io.prometheus.client.Metrics.BucketSpan.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();
offset_ = 0;
bitField0_ = (bitField0_ & ~0x00000001);
length_ = 0;
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_BucketSpan_descriptor;
}
@java.lang.Override
public io.prometheus.client.Metrics.BucketSpan getDefaultInstanceForType() {
return io.prometheus.client.Metrics.BucketSpan.getDefaultInstance();
}
@java.lang.Override
public io.prometheus.client.Metrics.BucketSpan build() {
io.prometheus.client.Metrics.BucketSpan result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.prometheus.client.Metrics.BucketSpan buildPartial() {
io.prometheus.client.Metrics.BucketSpan result = new io.prometheus.client.Metrics.BucketSpan(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.offset_ = offset_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.length_ = length_;
to_bitField0_ |= 0x00000002;
}
result.bitField0_ = to_bitField0_;
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 io.prometheus.client.Metrics.BucketSpan) {
return mergeFrom((io.prometheus.client.Metrics.BucketSpan)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.prometheus.client.Metrics.BucketSpan other) {
if (other == io.prometheus.client.Metrics.BucketSpan.getDefaultInstance()) return this;
if (other.hasOffset()) {
setOffset(other.getOffset());
}
if (other.hasLength()) {
setLength(other.getLength());
}
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 {
io.prometheus.client.Metrics.BucketSpan parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.prometheus.client.Metrics.BucketSpan) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int offset_ ;
/**
*
* Gap to previous span, or starting point for 1st span (which can be negative).
*
*
* optional sint32 offset = 1;
* @return Whether the offset field is set.
*/
@java.lang.Override
public boolean hasOffset() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Gap to previous span, or starting point for 1st span (which can be negative).
*
*
* optional sint32 offset = 1;
* @return The offset.
*/
@java.lang.Override
public int getOffset() {
return offset_;
}
/**
*
* Gap to previous span, or starting point for 1st span (which can be negative).
*
*
* optional sint32 offset = 1;
* @param value The offset to set.
* @return This builder for chaining.
*/
public Builder setOffset(int value) {
bitField0_ |= 0x00000001;
offset_ = value;
onChanged();
return this;
}
/**
*
* Gap to previous span, or starting point for 1st span (which can be negative).
*
*
* optional sint32 offset = 1;
* @return This builder for chaining.
*/
public Builder clearOffset() {
bitField0_ = (bitField0_ & ~0x00000001);
offset_ = 0;
onChanged();
return this;
}
private int length_ ;
/**
*
* Length of consecutive buckets.
*
*
* optional uint32 length = 2;
* @return Whether the length field is set.
*/
@java.lang.Override
public boolean hasLength() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* Length of consecutive buckets.
*
*
* optional uint32 length = 2;
* @return The length.
*/
@java.lang.Override
public int getLength() {
return length_;
}
/**
*
* Length of consecutive buckets.
*
*
* optional uint32 length = 2;
* @param value The length to set.
* @return This builder for chaining.
*/
public Builder setLength(int value) {
bitField0_ |= 0x00000002;
length_ = value;
onChanged();
return this;
}
/**
*
* Length of consecutive buckets.
*
*
* optional uint32 length = 2;
* @return This builder for chaining.
*/
public Builder clearLength() {
bitField0_ = (bitField0_ & ~0x00000002);
length_ = 0;
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:io.prometheus.client.BucketSpan)
}
// @@protoc_insertion_point(class_scope:io.prometheus.client.BucketSpan)
private static final io.prometheus.client.Metrics.BucketSpan DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.prometheus.client.Metrics.BucketSpan();
}
public static io.prometheus.client.Metrics.BucketSpan getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public BucketSpan parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new BucketSpan(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 io.prometheus.client.Metrics.BucketSpan getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ExemplarOrBuilder extends
// @@protoc_insertion_point(interface_extends:io.prometheus.client.Exemplar)
com.google.protobuf.MessageOrBuilder {
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
java.util.List
getLabelList();
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
io.prometheus.client.Metrics.LabelPair getLabel(int index);
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
int getLabelCount();
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
java.util.List extends io.prometheus.client.Metrics.LabelPairOrBuilder>
getLabelOrBuilderList();
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
io.prometheus.client.Metrics.LabelPairOrBuilder getLabelOrBuilder(
int index);
/**
* optional double value = 2;
* @return Whether the value field is set.
*/
boolean hasValue();
/**
* optional double value = 2;
* @return The value.
*/
double getValue();
/**
*
* OpenMetrics-style.
*
*
* optional .google.protobuf.Timestamp timestamp = 3;
* @return Whether the timestamp field is set.
*/
boolean hasTimestamp();
/**
*
* OpenMetrics-style.
*
*
* optional .google.protobuf.Timestamp timestamp = 3;
* @return The timestamp.
*/
com.google.protobuf.Timestamp getTimestamp();
/**
*
* OpenMetrics-style.
*
*
* optional .google.protobuf.Timestamp timestamp = 3;
*/
com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder();
}
/**
* Protobuf type {@code io.prometheus.client.Exemplar}
*/
public static final class Exemplar extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:io.prometheus.client.Exemplar)
ExemplarOrBuilder {
private static final long serialVersionUID = 0L;
// Use Exemplar.newBuilder() to construct.
private Exemplar(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Exemplar() {
label_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Exemplar();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Exemplar(
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)) {
label_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
label_.add(
input.readMessage(io.prometheus.client.Metrics.LabelPair.PARSER, extensionRegistry));
break;
}
case 17: {
bitField0_ |= 0x00000001;
value_ = input.readDouble();
break;
}
case 26: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (((bitField0_ & 0x00000002) != 0)) {
subBuilder = timestamp_.toBuilder();
}
timestamp_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(timestamp_);
timestamp_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000002;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
label_ = java.util.Collections.unmodifiableList(label_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Exemplar_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Exemplar_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.prometheus.client.Metrics.Exemplar.class, io.prometheus.client.Metrics.Exemplar.Builder.class);
}
private int bitField0_;
public static final int LABEL_FIELD_NUMBER = 1;
private java.util.List label_;
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
@java.lang.Override
public java.util.List getLabelList() {
return label_;
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
@java.lang.Override
public java.util.List extends io.prometheus.client.Metrics.LabelPairOrBuilder>
getLabelOrBuilderList() {
return label_;
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
@java.lang.Override
public int getLabelCount() {
return label_.size();
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
@java.lang.Override
public io.prometheus.client.Metrics.LabelPair getLabel(int index) {
return label_.get(index);
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
@java.lang.Override
public io.prometheus.client.Metrics.LabelPairOrBuilder getLabelOrBuilder(
int index) {
return label_.get(index);
}
public static final int VALUE_FIELD_NUMBER = 2;
private double value_;
/**
* optional double value = 2;
* @return Whether the value field is set.
*/
@java.lang.Override
public boolean hasValue() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional double value = 2;
* @return The value.
*/
@java.lang.Override
public double getValue() {
return value_;
}
public static final int TIMESTAMP_FIELD_NUMBER = 3;
private com.google.protobuf.Timestamp timestamp_;
/**
*
* OpenMetrics-style.
*
*
* optional .google.protobuf.Timestamp timestamp = 3;
* @return Whether the timestamp field is set.
*/
@java.lang.Override
public boolean hasTimestamp() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
* OpenMetrics-style.
*
*
* optional .google.protobuf.Timestamp timestamp = 3;
* @return The timestamp.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getTimestamp() {
return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
}
/**
*
* OpenMetrics-style.
*
*
* optional .google.protobuf.Timestamp timestamp = 3;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() {
return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
}
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 < label_.size(); i++) {
output.writeMessage(1, label_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeDouble(2, value_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(3, getTimestamp());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < label_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, label_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(2, value_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getTimestamp());
}
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 io.prometheus.client.Metrics.Exemplar)) {
return super.equals(obj);
}
io.prometheus.client.Metrics.Exemplar other = (io.prometheus.client.Metrics.Exemplar) obj;
if (!getLabelList()
.equals(other.getLabelList())) 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 (hasTimestamp() != other.hasTimestamp()) return false;
if (hasTimestamp()) {
if (!getTimestamp()
.equals(other.getTimestamp())) 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 (getLabelCount() > 0) {
hash = (37 * hash) + LABEL_FIELD_NUMBER;
hash = (53 * hash) + getLabelList().hashCode();
}
if (hasValue()) {
hash = (37 * hash) + VALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getValue()));
}
if (hasTimestamp()) {
hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + getTimestamp().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.prometheus.client.Metrics.Exemplar parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.Exemplar parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.Exemplar parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.Exemplar parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.Exemplar parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.Exemplar parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.Exemplar parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.Exemplar parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.prometheus.client.Metrics.Exemplar parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.Exemplar parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.prometheus.client.Metrics.Exemplar parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.Exemplar parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.prometheus.client.Metrics.Exemplar 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 io.prometheus.client.Exemplar}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:io.prometheus.client.Exemplar)
io.prometheus.client.Metrics.ExemplarOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Exemplar_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Exemplar_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.prometheus.client.Metrics.Exemplar.class, io.prometheus.client.Metrics.Exemplar.Builder.class);
}
// Construct using io.prometheus.client.Metrics.Exemplar.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getLabelFieldBuilder();
getTimestampFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (labelBuilder_ == null) {
label_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
labelBuilder_.clear();
}
value_ = 0D;
bitField0_ = (bitField0_ & ~0x00000002);
if (timestampBuilder_ == null) {
timestamp_ = null;
} else {
timestampBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Exemplar_descriptor;
}
@java.lang.Override
public io.prometheus.client.Metrics.Exemplar getDefaultInstanceForType() {
return io.prometheus.client.Metrics.Exemplar.getDefaultInstance();
}
@java.lang.Override
public io.prometheus.client.Metrics.Exemplar build() {
io.prometheus.client.Metrics.Exemplar result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.prometheus.client.Metrics.Exemplar buildPartial() {
io.prometheus.client.Metrics.Exemplar result = new io.prometheus.client.Metrics.Exemplar(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (labelBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
label_ = java.util.Collections.unmodifiableList(label_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.label_ = label_;
} else {
result.label_ = labelBuilder_.build();
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.value_ = value_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
if (timestampBuilder_ == null) {
result.timestamp_ = timestamp_;
} else {
result.timestamp_ = timestampBuilder_.build();
}
to_bitField0_ |= 0x00000002;
}
result.bitField0_ = to_bitField0_;
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 io.prometheus.client.Metrics.Exemplar) {
return mergeFrom((io.prometheus.client.Metrics.Exemplar)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.prometheus.client.Metrics.Exemplar other) {
if (other == io.prometheus.client.Metrics.Exemplar.getDefaultInstance()) return this;
if (labelBuilder_ == null) {
if (!other.label_.isEmpty()) {
if (label_.isEmpty()) {
label_ = other.label_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureLabelIsMutable();
label_.addAll(other.label_);
}
onChanged();
}
} else {
if (!other.label_.isEmpty()) {
if (labelBuilder_.isEmpty()) {
labelBuilder_.dispose();
labelBuilder_ = null;
label_ = other.label_;
bitField0_ = (bitField0_ & ~0x00000001);
labelBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getLabelFieldBuilder() : null;
} else {
labelBuilder_.addAllMessages(other.label_);
}
}
}
if (other.hasValue()) {
setValue(other.getValue());
}
if (other.hasTimestamp()) {
mergeTimestamp(other.getTimestamp());
}
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 {
io.prometheus.client.Metrics.Exemplar parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.prometheus.client.Metrics.Exemplar) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List label_ =
java.util.Collections.emptyList();
private void ensureLabelIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
label_ = new java.util.ArrayList(label_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.prometheus.client.Metrics.LabelPair, io.prometheus.client.Metrics.LabelPair.Builder, io.prometheus.client.Metrics.LabelPairOrBuilder> labelBuilder_;
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public java.util.List getLabelList() {
if (labelBuilder_ == null) {
return java.util.Collections.unmodifiableList(label_);
} else {
return labelBuilder_.getMessageList();
}
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public int getLabelCount() {
if (labelBuilder_ == null) {
return label_.size();
} else {
return labelBuilder_.getCount();
}
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public io.prometheus.client.Metrics.LabelPair getLabel(int index) {
if (labelBuilder_ == null) {
return label_.get(index);
} else {
return labelBuilder_.getMessage(index);
}
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public Builder setLabel(
int index, io.prometheus.client.Metrics.LabelPair value) {
if (labelBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLabelIsMutable();
label_.set(index, value);
onChanged();
} else {
labelBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public Builder setLabel(
int index, io.prometheus.client.Metrics.LabelPair.Builder builderForValue) {
if (labelBuilder_ == null) {
ensureLabelIsMutable();
label_.set(index, builderForValue.build());
onChanged();
} else {
labelBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public Builder addLabel(io.prometheus.client.Metrics.LabelPair value) {
if (labelBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLabelIsMutable();
label_.add(value);
onChanged();
} else {
labelBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public Builder addLabel(
int index, io.prometheus.client.Metrics.LabelPair value) {
if (labelBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLabelIsMutable();
label_.add(index, value);
onChanged();
} else {
labelBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public Builder addLabel(
io.prometheus.client.Metrics.LabelPair.Builder builderForValue) {
if (labelBuilder_ == null) {
ensureLabelIsMutable();
label_.add(builderForValue.build());
onChanged();
} else {
labelBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public Builder addLabel(
int index, io.prometheus.client.Metrics.LabelPair.Builder builderForValue) {
if (labelBuilder_ == null) {
ensureLabelIsMutable();
label_.add(index, builderForValue.build());
onChanged();
} else {
labelBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public Builder addAllLabel(
java.lang.Iterable extends io.prometheus.client.Metrics.LabelPair> values) {
if (labelBuilder_ == null) {
ensureLabelIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, label_);
onChanged();
} else {
labelBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public Builder clearLabel() {
if (labelBuilder_ == null) {
label_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
labelBuilder_.clear();
}
return this;
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public Builder removeLabel(int index) {
if (labelBuilder_ == null) {
ensureLabelIsMutable();
label_.remove(index);
onChanged();
} else {
labelBuilder_.remove(index);
}
return this;
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public io.prometheus.client.Metrics.LabelPair.Builder getLabelBuilder(
int index) {
return getLabelFieldBuilder().getBuilder(index);
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public io.prometheus.client.Metrics.LabelPairOrBuilder getLabelOrBuilder(
int index) {
if (labelBuilder_ == null) {
return label_.get(index); } else {
return labelBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public java.util.List extends io.prometheus.client.Metrics.LabelPairOrBuilder>
getLabelOrBuilderList() {
if (labelBuilder_ != null) {
return labelBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(label_);
}
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public io.prometheus.client.Metrics.LabelPair.Builder addLabelBuilder() {
return getLabelFieldBuilder().addBuilder(
io.prometheus.client.Metrics.LabelPair.getDefaultInstance());
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public io.prometheus.client.Metrics.LabelPair.Builder addLabelBuilder(
int index) {
return getLabelFieldBuilder().addBuilder(
index, io.prometheus.client.Metrics.LabelPair.getDefaultInstance());
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public java.util.List
getLabelBuilderList() {
return getLabelFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.prometheus.client.Metrics.LabelPair, io.prometheus.client.Metrics.LabelPair.Builder, io.prometheus.client.Metrics.LabelPairOrBuilder>
getLabelFieldBuilder() {
if (labelBuilder_ == null) {
labelBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.prometheus.client.Metrics.LabelPair, io.prometheus.client.Metrics.LabelPair.Builder, io.prometheus.client.Metrics.LabelPairOrBuilder>(
label_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
label_ = null;
}
return labelBuilder_;
}
private double value_ ;
/**
* optional double value = 2;
* @return Whether the value field is set.
*/
@java.lang.Override
public boolean hasValue() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional double value = 2;
* @return The value.
*/
@java.lang.Override
public double getValue() {
return value_;
}
/**
* optional double value = 2;
* @param value The value to set.
* @return This builder for chaining.
*/
public Builder setValue(double value) {
bitField0_ |= 0x00000002;
value_ = value;
onChanged();
return this;
}
/**
* optional double value = 2;
* @return This builder for chaining.
*/
public Builder clearValue() {
bitField0_ = (bitField0_ & ~0x00000002);
value_ = 0D;
onChanged();
return this;
}
private com.google.protobuf.Timestamp timestamp_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timestampBuilder_;
/**
*
* OpenMetrics-style.
*
*
* optional .google.protobuf.Timestamp timestamp = 3;
* @return Whether the timestamp field is set.
*/
public boolean hasTimestamp() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* OpenMetrics-style.
*
*
* optional .google.protobuf.Timestamp timestamp = 3;
* @return The timestamp.
*/
public com.google.protobuf.Timestamp getTimestamp() {
if (timestampBuilder_ == null) {
return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
} else {
return timestampBuilder_.getMessage();
}
}
/**
*
* OpenMetrics-style.
*
*
* optional .google.protobuf.Timestamp timestamp = 3;
*/
public Builder setTimestamp(com.google.protobuf.Timestamp value) {
if (timestampBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
timestamp_ = value;
onChanged();
} else {
timestampBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
* OpenMetrics-style.
*
*
* optional .google.protobuf.Timestamp timestamp = 3;
*/
public Builder setTimestamp(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (timestampBuilder_ == null) {
timestamp_ = builderForValue.build();
onChanged();
} else {
timestampBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
* OpenMetrics-style.
*
*
* optional .google.protobuf.Timestamp timestamp = 3;
*/
public Builder mergeTimestamp(com.google.protobuf.Timestamp value) {
if (timestampBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0) &&
timestamp_ != null &&
timestamp_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
timestamp_ =
com.google.protobuf.Timestamp.newBuilder(timestamp_).mergeFrom(value).buildPartial();
} else {
timestamp_ = value;
}
onChanged();
} else {
timestampBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
*
* OpenMetrics-style.
*
*
* optional .google.protobuf.Timestamp timestamp = 3;
*/
public Builder clearTimestamp() {
if (timestampBuilder_ == null) {
timestamp_ = null;
onChanged();
} else {
timestampBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
/**
*
* OpenMetrics-style.
*
*
* optional .google.protobuf.Timestamp timestamp = 3;
*/
public com.google.protobuf.Timestamp.Builder getTimestampBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getTimestampFieldBuilder().getBuilder();
}
/**
*
* OpenMetrics-style.
*
*
* optional .google.protobuf.Timestamp timestamp = 3;
*/
public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() {
if (timestampBuilder_ != null) {
return timestampBuilder_.getMessageOrBuilder();
} else {
return timestamp_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
}
}
/**
*
* OpenMetrics-style.
*
*
* optional .google.protobuf.Timestamp timestamp = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getTimestampFieldBuilder() {
if (timestampBuilder_ == null) {
timestampBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getTimestamp(),
getParentForChildren(),
isClean());
timestamp_ = null;
}
return timestampBuilder_;
}
@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:io.prometheus.client.Exemplar)
}
// @@protoc_insertion_point(class_scope:io.prometheus.client.Exemplar)
private static final io.prometheus.client.Metrics.Exemplar DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.prometheus.client.Metrics.Exemplar();
}
public static io.prometheus.client.Metrics.Exemplar getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Exemplar parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Exemplar(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 io.prometheus.client.Metrics.Exemplar getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface MetricOrBuilder extends
// @@protoc_insertion_point(interface_extends:io.prometheus.client.Metric)
com.google.protobuf.MessageOrBuilder {
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
java.util.List
getLabelList();
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
io.prometheus.client.Metrics.LabelPair getLabel(int index);
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
int getLabelCount();
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
java.util.List extends io.prometheus.client.Metrics.LabelPairOrBuilder>
getLabelOrBuilderList();
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
io.prometheus.client.Metrics.LabelPairOrBuilder getLabelOrBuilder(
int index);
/**
* optional .io.prometheus.client.Gauge gauge = 2;
* @return Whether the gauge field is set.
*/
boolean hasGauge();
/**
* optional .io.prometheus.client.Gauge gauge = 2;
* @return The gauge.
*/
io.prometheus.client.Metrics.Gauge getGauge();
/**
* optional .io.prometheus.client.Gauge gauge = 2;
*/
io.prometheus.client.Metrics.GaugeOrBuilder getGaugeOrBuilder();
/**
* optional .io.prometheus.client.Counter counter = 3;
* @return Whether the counter field is set.
*/
boolean hasCounter();
/**
* optional .io.prometheus.client.Counter counter = 3;
* @return The counter.
*/
io.prometheus.client.Metrics.Counter getCounter();
/**
* optional .io.prometheus.client.Counter counter = 3;
*/
io.prometheus.client.Metrics.CounterOrBuilder getCounterOrBuilder();
/**
* optional .io.prometheus.client.Summary summary = 4;
* @return Whether the summary field is set.
*/
boolean hasSummary();
/**
* optional .io.prometheus.client.Summary summary = 4;
* @return The summary.
*/
io.prometheus.client.Metrics.Summary getSummary();
/**
* optional .io.prometheus.client.Summary summary = 4;
*/
io.prometheus.client.Metrics.SummaryOrBuilder getSummaryOrBuilder();
/**
* optional .io.prometheus.client.Untyped untyped = 5;
* @return Whether the untyped field is set.
*/
boolean hasUntyped();
/**
* optional .io.prometheus.client.Untyped untyped = 5;
* @return The untyped.
*/
io.prometheus.client.Metrics.Untyped getUntyped();
/**
* optional .io.prometheus.client.Untyped untyped = 5;
*/
io.prometheus.client.Metrics.UntypedOrBuilder getUntypedOrBuilder();
/**
* optional .io.prometheus.client.Histogram histogram = 7;
* @return Whether the histogram field is set.
*/
boolean hasHistogram();
/**
* optional .io.prometheus.client.Histogram histogram = 7;
* @return The histogram.
*/
io.prometheus.client.Metrics.Histogram getHistogram();
/**
* optional .io.prometheus.client.Histogram histogram = 7;
*/
io.prometheus.client.Metrics.HistogramOrBuilder getHistogramOrBuilder();
/**
* optional int64 timestamp_ms = 6;
* @return Whether the timestampMs field is set.
*/
boolean hasTimestampMs();
/**
* optional int64 timestamp_ms = 6;
* @return The timestampMs.
*/
long getTimestampMs();
}
/**
* Protobuf type {@code io.prometheus.client.Metric}
*/
public static final class Metric extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:io.prometheus.client.Metric)
MetricOrBuilder {
private static final long serialVersionUID = 0L;
// Use Metric.newBuilder() to construct.
private Metric(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Metric() {
label_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Metric();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Metric(
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)) {
label_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
label_.add(
input.readMessage(io.prometheus.client.Metrics.LabelPair.PARSER, extensionRegistry));
break;
}
case 18: {
io.prometheus.client.Metrics.Gauge.Builder subBuilder = null;
if (((bitField0_ & 0x00000001) != 0)) {
subBuilder = gauge_.toBuilder();
}
gauge_ = input.readMessage(io.prometheus.client.Metrics.Gauge.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(gauge_);
gauge_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000001;
break;
}
case 26: {
io.prometheus.client.Metrics.Counter.Builder subBuilder = null;
if (((bitField0_ & 0x00000002) != 0)) {
subBuilder = counter_.toBuilder();
}
counter_ = input.readMessage(io.prometheus.client.Metrics.Counter.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(counter_);
counter_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000002;
break;
}
case 34: {
io.prometheus.client.Metrics.Summary.Builder subBuilder = null;
if (((bitField0_ & 0x00000004) != 0)) {
subBuilder = summary_.toBuilder();
}
summary_ = input.readMessage(io.prometheus.client.Metrics.Summary.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(summary_);
summary_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000004;
break;
}
case 42: {
io.prometheus.client.Metrics.Untyped.Builder subBuilder = null;
if (((bitField0_ & 0x00000008) != 0)) {
subBuilder = untyped_.toBuilder();
}
untyped_ = input.readMessage(io.prometheus.client.Metrics.Untyped.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(untyped_);
untyped_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000008;
break;
}
case 48: {
bitField0_ |= 0x00000020;
timestampMs_ = input.readInt64();
break;
}
case 58: {
io.prometheus.client.Metrics.Histogram.Builder subBuilder = null;
if (((bitField0_ & 0x00000010) != 0)) {
subBuilder = histogram_.toBuilder();
}
histogram_ = input.readMessage(io.prometheus.client.Metrics.Histogram.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(histogram_);
histogram_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000010;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
label_ = java.util.Collections.unmodifiableList(label_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Metric_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Metric_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.prometheus.client.Metrics.Metric.class, io.prometheus.client.Metrics.Metric.Builder.class);
}
private int bitField0_;
public static final int LABEL_FIELD_NUMBER = 1;
private java.util.List label_;
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
@java.lang.Override
public java.util.List getLabelList() {
return label_;
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
@java.lang.Override
public java.util.List extends io.prometheus.client.Metrics.LabelPairOrBuilder>
getLabelOrBuilderList() {
return label_;
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
@java.lang.Override
public int getLabelCount() {
return label_.size();
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
@java.lang.Override
public io.prometheus.client.Metrics.LabelPair getLabel(int index) {
return label_.get(index);
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
@java.lang.Override
public io.prometheus.client.Metrics.LabelPairOrBuilder getLabelOrBuilder(
int index) {
return label_.get(index);
}
public static final int GAUGE_FIELD_NUMBER = 2;
private io.prometheus.client.Metrics.Gauge gauge_;
/**
* optional .io.prometheus.client.Gauge gauge = 2;
* @return Whether the gauge field is set.
*/
@java.lang.Override
public boolean hasGauge() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional .io.prometheus.client.Gauge gauge = 2;
* @return The gauge.
*/
@java.lang.Override
public io.prometheus.client.Metrics.Gauge getGauge() {
return gauge_ == null ? io.prometheus.client.Metrics.Gauge.getDefaultInstance() : gauge_;
}
/**
* optional .io.prometheus.client.Gauge gauge = 2;
*/
@java.lang.Override
public io.prometheus.client.Metrics.GaugeOrBuilder getGaugeOrBuilder() {
return gauge_ == null ? io.prometheus.client.Metrics.Gauge.getDefaultInstance() : gauge_;
}
public static final int COUNTER_FIELD_NUMBER = 3;
private io.prometheus.client.Metrics.Counter counter_;
/**
* optional .io.prometheus.client.Counter counter = 3;
* @return Whether the counter field is set.
*/
@java.lang.Override
public boolean hasCounter() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional .io.prometheus.client.Counter counter = 3;
* @return The counter.
*/
@java.lang.Override
public io.prometheus.client.Metrics.Counter getCounter() {
return counter_ == null ? io.prometheus.client.Metrics.Counter.getDefaultInstance() : counter_;
}
/**
* optional .io.prometheus.client.Counter counter = 3;
*/
@java.lang.Override
public io.prometheus.client.Metrics.CounterOrBuilder getCounterOrBuilder() {
return counter_ == null ? io.prometheus.client.Metrics.Counter.getDefaultInstance() : counter_;
}
public static final int SUMMARY_FIELD_NUMBER = 4;
private io.prometheus.client.Metrics.Summary summary_;
/**
* optional .io.prometheus.client.Summary summary = 4;
* @return Whether the summary field is set.
*/
@java.lang.Override
public boolean hasSummary() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* optional .io.prometheus.client.Summary summary = 4;
* @return The summary.
*/
@java.lang.Override
public io.prometheus.client.Metrics.Summary getSummary() {
return summary_ == null ? io.prometheus.client.Metrics.Summary.getDefaultInstance() : summary_;
}
/**
* optional .io.prometheus.client.Summary summary = 4;
*/
@java.lang.Override
public io.prometheus.client.Metrics.SummaryOrBuilder getSummaryOrBuilder() {
return summary_ == null ? io.prometheus.client.Metrics.Summary.getDefaultInstance() : summary_;
}
public static final int UNTYPED_FIELD_NUMBER = 5;
private io.prometheus.client.Metrics.Untyped untyped_;
/**
* optional .io.prometheus.client.Untyped untyped = 5;
* @return Whether the untyped field is set.
*/
@java.lang.Override
public boolean hasUntyped() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional .io.prometheus.client.Untyped untyped = 5;
* @return The untyped.
*/
@java.lang.Override
public io.prometheus.client.Metrics.Untyped getUntyped() {
return untyped_ == null ? io.prometheus.client.Metrics.Untyped.getDefaultInstance() : untyped_;
}
/**
* optional .io.prometheus.client.Untyped untyped = 5;
*/
@java.lang.Override
public io.prometheus.client.Metrics.UntypedOrBuilder getUntypedOrBuilder() {
return untyped_ == null ? io.prometheus.client.Metrics.Untyped.getDefaultInstance() : untyped_;
}
public static final int HISTOGRAM_FIELD_NUMBER = 7;
private io.prometheus.client.Metrics.Histogram histogram_;
/**
* optional .io.prometheus.client.Histogram histogram = 7;
* @return Whether the histogram field is set.
*/
@java.lang.Override
public boolean hasHistogram() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
* optional .io.prometheus.client.Histogram histogram = 7;
* @return The histogram.
*/
@java.lang.Override
public io.prometheus.client.Metrics.Histogram getHistogram() {
return histogram_ == null ? io.prometheus.client.Metrics.Histogram.getDefaultInstance() : histogram_;
}
/**
* optional .io.prometheus.client.Histogram histogram = 7;
*/
@java.lang.Override
public io.prometheus.client.Metrics.HistogramOrBuilder getHistogramOrBuilder() {
return histogram_ == null ? io.prometheus.client.Metrics.Histogram.getDefaultInstance() : histogram_;
}
public static final int TIMESTAMP_MS_FIELD_NUMBER = 6;
private long timestampMs_;
/**
* optional int64 timestamp_ms = 6;
* @return Whether the timestampMs field is set.
*/
@java.lang.Override
public boolean hasTimestampMs() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
* optional int64 timestamp_ms = 6;
* @return The timestampMs.
*/
@java.lang.Override
public long getTimestampMs() {
return timestampMs_;
}
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 < label_.size(); i++) {
output.writeMessage(1, label_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getGauge());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(3, getCounter());
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(4, getSummary());
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(5, getUntyped());
}
if (((bitField0_ & 0x00000020) != 0)) {
output.writeInt64(6, timestampMs_);
}
if (((bitField0_ & 0x00000010) != 0)) {
output.writeMessage(7, getHistogram());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < label_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, label_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getGauge());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getCounter());
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getSummary());
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getUntyped());
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(6, timestampMs_);
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getHistogram());
}
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 io.prometheus.client.Metrics.Metric)) {
return super.equals(obj);
}
io.prometheus.client.Metrics.Metric other = (io.prometheus.client.Metrics.Metric) obj;
if (!getLabelList()
.equals(other.getLabelList())) return false;
if (hasGauge() != other.hasGauge()) return false;
if (hasGauge()) {
if (!getGauge()
.equals(other.getGauge())) return false;
}
if (hasCounter() != other.hasCounter()) return false;
if (hasCounter()) {
if (!getCounter()
.equals(other.getCounter())) return false;
}
if (hasSummary() != other.hasSummary()) return false;
if (hasSummary()) {
if (!getSummary()
.equals(other.getSummary())) return false;
}
if (hasUntyped() != other.hasUntyped()) return false;
if (hasUntyped()) {
if (!getUntyped()
.equals(other.getUntyped())) return false;
}
if (hasHistogram() != other.hasHistogram()) return false;
if (hasHistogram()) {
if (!getHistogram()
.equals(other.getHistogram())) return false;
}
if (hasTimestampMs() != other.hasTimestampMs()) return false;
if (hasTimestampMs()) {
if (getTimestampMs()
!= other.getTimestampMs()) 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 (getLabelCount() > 0) {
hash = (37 * hash) + LABEL_FIELD_NUMBER;
hash = (53 * hash) + getLabelList().hashCode();
}
if (hasGauge()) {
hash = (37 * hash) + GAUGE_FIELD_NUMBER;
hash = (53 * hash) + getGauge().hashCode();
}
if (hasCounter()) {
hash = (37 * hash) + COUNTER_FIELD_NUMBER;
hash = (53 * hash) + getCounter().hashCode();
}
if (hasSummary()) {
hash = (37 * hash) + SUMMARY_FIELD_NUMBER;
hash = (53 * hash) + getSummary().hashCode();
}
if (hasUntyped()) {
hash = (37 * hash) + UNTYPED_FIELD_NUMBER;
hash = (53 * hash) + getUntyped().hashCode();
}
if (hasHistogram()) {
hash = (37 * hash) + HISTOGRAM_FIELD_NUMBER;
hash = (53 * hash) + getHistogram().hashCode();
}
if (hasTimestampMs()) {
hash = (37 * hash) + TIMESTAMP_MS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTimestampMs());
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.prometheus.client.Metrics.Metric parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.Metric parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.Metric parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.Metric parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.Metric parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.Metric parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.Metric parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.Metric parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.prometheus.client.Metrics.Metric parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.Metric parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.prometheus.client.Metrics.Metric parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.Metric parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.prometheus.client.Metrics.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(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code io.prometheus.client.Metric}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:io.prometheus.client.Metric)
io.prometheus.client.Metrics.MetricOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Metric_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Metric_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.prometheus.client.Metrics.Metric.class, io.prometheus.client.Metrics.Metric.Builder.class);
}
// Construct using io.prometheus.client.Metrics.Metric.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getLabelFieldBuilder();
getGaugeFieldBuilder();
getCounterFieldBuilder();
getSummaryFieldBuilder();
getUntypedFieldBuilder();
getHistogramFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (labelBuilder_ == null) {
label_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
labelBuilder_.clear();
}
if (gaugeBuilder_ == null) {
gauge_ = null;
} else {
gaugeBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
if (counterBuilder_ == null) {
counter_ = null;
} else {
counterBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
if (summaryBuilder_ == null) {
summary_ = null;
} else {
summaryBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
if (untypedBuilder_ == null) {
untyped_ = null;
} else {
untypedBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
if (histogramBuilder_ == null) {
histogram_ = null;
} else {
histogramBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000020);
timestampMs_ = 0L;
bitField0_ = (bitField0_ & ~0x00000040);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_Metric_descriptor;
}
@java.lang.Override
public io.prometheus.client.Metrics.Metric getDefaultInstanceForType() {
return io.prometheus.client.Metrics.Metric.getDefaultInstance();
}
@java.lang.Override
public io.prometheus.client.Metrics.Metric build() {
io.prometheus.client.Metrics.Metric result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.prometheus.client.Metrics.Metric buildPartial() {
io.prometheus.client.Metrics.Metric result = new io.prometheus.client.Metrics.Metric(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (labelBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
label_ = java.util.Collections.unmodifiableList(label_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.label_ = label_;
} else {
result.label_ = labelBuilder_.build();
}
if (((from_bitField0_ & 0x00000002) != 0)) {
if (gaugeBuilder_ == null) {
result.gauge_ = gauge_;
} else {
result.gauge_ = gaugeBuilder_.build();
}
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
if (counterBuilder_ == null) {
result.counter_ = counter_;
} else {
result.counter_ = counterBuilder_.build();
}
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
if (summaryBuilder_ == null) {
result.summary_ = summary_;
} else {
result.summary_ = summaryBuilder_.build();
}
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
if (untypedBuilder_ == null) {
result.untyped_ = untyped_;
} else {
result.untyped_ = untypedBuilder_.build();
}
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
if (histogramBuilder_ == null) {
result.histogram_ = histogram_;
} else {
result.histogram_ = histogramBuilder_.build();
}
to_bitField0_ |= 0x00000010;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.timestampMs_ = timestampMs_;
to_bitField0_ |= 0x00000020;
}
result.bitField0_ = to_bitField0_;
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 io.prometheus.client.Metrics.Metric) {
return mergeFrom((io.prometheus.client.Metrics.Metric)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.prometheus.client.Metrics.Metric other) {
if (other == io.prometheus.client.Metrics.Metric.getDefaultInstance()) return this;
if (labelBuilder_ == null) {
if (!other.label_.isEmpty()) {
if (label_.isEmpty()) {
label_ = other.label_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureLabelIsMutable();
label_.addAll(other.label_);
}
onChanged();
}
} else {
if (!other.label_.isEmpty()) {
if (labelBuilder_.isEmpty()) {
labelBuilder_.dispose();
labelBuilder_ = null;
label_ = other.label_;
bitField0_ = (bitField0_ & ~0x00000001);
labelBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getLabelFieldBuilder() : null;
} else {
labelBuilder_.addAllMessages(other.label_);
}
}
}
if (other.hasGauge()) {
mergeGauge(other.getGauge());
}
if (other.hasCounter()) {
mergeCounter(other.getCounter());
}
if (other.hasSummary()) {
mergeSummary(other.getSummary());
}
if (other.hasUntyped()) {
mergeUntyped(other.getUntyped());
}
if (other.hasHistogram()) {
mergeHistogram(other.getHistogram());
}
if (other.hasTimestampMs()) {
setTimestampMs(other.getTimestampMs());
}
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 {
io.prometheus.client.Metrics.Metric parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.prometheus.client.Metrics.Metric) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List label_ =
java.util.Collections.emptyList();
private void ensureLabelIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
label_ = new java.util.ArrayList(label_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.prometheus.client.Metrics.LabelPair, io.prometheus.client.Metrics.LabelPair.Builder, io.prometheus.client.Metrics.LabelPairOrBuilder> labelBuilder_;
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public java.util.List getLabelList() {
if (labelBuilder_ == null) {
return java.util.Collections.unmodifiableList(label_);
} else {
return labelBuilder_.getMessageList();
}
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public int getLabelCount() {
if (labelBuilder_ == null) {
return label_.size();
} else {
return labelBuilder_.getCount();
}
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public io.prometheus.client.Metrics.LabelPair getLabel(int index) {
if (labelBuilder_ == null) {
return label_.get(index);
} else {
return labelBuilder_.getMessage(index);
}
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public Builder setLabel(
int index, io.prometheus.client.Metrics.LabelPair value) {
if (labelBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLabelIsMutable();
label_.set(index, value);
onChanged();
} else {
labelBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public Builder setLabel(
int index, io.prometheus.client.Metrics.LabelPair.Builder builderForValue) {
if (labelBuilder_ == null) {
ensureLabelIsMutable();
label_.set(index, builderForValue.build());
onChanged();
} else {
labelBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public Builder addLabel(io.prometheus.client.Metrics.LabelPair value) {
if (labelBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLabelIsMutable();
label_.add(value);
onChanged();
} else {
labelBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public Builder addLabel(
int index, io.prometheus.client.Metrics.LabelPair value) {
if (labelBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLabelIsMutable();
label_.add(index, value);
onChanged();
} else {
labelBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public Builder addLabel(
io.prometheus.client.Metrics.LabelPair.Builder builderForValue) {
if (labelBuilder_ == null) {
ensureLabelIsMutable();
label_.add(builderForValue.build());
onChanged();
} else {
labelBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public Builder addLabel(
int index, io.prometheus.client.Metrics.LabelPair.Builder builderForValue) {
if (labelBuilder_ == null) {
ensureLabelIsMutable();
label_.add(index, builderForValue.build());
onChanged();
} else {
labelBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public Builder addAllLabel(
java.lang.Iterable extends io.prometheus.client.Metrics.LabelPair> values) {
if (labelBuilder_ == null) {
ensureLabelIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, label_);
onChanged();
} else {
labelBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public Builder clearLabel() {
if (labelBuilder_ == null) {
label_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
labelBuilder_.clear();
}
return this;
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public Builder removeLabel(int index) {
if (labelBuilder_ == null) {
ensureLabelIsMutable();
label_.remove(index);
onChanged();
} else {
labelBuilder_.remove(index);
}
return this;
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public io.prometheus.client.Metrics.LabelPair.Builder getLabelBuilder(
int index) {
return getLabelFieldBuilder().getBuilder(index);
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public io.prometheus.client.Metrics.LabelPairOrBuilder getLabelOrBuilder(
int index) {
if (labelBuilder_ == null) {
return label_.get(index); } else {
return labelBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public java.util.List extends io.prometheus.client.Metrics.LabelPairOrBuilder>
getLabelOrBuilderList() {
if (labelBuilder_ != null) {
return labelBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(label_);
}
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public io.prometheus.client.Metrics.LabelPair.Builder addLabelBuilder() {
return getLabelFieldBuilder().addBuilder(
io.prometheus.client.Metrics.LabelPair.getDefaultInstance());
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public io.prometheus.client.Metrics.LabelPair.Builder addLabelBuilder(
int index) {
return getLabelFieldBuilder().addBuilder(
index, io.prometheus.client.Metrics.LabelPair.getDefaultInstance());
}
/**
* repeated .io.prometheus.client.LabelPair label = 1;
*/
public java.util.List
getLabelBuilderList() {
return getLabelFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.prometheus.client.Metrics.LabelPair, io.prometheus.client.Metrics.LabelPair.Builder, io.prometheus.client.Metrics.LabelPairOrBuilder>
getLabelFieldBuilder() {
if (labelBuilder_ == null) {
labelBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.prometheus.client.Metrics.LabelPair, io.prometheus.client.Metrics.LabelPair.Builder, io.prometheus.client.Metrics.LabelPairOrBuilder>(
label_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
label_ = null;
}
return labelBuilder_;
}
private io.prometheus.client.Metrics.Gauge gauge_;
private com.google.protobuf.SingleFieldBuilderV3<
io.prometheus.client.Metrics.Gauge, io.prometheus.client.Metrics.Gauge.Builder, io.prometheus.client.Metrics.GaugeOrBuilder> gaugeBuilder_;
/**
* optional .io.prometheus.client.Gauge gauge = 2;
* @return Whether the gauge field is set.
*/
public boolean hasGauge() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional .io.prometheus.client.Gauge gauge = 2;
* @return The gauge.
*/
public io.prometheus.client.Metrics.Gauge getGauge() {
if (gaugeBuilder_ == null) {
return gauge_ == null ? io.prometheus.client.Metrics.Gauge.getDefaultInstance() : gauge_;
} else {
return gaugeBuilder_.getMessage();
}
}
/**
* optional .io.prometheus.client.Gauge gauge = 2;
*/
public Builder setGauge(io.prometheus.client.Metrics.Gauge value) {
if (gaugeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
gauge_ = value;
onChanged();
} else {
gaugeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
* optional .io.prometheus.client.Gauge gauge = 2;
*/
public Builder setGauge(
io.prometheus.client.Metrics.Gauge.Builder builderForValue) {
if (gaugeBuilder_ == null) {
gauge_ = builderForValue.build();
onChanged();
} else {
gaugeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
return this;
}
/**
* optional .io.prometheus.client.Gauge gauge = 2;
*/
public Builder mergeGauge(io.prometheus.client.Metrics.Gauge value) {
if (gaugeBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0) &&
gauge_ != null &&
gauge_ != io.prometheus.client.Metrics.Gauge.getDefaultInstance()) {
gauge_ =
io.prometheus.client.Metrics.Gauge.newBuilder(gauge_).mergeFrom(value).buildPartial();
} else {
gauge_ = value;
}
onChanged();
} else {
gaugeBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000002;
return this;
}
/**
* optional .io.prometheus.client.Gauge gauge = 2;
*/
public Builder clearGauge() {
if (gaugeBuilder_ == null) {
gauge_ = null;
onChanged();
} else {
gaugeBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
/**
* optional .io.prometheus.client.Gauge gauge = 2;
*/
public io.prometheus.client.Metrics.Gauge.Builder getGaugeBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getGaugeFieldBuilder().getBuilder();
}
/**
* optional .io.prometheus.client.Gauge gauge = 2;
*/
public io.prometheus.client.Metrics.GaugeOrBuilder getGaugeOrBuilder() {
if (gaugeBuilder_ != null) {
return gaugeBuilder_.getMessageOrBuilder();
} else {
return gauge_ == null ?
io.prometheus.client.Metrics.Gauge.getDefaultInstance() : gauge_;
}
}
/**
* optional .io.prometheus.client.Gauge gauge = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.prometheus.client.Metrics.Gauge, io.prometheus.client.Metrics.Gauge.Builder, io.prometheus.client.Metrics.GaugeOrBuilder>
getGaugeFieldBuilder() {
if (gaugeBuilder_ == null) {
gaugeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.prometheus.client.Metrics.Gauge, io.prometheus.client.Metrics.Gauge.Builder, io.prometheus.client.Metrics.GaugeOrBuilder>(
getGauge(),
getParentForChildren(),
isClean());
gauge_ = null;
}
return gaugeBuilder_;
}
private io.prometheus.client.Metrics.Counter counter_;
private com.google.protobuf.SingleFieldBuilderV3<
io.prometheus.client.Metrics.Counter, io.prometheus.client.Metrics.Counter.Builder, io.prometheus.client.Metrics.CounterOrBuilder> counterBuilder_;
/**
* optional .io.prometheus.client.Counter counter = 3;
* @return Whether the counter field is set.
*/
public boolean hasCounter() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* optional .io.prometheus.client.Counter counter = 3;
* @return The counter.
*/
public io.prometheus.client.Metrics.Counter getCounter() {
if (counterBuilder_ == null) {
return counter_ == null ? io.prometheus.client.Metrics.Counter.getDefaultInstance() : counter_;
} else {
return counterBuilder_.getMessage();
}
}
/**
* optional .io.prometheus.client.Counter counter = 3;
*/
public Builder setCounter(io.prometheus.client.Metrics.Counter value) {
if (counterBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
counter_ = value;
onChanged();
} else {
counterBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
* optional .io.prometheus.client.Counter counter = 3;
*/
public Builder setCounter(
io.prometheus.client.Metrics.Counter.Builder builderForValue) {
if (counterBuilder_ == null) {
counter_ = builderForValue.build();
onChanged();
} else {
counterBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
return this;
}
/**
* optional .io.prometheus.client.Counter counter = 3;
*/
public Builder mergeCounter(io.prometheus.client.Metrics.Counter value) {
if (counterBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0) &&
counter_ != null &&
counter_ != io.prometheus.client.Metrics.Counter.getDefaultInstance()) {
counter_ =
io.prometheus.client.Metrics.Counter.newBuilder(counter_).mergeFrom(value).buildPartial();
} else {
counter_ = value;
}
onChanged();
} else {
counterBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000004;
return this;
}
/**
* optional .io.prometheus.client.Counter counter = 3;
*/
public Builder clearCounter() {
if (counterBuilder_ == null) {
counter_ = null;
onChanged();
} else {
counterBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
return this;
}
/**
* optional .io.prometheus.client.Counter counter = 3;
*/
public io.prometheus.client.Metrics.Counter.Builder getCounterBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getCounterFieldBuilder().getBuilder();
}
/**
* optional .io.prometheus.client.Counter counter = 3;
*/
public io.prometheus.client.Metrics.CounterOrBuilder getCounterOrBuilder() {
if (counterBuilder_ != null) {
return counterBuilder_.getMessageOrBuilder();
} else {
return counter_ == null ?
io.prometheus.client.Metrics.Counter.getDefaultInstance() : counter_;
}
}
/**
* optional .io.prometheus.client.Counter counter = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.prometheus.client.Metrics.Counter, io.prometheus.client.Metrics.Counter.Builder, io.prometheus.client.Metrics.CounterOrBuilder>
getCounterFieldBuilder() {
if (counterBuilder_ == null) {
counterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.prometheus.client.Metrics.Counter, io.prometheus.client.Metrics.Counter.Builder, io.prometheus.client.Metrics.CounterOrBuilder>(
getCounter(),
getParentForChildren(),
isClean());
counter_ = null;
}
return counterBuilder_;
}
private io.prometheus.client.Metrics.Summary summary_;
private com.google.protobuf.SingleFieldBuilderV3<
io.prometheus.client.Metrics.Summary, io.prometheus.client.Metrics.Summary.Builder, io.prometheus.client.Metrics.SummaryOrBuilder> summaryBuilder_;
/**
* optional .io.prometheus.client.Summary summary = 4;
* @return Whether the summary field is set.
*/
public boolean hasSummary() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
* optional .io.prometheus.client.Summary summary = 4;
* @return The summary.
*/
public io.prometheus.client.Metrics.Summary getSummary() {
if (summaryBuilder_ == null) {
return summary_ == null ? io.prometheus.client.Metrics.Summary.getDefaultInstance() : summary_;
} else {
return summaryBuilder_.getMessage();
}
}
/**
* optional .io.prometheus.client.Summary summary = 4;
*/
public Builder setSummary(io.prometheus.client.Metrics.Summary value) {
if (summaryBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
summary_ = value;
onChanged();
} else {
summaryBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
* optional .io.prometheus.client.Summary summary = 4;
*/
public Builder setSummary(
io.prometheus.client.Metrics.Summary.Builder builderForValue) {
if (summaryBuilder_ == null) {
summary_ = builderForValue.build();
onChanged();
} else {
summaryBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
return this;
}
/**
* optional .io.prometheus.client.Summary summary = 4;
*/
public Builder mergeSummary(io.prometheus.client.Metrics.Summary value) {
if (summaryBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0) &&
summary_ != null &&
summary_ != io.prometheus.client.Metrics.Summary.getDefaultInstance()) {
summary_ =
io.prometheus.client.Metrics.Summary.newBuilder(summary_).mergeFrom(value).buildPartial();
} else {
summary_ = value;
}
onChanged();
} else {
summaryBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
* optional .io.prometheus.client.Summary summary = 4;
*/
public Builder clearSummary() {
if (summaryBuilder_ == null) {
summary_ = null;
onChanged();
} else {
summaryBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
/**
* optional .io.prometheus.client.Summary summary = 4;
*/
public io.prometheus.client.Metrics.Summary.Builder getSummaryBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getSummaryFieldBuilder().getBuilder();
}
/**
* optional .io.prometheus.client.Summary summary = 4;
*/
public io.prometheus.client.Metrics.SummaryOrBuilder getSummaryOrBuilder() {
if (summaryBuilder_ != null) {
return summaryBuilder_.getMessageOrBuilder();
} else {
return summary_ == null ?
io.prometheus.client.Metrics.Summary.getDefaultInstance() : summary_;
}
}
/**
* optional .io.prometheus.client.Summary summary = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.prometheus.client.Metrics.Summary, io.prometheus.client.Metrics.Summary.Builder, io.prometheus.client.Metrics.SummaryOrBuilder>
getSummaryFieldBuilder() {
if (summaryBuilder_ == null) {
summaryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.prometheus.client.Metrics.Summary, io.prometheus.client.Metrics.Summary.Builder, io.prometheus.client.Metrics.SummaryOrBuilder>(
getSummary(),
getParentForChildren(),
isClean());
summary_ = null;
}
return summaryBuilder_;
}
private io.prometheus.client.Metrics.Untyped untyped_;
private com.google.protobuf.SingleFieldBuilderV3<
io.prometheus.client.Metrics.Untyped, io.prometheus.client.Metrics.Untyped.Builder, io.prometheus.client.Metrics.UntypedOrBuilder> untypedBuilder_;
/**
* optional .io.prometheus.client.Untyped untyped = 5;
* @return Whether the untyped field is set.
*/
public boolean hasUntyped() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
* optional .io.prometheus.client.Untyped untyped = 5;
* @return The untyped.
*/
public io.prometheus.client.Metrics.Untyped getUntyped() {
if (untypedBuilder_ == null) {
return untyped_ == null ? io.prometheus.client.Metrics.Untyped.getDefaultInstance() : untyped_;
} else {
return untypedBuilder_.getMessage();
}
}
/**
* optional .io.prometheus.client.Untyped untyped = 5;
*/
public Builder setUntyped(io.prometheus.client.Metrics.Untyped value) {
if (untypedBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
untyped_ = value;
onChanged();
} else {
untypedBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
return this;
}
/**
* optional .io.prometheus.client.Untyped untyped = 5;
*/
public Builder setUntyped(
io.prometheus.client.Metrics.Untyped.Builder builderForValue) {
if (untypedBuilder_ == null) {
untyped_ = builderForValue.build();
onChanged();
} else {
untypedBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
return this;
}
/**
* optional .io.prometheus.client.Untyped untyped = 5;
*/
public Builder mergeUntyped(io.prometheus.client.Metrics.Untyped value) {
if (untypedBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 0) &&
untyped_ != null &&
untyped_ != io.prometheus.client.Metrics.Untyped.getDefaultInstance()) {
untyped_ =
io.prometheus.client.Metrics.Untyped.newBuilder(untyped_).mergeFrom(value).buildPartial();
} else {
untyped_ = value;
}
onChanged();
} else {
untypedBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000010;
return this;
}
/**
* optional .io.prometheus.client.Untyped untyped = 5;
*/
public Builder clearUntyped() {
if (untypedBuilder_ == null) {
untyped_ = null;
onChanged();
} else {
untypedBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
return this;
}
/**
* optional .io.prometheus.client.Untyped untyped = 5;
*/
public io.prometheus.client.Metrics.Untyped.Builder getUntypedBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getUntypedFieldBuilder().getBuilder();
}
/**
* optional .io.prometheus.client.Untyped untyped = 5;
*/
public io.prometheus.client.Metrics.UntypedOrBuilder getUntypedOrBuilder() {
if (untypedBuilder_ != null) {
return untypedBuilder_.getMessageOrBuilder();
} else {
return untyped_ == null ?
io.prometheus.client.Metrics.Untyped.getDefaultInstance() : untyped_;
}
}
/**
* optional .io.prometheus.client.Untyped untyped = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.prometheus.client.Metrics.Untyped, io.prometheus.client.Metrics.Untyped.Builder, io.prometheus.client.Metrics.UntypedOrBuilder>
getUntypedFieldBuilder() {
if (untypedBuilder_ == null) {
untypedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.prometheus.client.Metrics.Untyped, io.prometheus.client.Metrics.Untyped.Builder, io.prometheus.client.Metrics.UntypedOrBuilder>(
getUntyped(),
getParentForChildren(),
isClean());
untyped_ = null;
}
return untypedBuilder_;
}
private io.prometheus.client.Metrics.Histogram histogram_;
private com.google.protobuf.SingleFieldBuilderV3<
io.prometheus.client.Metrics.Histogram, io.prometheus.client.Metrics.Histogram.Builder, io.prometheus.client.Metrics.HistogramOrBuilder> histogramBuilder_;
/**
* optional .io.prometheus.client.Histogram histogram = 7;
* @return Whether the histogram field is set.
*/
public boolean hasHistogram() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
* optional .io.prometheus.client.Histogram histogram = 7;
* @return The histogram.
*/
public io.prometheus.client.Metrics.Histogram getHistogram() {
if (histogramBuilder_ == null) {
return histogram_ == null ? io.prometheus.client.Metrics.Histogram.getDefaultInstance() : histogram_;
} else {
return histogramBuilder_.getMessage();
}
}
/**
* optional .io.prometheus.client.Histogram histogram = 7;
*/
public Builder setHistogram(io.prometheus.client.Metrics.Histogram value) {
if (histogramBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
histogram_ = value;
onChanged();
} else {
histogramBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
return this;
}
/**
* optional .io.prometheus.client.Histogram histogram = 7;
*/
public Builder setHistogram(
io.prometheus.client.Metrics.Histogram.Builder builderForValue) {
if (histogramBuilder_ == null) {
histogram_ = builderForValue.build();
onChanged();
} else {
histogramBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
return this;
}
/**
* optional .io.prometheus.client.Histogram histogram = 7;
*/
public Builder mergeHistogram(io.prometheus.client.Metrics.Histogram value) {
if (histogramBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0) &&
histogram_ != null &&
histogram_ != io.prometheus.client.Metrics.Histogram.getDefaultInstance()) {
histogram_ =
io.prometheus.client.Metrics.Histogram.newBuilder(histogram_).mergeFrom(value).buildPartial();
} else {
histogram_ = value;
}
onChanged();
} else {
histogramBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000020;
return this;
}
/**
* optional .io.prometheus.client.Histogram histogram = 7;
*/
public Builder clearHistogram() {
if (histogramBuilder_ == null) {
histogram_ = null;
onChanged();
} else {
histogramBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000020);
return this;
}
/**
* optional .io.prometheus.client.Histogram histogram = 7;
*/
public io.prometheus.client.Metrics.Histogram.Builder getHistogramBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getHistogramFieldBuilder().getBuilder();
}
/**
* optional .io.prometheus.client.Histogram histogram = 7;
*/
public io.prometheus.client.Metrics.HistogramOrBuilder getHistogramOrBuilder() {
if (histogramBuilder_ != null) {
return histogramBuilder_.getMessageOrBuilder();
} else {
return histogram_ == null ?
io.prometheus.client.Metrics.Histogram.getDefaultInstance() : histogram_;
}
}
/**
* optional .io.prometheus.client.Histogram histogram = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
io.prometheus.client.Metrics.Histogram, io.prometheus.client.Metrics.Histogram.Builder, io.prometheus.client.Metrics.HistogramOrBuilder>
getHistogramFieldBuilder() {
if (histogramBuilder_ == null) {
histogramBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
io.prometheus.client.Metrics.Histogram, io.prometheus.client.Metrics.Histogram.Builder, io.prometheus.client.Metrics.HistogramOrBuilder>(
getHistogram(),
getParentForChildren(),
isClean());
histogram_ = null;
}
return histogramBuilder_;
}
private long timestampMs_ ;
/**
* optional int64 timestamp_ms = 6;
* @return Whether the timestampMs field is set.
*/
@java.lang.Override
public boolean hasTimestampMs() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
* optional int64 timestamp_ms = 6;
* @return The timestampMs.
*/
@java.lang.Override
public long getTimestampMs() {
return timestampMs_;
}
/**
* optional int64 timestamp_ms = 6;
* @param value The timestampMs to set.
* @return This builder for chaining.
*/
public Builder setTimestampMs(long value) {
bitField0_ |= 0x00000040;
timestampMs_ = value;
onChanged();
return this;
}
/**
* optional int64 timestamp_ms = 6;
* @return This builder for chaining.
*/
public Builder clearTimestampMs() {
bitField0_ = (bitField0_ & ~0x00000040);
timestampMs_ = 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:io.prometheus.client.Metric)
}
// @@protoc_insertion_point(class_scope:io.prometheus.client.Metric)
private static final io.prometheus.client.Metrics.Metric DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.prometheus.client.Metrics.Metric();
}
public static io.prometheus.client.Metrics.Metric getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Metric parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Metric(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 io.prometheus.client.Metrics.Metric getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface MetricFamilyOrBuilder extends
// @@protoc_insertion_point(interface_extends:io.prometheus.client.MetricFamily)
com.google.protobuf.MessageOrBuilder {
/**
* optional string name = 1;
* @return Whether the name field is set.
*/
boolean hasName();
/**
* optional string name = 1;
* @return The name.
*/
java.lang.String getName();
/**
* optional string name = 1;
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
* optional string help = 2;
* @return Whether the help field is set.
*/
boolean hasHelp();
/**
* optional string help = 2;
* @return The help.
*/
java.lang.String getHelp();
/**
* optional string help = 2;
* @return The bytes for help.
*/
com.google.protobuf.ByteString
getHelpBytes();
/**
* optional .io.prometheus.client.MetricType type = 3;
* @return Whether the type field is set.
*/
boolean hasType();
/**
* optional .io.prometheus.client.MetricType type = 3;
* @return The type.
*/
io.prometheus.client.Metrics.MetricType getType();
/**
* repeated .io.prometheus.client.Metric metric = 4;
*/
java.util.List
getMetricList();
/**
* repeated .io.prometheus.client.Metric metric = 4;
*/
io.prometheus.client.Metrics.Metric getMetric(int index);
/**
* repeated .io.prometheus.client.Metric metric = 4;
*/
int getMetricCount();
/**
* repeated .io.prometheus.client.Metric metric = 4;
*/
java.util.List extends io.prometheus.client.Metrics.MetricOrBuilder>
getMetricOrBuilderList();
/**
* repeated .io.prometheus.client.Metric metric = 4;
*/
io.prometheus.client.Metrics.MetricOrBuilder getMetricOrBuilder(
int index);
}
/**
* Protobuf type {@code io.prometheus.client.MetricFamily}
*/
public static final class MetricFamily extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:io.prometheus.client.MetricFamily)
MetricFamilyOrBuilder {
private static final long serialVersionUID = 0L;
// Use MetricFamily.newBuilder() to construct.
private MetricFamily(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private MetricFamily() {
name_ = "";
help_ = "";
type_ = 0;
metric_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new MetricFamily();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private MetricFamily(
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: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000001;
name_ = bs;
break;
}
case 18: {
com.google.protobuf.ByteString bs = input.readBytes();
bitField0_ |= 0x00000002;
help_ = bs;
break;
}
case 24: {
int rawValue = input.readEnum();
@SuppressWarnings("deprecation")
io.prometheus.client.Metrics.MetricType value = io.prometheus.client.Metrics.MetricType.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(3, rawValue);
} else {
bitField0_ |= 0x00000004;
type_ = rawValue;
}
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000008) != 0)) {
metric_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
metric_.add(
input.readMessage(io.prometheus.client.Metrics.Metric.PARSER, extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000008) != 0)) {
metric_ = java.util.Collections.unmodifiableList(metric_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_MetricFamily_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_MetricFamily_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.prometheus.client.Metrics.MetricFamily.class, io.prometheus.client.Metrics.MetricFamily.Builder.class);
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_;
/**
* optional string name = 1;
* @return Whether the name field is set.
*/
@java.lang.Override
public boolean hasName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional string name = 1;
* @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 {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
name_ = s;
}
return s;
}
}
/**
* optional string name = 1;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int HELP_FIELD_NUMBER = 2;
private volatile java.lang.Object help_;
/**
* optional string help = 2;
* @return Whether the help field is set.
*/
@java.lang.Override
public boolean hasHelp() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional string help = 2;
* @return The help.
*/
@java.lang.Override
public java.lang.String getHelp() {
java.lang.Object ref = help_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
help_ = s;
}
return s;
}
}
/**
* optional string help = 2;
* @return The bytes for help.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getHelpBytes() {
java.lang.Object ref = help_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
help_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TYPE_FIELD_NUMBER = 3;
private int type_;
/**
* optional .io.prometheus.client.MetricType type = 3;
* @return Whether the type field is set.
*/
@java.lang.Override public boolean hasType() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* optional .io.prometheus.client.MetricType type = 3;
* @return The type.
*/
@java.lang.Override public io.prometheus.client.Metrics.MetricType getType() {
@SuppressWarnings("deprecation")
io.prometheus.client.Metrics.MetricType result = io.prometheus.client.Metrics.MetricType.valueOf(type_);
return result == null ? io.prometheus.client.Metrics.MetricType.COUNTER : result;
}
public static final int METRIC_FIELD_NUMBER = 4;
private java.util.List metric_;
/**
* repeated .io.prometheus.client.Metric metric = 4;
*/
@java.lang.Override
public java.util.List getMetricList() {
return metric_;
}
/**
* repeated .io.prometheus.client.Metric metric = 4;
*/
@java.lang.Override
public java.util.List extends io.prometheus.client.Metrics.MetricOrBuilder>
getMetricOrBuilderList() {
return metric_;
}
/**
* repeated .io.prometheus.client.Metric metric = 4;
*/
@java.lang.Override
public int getMetricCount() {
return metric_.size();
}
/**
* repeated .io.prometheus.client.Metric metric = 4;
*/
@java.lang.Override
public io.prometheus.client.Metrics.Metric getMetric(int index) {
return metric_.get(index);
}
/**
* repeated .io.prometheus.client.Metric metric = 4;
*/
@java.lang.Override
public io.prometheus.client.Metrics.MetricOrBuilder getMetricOrBuilder(
int index) {
return metric_.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 {
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, help_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeEnum(3, type_);
}
for (int i = 0; i < metric_.size(); i++) {
output.writeMessage(4, metric_.get(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, help_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(3, type_);
}
for (int i = 0; i < metric_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, metric_.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 io.prometheus.client.Metrics.MetricFamily)) {
return super.equals(obj);
}
io.prometheus.client.Metrics.MetricFamily other = (io.prometheus.client.Metrics.MetricFamily) obj;
if (hasName() != other.hasName()) return false;
if (hasName()) {
if (!getName()
.equals(other.getName())) return false;
}
if (hasHelp() != other.hasHelp()) return false;
if (hasHelp()) {
if (!getHelp()
.equals(other.getHelp())) return false;
}
if (hasType() != other.hasType()) return false;
if (hasType()) {
if (type_ != other.type_) return false;
}
if (!getMetricList()
.equals(other.getMetricList())) 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 (hasName()) {
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
}
if (hasHelp()) {
hash = (37 * hash) + HELP_FIELD_NUMBER;
hash = (53 * hash) + getHelp().hashCode();
}
if (hasType()) {
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
}
if (getMetricCount() > 0) {
hash = (37 * hash) + METRIC_FIELD_NUMBER;
hash = (53 * hash) + getMetricList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.prometheus.client.Metrics.MetricFamily parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.MetricFamily parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.MetricFamily parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.MetricFamily parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.MetricFamily parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.prometheus.client.Metrics.MetricFamily parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.prometheus.client.Metrics.MetricFamily parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.MetricFamily parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.prometheus.client.Metrics.MetricFamily parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.MetricFamily parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.prometheus.client.Metrics.MetricFamily parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.prometheus.client.Metrics.MetricFamily parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.prometheus.client.Metrics.MetricFamily 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 io.prometheus.client.MetricFamily}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:io.prometheus.client.MetricFamily)
io.prometheus.client.Metrics.MetricFamilyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_MetricFamily_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_MetricFamily_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.prometheus.client.Metrics.MetricFamily.class, io.prometheus.client.Metrics.MetricFamily.Builder.class);
}
// Construct using io.prometheus.client.Metrics.MetricFamily.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getMetricFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
name_ = "";
bitField0_ = (bitField0_ & ~0x00000001);
help_ = "";
bitField0_ = (bitField0_ & ~0x00000002);
type_ = 0;
bitField0_ = (bitField0_ & ~0x00000004);
if (metricBuilder_ == null) {
metric_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
} else {
metricBuilder_.clear();
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return io.prometheus.client.Metrics.internal_static_io_prometheus_client_MetricFamily_descriptor;
}
@java.lang.Override
public io.prometheus.client.Metrics.MetricFamily getDefaultInstanceForType() {
return io.prometheus.client.Metrics.MetricFamily.getDefaultInstance();
}
@java.lang.Override
public io.prometheus.client.Metrics.MetricFamily build() {
io.prometheus.client.Metrics.MetricFamily result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public io.prometheus.client.Metrics.MetricFamily buildPartial() {
io.prometheus.client.Metrics.MetricFamily result = new io.prometheus.client.Metrics.MetricFamily(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
to_bitField0_ |= 0x00000001;
}
result.name_ = name_;
if (((from_bitField0_ & 0x00000002) != 0)) {
to_bitField0_ |= 0x00000002;
}
result.help_ = help_;
if (((from_bitField0_ & 0x00000004) != 0)) {
to_bitField0_ |= 0x00000004;
}
result.type_ = type_;
if (metricBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)) {
metric_ = java.util.Collections.unmodifiableList(metric_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.metric_ = metric_;
} else {
result.metric_ = metricBuilder_.build();
}
result.bitField0_ = to_bitField0_;
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 io.prometheus.client.Metrics.MetricFamily) {
return mergeFrom((io.prometheus.client.Metrics.MetricFamily)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(io.prometheus.client.Metrics.MetricFamily other) {
if (other == io.prometheus.client.Metrics.MetricFamily.getDefaultInstance()) return this;
if (other.hasName()) {
bitField0_ |= 0x00000001;
name_ = other.name_;
onChanged();
}
if (other.hasHelp()) {
bitField0_ |= 0x00000002;
help_ = other.help_;
onChanged();
}
if (other.hasType()) {
setType(other.getType());
}
if (metricBuilder_ == null) {
if (!other.metric_.isEmpty()) {
if (metric_.isEmpty()) {
metric_ = other.metric_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureMetricIsMutable();
metric_.addAll(other.metric_);
}
onChanged();
}
} else {
if (!other.metric_.isEmpty()) {
if (metricBuilder_.isEmpty()) {
metricBuilder_.dispose();
metricBuilder_ = null;
metric_ = other.metric_;
bitField0_ = (bitField0_ & ~0x00000008);
metricBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getMetricFieldBuilder() : null;
} else {
metricBuilder_.addAllMessages(other.metric_);
}
}
}
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 {
io.prometheus.client.Metrics.MetricFamily parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.prometheus.client.Metrics.MetricFamily) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
* optional string name = 1;
* @return Whether the name field is set.
*/
public boolean hasName() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* optional string name = 1;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(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 = 1;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string name = 1;
* @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_ |= 0x00000001;
name_ = value;
onChanged();
return this;
}
/**
* optional string name = 1;
* @return This builder for chaining.
*/
public Builder clearName() {
bitField0_ = (bitField0_ & ~0x00000001);
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
* optional string name = 1;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
name_ = value;
onChanged();
return this;
}
private java.lang.Object help_ = "";
/**
* optional string help = 2;
* @return Whether the help field is set.
*/
public boolean hasHelp() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
* optional string help = 2;
* @return The help.
*/
public java.lang.String getHelp() {
java.lang.Object ref = help_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (bs.isValidUtf8()) {
help_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* optional string help = 2;
* @return The bytes for help.
*/
public com.google.protobuf.ByteString
getHelpBytes() {
java.lang.Object ref = help_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
help_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* optional string help = 2;
* @param value The help to set.
* @return This builder for chaining.
*/
public Builder setHelp(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
help_ = value;
onChanged();
return this;
}
/**
* optional string help = 2;
* @return This builder for chaining.
*/
public Builder clearHelp() {
bitField0_ = (bitField0_ & ~0x00000002);
help_ = getDefaultInstance().getHelp();
onChanged();
return this;
}
/**
* optional string help = 2;
* @param value The bytes for help to set.
* @return This builder for chaining.
*/
public Builder setHelpBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
help_ = value;
onChanged();
return this;
}
private int type_ = 0;
/**
* optional .io.prometheus.client.MetricType type = 3;
* @return Whether the type field is set.
*/
@java.lang.Override public boolean hasType() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
* optional .io.prometheus.client.MetricType type = 3;
* @return The type.
*/
@java.lang.Override
public io.prometheus.client.Metrics.MetricType getType() {
@SuppressWarnings("deprecation")
io.prometheus.client.Metrics.MetricType result = io.prometheus.client.Metrics.MetricType.valueOf(type_);
return result == null ? io.prometheus.client.Metrics.MetricType.COUNTER : result;
}
/**
* optional .io.prometheus.client.MetricType type = 3;
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(io.prometheus.client.Metrics.MetricType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
type_ = value.getNumber();
onChanged();
return this;
}
/**
* optional .io.prometheus.client.MetricType type = 3;
* @return This builder for chaining.
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000004);
type_ = 0;
onChanged();
return this;
}
private java.util.List metric_ =
java.util.Collections.emptyList();
private void ensureMetricIsMutable() {
if (!((bitField0_ & 0x00000008) != 0)) {
metric_ = new java.util.ArrayList(metric_);
bitField0_ |= 0x00000008;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.prometheus.client.Metrics.Metric, io.prometheus.client.Metrics.Metric.Builder, io.prometheus.client.Metrics.MetricOrBuilder> metricBuilder_;
/**
* repeated .io.prometheus.client.Metric metric = 4;
*/
public java.util.List getMetricList() {
if (metricBuilder_ == null) {
return java.util.Collections.unmodifiableList(metric_);
} else {
return metricBuilder_.getMessageList();
}
}
/**
* repeated .io.prometheus.client.Metric metric = 4;
*/
public int getMetricCount() {
if (metricBuilder_ == null) {
return metric_.size();
} else {
return metricBuilder_.getCount();
}
}
/**
* repeated .io.prometheus.client.Metric metric = 4;
*/
public io.prometheus.client.Metrics.Metric getMetric(int index) {
if (metricBuilder_ == null) {
return metric_.get(index);
} else {
return metricBuilder_.getMessage(index);
}
}
/**
* repeated .io.prometheus.client.Metric metric = 4;
*/
public Builder setMetric(
int index, io.prometheus.client.Metrics.Metric value) {
if (metricBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMetricIsMutable();
metric_.set(index, value);
onChanged();
} else {
metricBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .io.prometheus.client.Metric metric = 4;
*/
public Builder setMetric(
int index, io.prometheus.client.Metrics.Metric.Builder builderForValue) {
if (metricBuilder_ == null) {
ensureMetricIsMutable();
metric_.set(index, builderForValue.build());
onChanged();
} else {
metricBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .io.prometheus.client.Metric metric = 4;
*/
public Builder addMetric(io.prometheus.client.Metrics.Metric value) {
if (metricBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMetricIsMutable();
metric_.add(value);
onChanged();
} else {
metricBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .io.prometheus.client.Metric metric = 4;
*/
public Builder addMetric(
int index, io.prometheus.client.Metrics.Metric value) {
if (metricBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureMetricIsMutable();
metric_.add(index, value);
onChanged();
} else {
metricBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .io.prometheus.client.Metric metric = 4;
*/
public Builder addMetric(
io.prometheus.client.Metrics.Metric.Builder builderForValue) {
if (metricBuilder_ == null) {
ensureMetricIsMutable();
metric_.add(builderForValue.build());
onChanged();
} else {
metricBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .io.prometheus.client.Metric metric = 4;
*/
public Builder addMetric(
int index, io.prometheus.client.Metrics.Metric.Builder builderForValue) {
if (metricBuilder_ == null) {
ensureMetricIsMutable();
metric_.add(index, builderForValue.build());
onChanged();
} else {
metricBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .io.prometheus.client.Metric metric = 4;
*/
public Builder addAllMetric(
java.lang.Iterable extends io.prometheus.client.Metrics.Metric> values) {
if (metricBuilder_ == null) {
ensureMetricIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, metric_);
onChanged();
} else {
metricBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .io.prometheus.client.Metric metric = 4;
*/
public Builder clearMetric() {
if (metricBuilder_ == null) {
metric_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
metricBuilder_.clear();
}
return this;
}
/**
* repeated .io.prometheus.client.Metric metric = 4;
*/
public Builder removeMetric(int index) {
if (metricBuilder_ == null) {
ensureMetricIsMutable();
metric_.remove(index);
onChanged();
} else {
metricBuilder_.remove(index);
}
return this;
}
/**
* repeated .io.prometheus.client.Metric metric = 4;
*/
public io.prometheus.client.Metrics.Metric.Builder getMetricBuilder(
int index) {
return getMetricFieldBuilder().getBuilder(index);
}
/**
* repeated .io.prometheus.client.Metric metric = 4;
*/
public io.prometheus.client.Metrics.MetricOrBuilder getMetricOrBuilder(
int index) {
if (metricBuilder_ == null) {
return metric_.get(index); } else {
return metricBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .io.prometheus.client.Metric metric = 4;
*/
public java.util.List extends io.prometheus.client.Metrics.MetricOrBuilder>
getMetricOrBuilderList() {
if (metricBuilder_ != null) {
return metricBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(metric_);
}
}
/**
* repeated .io.prometheus.client.Metric metric = 4;
*/
public io.prometheus.client.Metrics.Metric.Builder addMetricBuilder() {
return getMetricFieldBuilder().addBuilder(
io.prometheus.client.Metrics.Metric.getDefaultInstance());
}
/**
* repeated .io.prometheus.client.Metric metric = 4;
*/
public io.prometheus.client.Metrics.Metric.Builder addMetricBuilder(
int index) {
return getMetricFieldBuilder().addBuilder(
index, io.prometheus.client.Metrics.Metric.getDefaultInstance());
}
/**
* repeated .io.prometheus.client.Metric metric = 4;
*/
public java.util.List
getMetricBuilderList() {
return getMetricFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
io.prometheus.client.Metrics.Metric, io.prometheus.client.Metrics.Metric.Builder, io.prometheus.client.Metrics.MetricOrBuilder>
getMetricFieldBuilder() {
if (metricBuilder_ == null) {
metricBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
io.prometheus.client.Metrics.Metric, io.prometheus.client.Metrics.Metric.Builder, io.prometheus.client.Metrics.MetricOrBuilder>(
metric_,
((bitField0_ & 0x00000008) != 0),
getParentForChildren(),
isClean());
metric_ = null;
}
return metricBuilder_;
}
@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:io.prometheus.client.MetricFamily)
}
// @@protoc_insertion_point(class_scope:io.prometheus.client.MetricFamily)
private static final io.prometheus.client.Metrics.MetricFamily DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.prometheus.client.Metrics.MetricFamily();
}
public static io.prometheus.client.Metrics.MetricFamily getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public MetricFamily parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new MetricFamily(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 io.prometheus.client.Metrics.MetricFamily getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_io_prometheus_client_LabelPair_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_io_prometheus_client_LabelPair_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_io_prometheus_client_Gauge_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_io_prometheus_client_Gauge_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_io_prometheus_client_Counter_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_io_prometheus_client_Counter_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_io_prometheus_client_Quantile_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_io_prometheus_client_Quantile_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_io_prometheus_client_Summary_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_io_prometheus_client_Summary_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_io_prometheus_client_Untyped_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_io_prometheus_client_Untyped_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_io_prometheus_client_Histogram_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_io_prometheus_client_Histogram_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_io_prometheus_client_Bucket_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_io_prometheus_client_Bucket_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_io_prometheus_client_BucketSpan_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_io_prometheus_client_BucketSpan_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_io_prometheus_client_Exemplar_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_io_prometheus_client_Exemplar_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_io_prometheus_client_Metric_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_io_prometheus_client_Metric_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_io_prometheus_client_MetricFamily_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_io_prometheus_client_MetricFamily_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\"io/prometheus/client/metrics.proto\022\024io" +
".prometheus.client\032\037google/protobuf/time" +
"stamp.proto\"(\n\tLabelPair\022\014\n\004name\030\001 \001(\t\022\r" +
"\n\005value\030\002 \001(\t\"\026\n\005Gauge\022\r\n\005value\030\001 \001(\001\"J\n" +
"\007Counter\022\r\n\005value\030\001 \001(\001\0220\n\010exemplar\030\002 \001(" +
"\0132\036.io.prometheus.client.Exemplar\"+\n\010Qua" +
"ntile\022\020\n\010quantile\030\001 \001(\001\022\r\n\005value\030\002 \001(\001\"e" +
"\n\007Summary\022\024\n\014sample_count\030\001 \001(\004\022\022\n\nsampl" +
"e_sum\030\002 \001(\001\0220\n\010quantile\030\003 \003(\0132\036.io.prome" +
"theus.client.Quantile\"\030\n\007Untyped\022\r\n\005valu" +
"e\030\001 \001(\001\"\247\003\n\tHistogram\022\024\n\014sample_count\030\001 " +
"\001(\004\022\032\n\022sample_count_float\030\004 \001(\001\022\022\n\nsampl" +
"e_sum\030\002 \001(\001\022,\n\006bucket\030\003 \003(\0132\034.io.prometh" +
"eus.client.Bucket\022\016\n\006schema\030\005 \001(\021\022\026\n\016zer" +
"o_threshold\030\006 \001(\001\022\022\n\nzero_count\030\007 \001(\004\022\030\n" +
"\020zero_count_float\030\010 \001(\001\0227\n\rnegative_span" +
"\030\t \003(\0132 .io.prometheus.client.BucketSpan" +
"\022\026\n\016negative_delta\030\n \003(\022\022\026\n\016negative_cou" +
"nt\030\013 \003(\001\0227\n\rpositive_span\030\014 \003(\0132 .io.pro" +
"metheus.client.BucketSpan\022\026\n\016positive_de" +
"lta\030\r \003(\022\022\026\n\016positive_count\030\016 \003(\001\"\211\001\n\006Bu" +
"cket\022\030\n\020cumulative_count\030\001 \001(\004\022\036\n\026cumula" +
"tive_count_float\030\004 \001(\001\022\023\n\013upper_bound\030\002 " +
"\001(\001\0220\n\010exemplar\030\003 \001(\0132\036.io.prometheus.cl" +
"ient.Exemplar\",\n\nBucketSpan\022\016\n\006offset\030\001 " +
"\001(\021\022\016\n\006length\030\002 \001(\r\"x\n\010Exemplar\022.\n\005label" +
"\030\001 \003(\0132\037.io.prometheus.client.LabelPair\022" +
"\r\n\005value\030\002 \001(\001\022-\n\ttimestamp\030\003 \001(\0132\032.goog" +
"le.protobuf.Timestamp\"\276\002\n\006Metric\022.\n\005labe" +
"l\030\001 \003(\0132\037.io.prometheus.client.LabelPair" +
"\022*\n\005gauge\030\002 \001(\0132\033.io.prometheus.client.G" +
"auge\022.\n\007counter\030\003 \001(\0132\035.io.prometheus.cl" +
"ient.Counter\022.\n\007summary\030\004 \001(\0132\035.io.prome" +
"theus.client.Summary\022.\n\007untyped\030\005 \001(\0132\035." +
"io.prometheus.client.Untyped\0222\n\thistogra" +
"m\030\007 \001(\0132\037.io.prometheus.client.Histogram" +
"\022\024\n\014timestamp_ms\030\006 \001(\003\"\210\001\n\014MetricFamily\022" +
"\014\n\004name\030\001 \001(\t\022\014\n\004help\030\002 \001(\t\022.\n\004type\030\003 \001(" +
"\0162 .io.prometheus.client.MetricType\022,\n\006m" +
"etric\030\004 \003(\0132\034.io.prometheus.client.Metri" +
"c*b\n\nMetricType\022\013\n\007COUNTER\020\000\022\t\n\005GAUGE\020\001\022" +
"\013\n\007SUMMARY\020\002\022\013\n\007UNTYPED\020\003\022\r\n\tHISTOGRAM\020\004" +
"\022\023\n\017GAUGE_HISTOGRAM\020\005BR\n\024io.prometheus.c" +
"lientZ:github.com/prometheus/client_mode" +
"l/go;io_prometheus_client"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.protobuf.TimestampProto.getDescriptor(),
});
internal_static_io_prometheus_client_LabelPair_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_io_prometheus_client_LabelPair_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_io_prometheus_client_LabelPair_descriptor,
new java.lang.String[] { "Name", "Value", });
internal_static_io_prometheus_client_Gauge_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_io_prometheus_client_Gauge_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_io_prometheus_client_Gauge_descriptor,
new java.lang.String[] { "Value", });
internal_static_io_prometheus_client_Counter_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_io_prometheus_client_Counter_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_io_prometheus_client_Counter_descriptor,
new java.lang.String[] { "Value", "Exemplar", });
internal_static_io_prometheus_client_Quantile_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_io_prometheus_client_Quantile_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_io_prometheus_client_Quantile_descriptor,
new java.lang.String[] { "Quantile", "Value", });
internal_static_io_prometheus_client_Summary_descriptor =
getDescriptor().getMessageTypes().get(4);
internal_static_io_prometheus_client_Summary_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_io_prometheus_client_Summary_descriptor,
new java.lang.String[] { "SampleCount", "SampleSum", "Quantile", });
internal_static_io_prometheus_client_Untyped_descriptor =
getDescriptor().getMessageTypes().get(5);
internal_static_io_prometheus_client_Untyped_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_io_prometheus_client_Untyped_descriptor,
new java.lang.String[] { "Value", });
internal_static_io_prometheus_client_Histogram_descriptor =
getDescriptor().getMessageTypes().get(6);
internal_static_io_prometheus_client_Histogram_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_io_prometheus_client_Histogram_descriptor,
new java.lang.String[] { "SampleCount", "SampleCountFloat", "SampleSum", "Bucket", "Schema", "ZeroThreshold", "ZeroCount", "ZeroCountFloat", "NegativeSpan", "NegativeDelta", "NegativeCount", "PositiveSpan", "PositiveDelta", "PositiveCount", });
internal_static_io_prometheus_client_Bucket_descriptor =
getDescriptor().getMessageTypes().get(7);
internal_static_io_prometheus_client_Bucket_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_io_prometheus_client_Bucket_descriptor,
new java.lang.String[] { "CumulativeCount", "CumulativeCountFloat", "UpperBound", "Exemplar", });
internal_static_io_prometheus_client_BucketSpan_descriptor =
getDescriptor().getMessageTypes().get(8);
internal_static_io_prometheus_client_BucketSpan_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_io_prometheus_client_BucketSpan_descriptor,
new java.lang.String[] { "Offset", "Length", });
internal_static_io_prometheus_client_Exemplar_descriptor =
getDescriptor().getMessageTypes().get(9);
internal_static_io_prometheus_client_Exemplar_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_io_prometheus_client_Exemplar_descriptor,
new java.lang.String[] { "Label", "Value", "Timestamp", });
internal_static_io_prometheus_client_Metric_descriptor =
getDescriptor().getMessageTypes().get(10);
internal_static_io_prometheus_client_Metric_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_io_prometheus_client_Metric_descriptor,
new java.lang.String[] { "Label", "Gauge", "Counter", "Summary", "Untyped", "Histogram", "TimestampMs", });
internal_static_io_prometheus_client_MetricFamily_descriptor =
getDescriptor().getMessageTypes().get(11);
internal_static_io_prometheus_client_MetricFamily_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_io_prometheus_client_MetricFamily_descriptor,
new java.lang.String[] { "Name", "Help", "Type", "Metric", });
com.google.protobuf.TimestampProto.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}