please see the following link for more details:
+ * https://prometheus.io/docs/prometheus/latest/querying/api/
+ */
+public class PrometheusSourceConfig extends HttpConfig {
+
+ public static final String INSTANT_QUERY_URL = "/api/v1/query";
+
+ public static final String RANGE_QUERY = "Range";
+
+ public static final String INSTANT_QUERY = "Instant";
+
+ public static final String RANGE_QUERY_URL = "/api/v1/query_range";
+
+ public static final Option Protobuf type {@code prometheus.ReadRequest}
+ */
+ public static final class ReadRequest extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:prometheus.ReadRequest)
+ ReadRequestOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ // Use ReadRequest.newBuilder() to construct.
+ private ReadRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private ReadRequest() {
+ queries_ = java.util.Collections.emptyList();
+ acceptedResponseTypes_ = java.util.Collections.emptyList();
+ }
+
+ @Override
+ @SuppressWarnings({"unused"})
+ protected Object newInstance(UnusedPrivateParameter unused) {
+ return new ReadRequest();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return Remote.internal_static_prometheus_ReadRequest_descriptor;
+ }
+
+ @Override
+ protected FieldAccessorTable internalGetFieldAccessorTable() {
+ return Remote.internal_static_prometheus_ReadRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Remote.ReadRequest.class, Remote.ReadRequest.Builder.class);
+ }
+
+ /** Protobuf enum {@code prometheus.ReadRequest.ResponseType} */
+ public enum ResponseType implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ *
+ *
+ * Protobuf type {@code prometheus.ReadRequest}
+ */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessageV3.Builder Protobuf type {@code prometheus.ReadResponse}
+ */
+ public static final class ReadResponse extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:prometheus.ReadResponse)
+ ReadResponseOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ // Use ReadResponse.newBuilder() to construct.
+ private ReadResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private ReadResponse() {
+ results_ = java.util.Collections.emptyList();
+ }
+
+ @Override
+ @SuppressWarnings({"unused"})
+ protected Object newInstance(UnusedPrivateParameter unused) {
+ return new ReadResponse();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return Remote.internal_static_prometheus_ReadResponse_descriptor;
+ }
+
+ @Override
+ protected FieldAccessorTable internalGetFieldAccessorTable() {
+ return Remote.internal_static_prometheus_ReadResponse_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Remote.ReadResponse.class, Remote.ReadResponse.Builder.class);
+ }
+
+ public static final int RESULTS_FIELD_NUMBER = 1;
+
+ @SuppressWarnings("serial")
+ private java.util.List Protobuf type {@code prometheus.ReadResponse}
+ */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessageV3.Builder Protobuf type {@code prometheus.ChunkedReadResponse}
+ */
+ public static final class ChunkedReadResponse extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:prometheus.ChunkedReadResponse)
+ ChunkedReadResponseOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ // Use ChunkedReadResponse.newBuilder() to construct.
+ private ChunkedReadResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private ChunkedReadResponse() {
+ chunkedSeries_ = java.util.Collections.emptyList();
+ }
+
+ @Override
+ @SuppressWarnings({"unused"})
+ protected Object newInstance(UnusedPrivateParameter unused) {
+ return new ChunkedReadResponse();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return Remote.internal_static_prometheus_ChunkedReadResponse_descriptor;
+ }
+
+ @Override
+ protected FieldAccessorTable internalGetFieldAccessorTable() {
+ return Remote.internal_static_prometheus_ChunkedReadResponse_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Remote.ChunkedReadResponse.class,
+ Remote.ChunkedReadResponse.Builder.class);
+ }
+
+ public static final int CHUNKED_SERIES_FIELD_NUMBER = 1;
+
+ @SuppressWarnings("serial")
+ private java.util.List Protobuf type {@code prometheus.ChunkedReadResponse}
+ */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessageV3.Builder Protobuf type {@code prometheus.Histogram}
+ */
+ public static final class Histogram extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:prometheus.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() {
+ negativeSpans_ = java.util.Collections.emptyList();
+ negativeDeltas_ = emptyLongList();
+ negativeCounts_ = emptyDoubleList();
+ positiveSpans_ = java.util.Collections.emptyList();
+ positiveDeltas_ = emptyLongList();
+ positiveCounts_ = emptyDoubleList();
+ resetHint_ = 0;
+ }
+
+ @Override
+ @SuppressWarnings({"unused"})
+ protected Object newInstance(UnusedPrivateParameter unused) {
+ return new Histogram();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return Types.internal_static_prometheus_Histogram_descriptor;
+ }
+
+ @Override
+ protected FieldAccessorTable internalGetFieldAccessorTable() {
+ return Types.internal_static_prometheus_Histogram_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Types.Histogram.class, Types.Histogram.Builder.class);
+ }
+
+ /** Protobuf enum {@code prometheus.Histogram.ResetHint} */
+ public enum ResetHint implements com.google.protobuf.ProtocolMessageEnum {
+ /**
+ *
+ *
+ * Protobuf type {@code prometheus.Histogram}
+ */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessageV3.Builder Protobuf type {@code prometheus.BucketSpan}
+ */
+ public static final class BucketSpan extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:prometheus.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() {}
+
+ @Override
+ @SuppressWarnings({"unused"})
+ protected Object newInstance(UnusedPrivateParameter unused) {
+ return new BucketSpan();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return Types.internal_static_prometheus_BucketSpan_descriptor;
+ }
+
+ @Override
+ protected FieldAccessorTable internalGetFieldAccessorTable() {
+ return Types.internal_static_prometheus_BucketSpan_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Types.BucketSpan.class, Types.BucketSpan.Builder.class);
+ }
+
+ public static final int OFFSET_FIELD_NUMBER = 1;
+ private int offset_ = 0;
+
+ /**
+ *
+ *
+ * Protobuf type {@code prometheus.BucketSpan}
+ */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessageV3.Builder Protobuf type {@code prometheus.TimeSeries}
+ */
+ public static final class TimeSeries extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:prometheus.TimeSeries)
+ TimeSeriesOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ // Use TimeSeries.newBuilder() to construct.
+ private TimeSeries(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private TimeSeries() {
+ labels_ = java.util.Collections.emptyList();
+ samples_ = java.util.Collections.emptyList();
+ exemplars_ = java.util.Collections.emptyList();
+ histograms_ = java.util.Collections.emptyList();
+ }
+
+ @Override
+ @SuppressWarnings({"unused"})
+ protected Object newInstance(UnusedPrivateParameter unused) {
+ return new TimeSeries();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return Types.internal_static_prometheus_TimeSeries_descriptor;
+ }
+
+ @Override
+ protected FieldAccessorTable internalGetFieldAccessorTable() {
+ return Types.internal_static_prometheus_TimeSeries_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Types.TimeSeries.class, Types.TimeSeries.Builder.class);
+ }
+
+ public static final int LABELS_FIELD_NUMBER = 1;
+
+ @SuppressWarnings("serial")
+ private java.util.List Protobuf type {@code prometheus.TimeSeries}
+ */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessageV3.Builder values;
+}
diff --git a/seatunnel-connectors-v2/connector-prometheus/src/main/java/org/apache/seatunnel/connectors/seatunnel/prometheus/serialize/PrometheusSerializer.java b/seatunnel-connectors-v2/connector-prometheus/src/main/java/org/apache/seatunnel/connectors/seatunnel/prometheus/serialize/PrometheusSerializer.java
new file mode 100644
index 00000000000..7ce0dfc8dd1
--- /dev/null
+++ b/seatunnel-connectors-v2/connector-prometheus/src/main/java/org/apache/seatunnel/connectors/seatunnel/prometheus/serialize/PrometheusSerializer.java
@@ -0,0 +1,148 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.seatunnel.connectors.seatunnel.prometheus.serialize;
+
+import org.apache.seatunnel.api.table.type.SeaTunnelDataType;
+import org.apache.seatunnel.api.table.type.SeaTunnelRow;
+import org.apache.seatunnel.api.table.type.SeaTunnelRowType;
+import org.apache.seatunnel.common.exception.CommonErrorCodeDeprecated;
+import org.apache.seatunnel.connectors.seatunnel.prometheus.Exception.PrometheusConnectorException;
+import org.apache.seatunnel.connectors.seatunnel.prometheus.sink.Point;
+
+import com.google.common.base.Strings;
+import lombok.NonNull;
+import lombok.extern.slf4j.Slf4j;
+
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.function.Function;
+
+@Slf4j
+public class PrometheusSerializer implements Serializer {
+
+ private final Function
extend .google.protobuf.EnumOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.EnumOptions, Boolean>
+ goprotoEnumPrefix =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int GOPROTO_ENUM_STRINGER_FIELD_NUMBER = 62021;
+ /** extend .google.protobuf.EnumOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.EnumOptions, Boolean>
+ goprotoEnumStringer =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int ENUM_STRINGER_FIELD_NUMBER = 62022;
+ /** extend .google.protobuf.EnumOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.EnumOptions, Boolean>
+ enumStringer =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int ENUM_CUSTOMNAME_FIELD_NUMBER = 62023;
+ /** extend .google.protobuf.EnumOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.EnumOptions, String>
+ enumCustomname =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ String.class, null);
+
+ public static final int ENUMDECL_FIELD_NUMBER = 62024;
+ /** extend .google.protobuf.EnumOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.EnumOptions, Boolean>
+ enumdecl =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int ENUMVALUE_CUSTOMNAME_FIELD_NUMBER = 66001;
+ /** extend .google.protobuf.EnumValueOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.EnumValueOptions, String>
+ enumvalueCustomname =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ String.class, null);
+
+ public static final int GOPROTO_GETTERS_ALL_FIELD_NUMBER = 63001;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ goprotoGettersAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int GOPROTO_ENUM_PREFIX_ALL_FIELD_NUMBER = 63002;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ goprotoEnumPrefixAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int GOPROTO_STRINGER_ALL_FIELD_NUMBER = 63003;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ goprotoStringerAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int VERBOSE_EQUAL_ALL_FIELD_NUMBER = 63004;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ verboseEqualAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int FACE_ALL_FIELD_NUMBER = 63005;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ faceAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int GOSTRING_ALL_FIELD_NUMBER = 63006;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ gostringAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int POPULATE_ALL_FIELD_NUMBER = 63007;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ populateAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int STRINGER_ALL_FIELD_NUMBER = 63008;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ stringerAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int ONLYONE_ALL_FIELD_NUMBER = 63009;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ onlyoneAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int EQUAL_ALL_FIELD_NUMBER = 63013;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ equalAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int DESCRIPTION_ALL_FIELD_NUMBER = 63014;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ descriptionAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int TESTGEN_ALL_FIELD_NUMBER = 63015;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ testgenAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int BENCHGEN_ALL_FIELD_NUMBER = 63016;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ benchgenAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int MARSHALER_ALL_FIELD_NUMBER = 63017;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ marshalerAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int UNMARSHALER_ALL_FIELD_NUMBER = 63018;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ unmarshalerAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int STABLE_MARSHALER_ALL_FIELD_NUMBER = 63019;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ stableMarshalerAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int SIZER_ALL_FIELD_NUMBER = 63020;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ sizerAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int GOPROTO_ENUM_STRINGER_ALL_FIELD_NUMBER = 63021;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ goprotoEnumStringerAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int ENUM_STRINGER_ALL_FIELD_NUMBER = 63022;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ enumStringerAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int UNSAFE_MARSHALER_ALL_FIELD_NUMBER = 63023;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ unsafeMarshalerAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int UNSAFE_UNMARSHALER_ALL_FIELD_NUMBER = 63024;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ unsafeUnmarshalerAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int GOPROTO_EXTENSIONS_MAP_ALL_FIELD_NUMBER = 63025;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ goprotoExtensionsMapAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int GOPROTO_UNRECOGNIZED_ALL_FIELD_NUMBER = 63026;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ goprotoUnrecognizedAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int GOGOPROTO_IMPORT_FIELD_NUMBER = 63027;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ gogoprotoImport =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int PROTOSIZER_ALL_FIELD_NUMBER = 63028;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ protosizerAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int COMPARE_ALL_FIELD_NUMBER = 63029;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ compareAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int TYPEDECL_ALL_FIELD_NUMBER = 63030;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ typedeclAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int ENUMDECL_ALL_FIELD_NUMBER = 63031;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ enumdeclAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int GOPROTO_REGISTRATION_FIELD_NUMBER = 63032;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ goprotoRegistration =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int MESSAGENAME_ALL_FIELD_NUMBER = 63033;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ messagenameAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int GOPROTO_SIZECACHE_ALL_FIELD_NUMBER = 63034;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ goprotoSizecacheAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int GOPROTO_UNKEYED_ALL_FIELD_NUMBER = 63035;
+ /** extend .google.protobuf.FileOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FileOptions, Boolean>
+ goprotoUnkeyedAll =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int GOPROTO_GETTERS_FIELD_NUMBER = 64001;
+ /** extend .google.protobuf.MessageOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.MessageOptions, Boolean>
+ goprotoGetters =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int GOPROTO_STRINGER_FIELD_NUMBER = 64003;
+ /** extend .google.protobuf.MessageOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.MessageOptions, Boolean>
+ goprotoStringer =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int VERBOSE_EQUAL_FIELD_NUMBER = 64004;
+ /** extend .google.protobuf.MessageOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.MessageOptions, Boolean>
+ verboseEqual =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int FACE_FIELD_NUMBER = 64005;
+ /** extend .google.protobuf.MessageOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.MessageOptions, Boolean>
+ face =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int GOSTRING_FIELD_NUMBER = 64006;
+ /** extend .google.protobuf.MessageOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.MessageOptions, Boolean>
+ gostring =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int POPULATE_FIELD_NUMBER = 64007;
+ /** extend .google.protobuf.MessageOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.MessageOptions, Boolean>
+ populate =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int STRINGER_FIELD_NUMBER = 67008;
+ /** extend .google.protobuf.MessageOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.MessageOptions, Boolean>
+ stringer =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int ONLYONE_FIELD_NUMBER = 64009;
+ /** extend .google.protobuf.MessageOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.MessageOptions, Boolean>
+ onlyone =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int EQUAL_FIELD_NUMBER = 64013;
+ /** extend .google.protobuf.MessageOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.MessageOptions, Boolean>
+ equal =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int DESCRIPTION_FIELD_NUMBER = 64014;
+ /** extend .google.protobuf.MessageOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.MessageOptions, Boolean>
+ description =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int TESTGEN_FIELD_NUMBER = 64015;
+ /** extend .google.protobuf.MessageOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.MessageOptions, Boolean>
+ testgen =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int BENCHGEN_FIELD_NUMBER = 64016;
+ /** extend .google.protobuf.MessageOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.MessageOptions, Boolean>
+ benchgen =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int MARSHALER_FIELD_NUMBER = 64017;
+ /** extend .google.protobuf.MessageOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.MessageOptions, Boolean>
+ marshaler =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int UNMARSHALER_FIELD_NUMBER = 64018;
+ /** extend .google.protobuf.MessageOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.MessageOptions, Boolean>
+ unmarshaler =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int STABLE_MARSHALER_FIELD_NUMBER = 64019;
+ /** extend .google.protobuf.MessageOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.MessageOptions, Boolean>
+ stableMarshaler =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int SIZER_FIELD_NUMBER = 64020;
+ /** extend .google.protobuf.MessageOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.MessageOptions, Boolean>
+ sizer =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int UNSAFE_MARSHALER_FIELD_NUMBER = 64023;
+ /** extend .google.protobuf.MessageOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.MessageOptions, Boolean>
+ unsafeMarshaler =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int UNSAFE_UNMARSHALER_FIELD_NUMBER = 64024;
+ /** extend .google.protobuf.MessageOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.MessageOptions, Boolean>
+ unsafeUnmarshaler =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int GOPROTO_EXTENSIONS_MAP_FIELD_NUMBER = 64025;
+ /** extend .google.protobuf.MessageOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.MessageOptions, Boolean>
+ goprotoExtensionsMap =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int GOPROTO_UNRECOGNIZED_FIELD_NUMBER = 64026;
+ /** extend .google.protobuf.MessageOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.MessageOptions, Boolean>
+ goprotoUnrecognized =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int PROTOSIZER_FIELD_NUMBER = 64028;
+ /** extend .google.protobuf.MessageOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.MessageOptions, Boolean>
+ protosizer =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int COMPARE_FIELD_NUMBER = 64029;
+ /** extend .google.protobuf.MessageOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.MessageOptions, Boolean>
+ compare =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int TYPEDECL_FIELD_NUMBER = 64030;
+ /** extend .google.protobuf.MessageOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.MessageOptions, Boolean>
+ typedecl =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int MESSAGENAME_FIELD_NUMBER = 64033;
+ /** extend .google.protobuf.MessageOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.MessageOptions, Boolean>
+ messagename =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int GOPROTO_SIZECACHE_FIELD_NUMBER = 64034;
+ /** extend .google.protobuf.MessageOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.MessageOptions, Boolean>
+ goprotoSizecache =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int GOPROTO_UNKEYED_FIELD_NUMBER = 64035;
+ /** extend .google.protobuf.MessageOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.MessageOptions, Boolean>
+ goprotoUnkeyed =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int NULLABLE_FIELD_NUMBER = 65001;
+ /** extend .google.protobuf.FieldOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FieldOptions, Boolean>
+ nullable =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int EMBED_FIELD_NUMBER = 65002;
+ /** extend .google.protobuf.FieldOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FieldOptions, Boolean>
+ embed =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int CUSTOMTYPE_FIELD_NUMBER = 65003;
+ /** extend .google.protobuf.FieldOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FieldOptions, String>
+ customtype =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ String.class, null);
+
+ public static final int CUSTOMNAME_FIELD_NUMBER = 65004;
+ /** extend .google.protobuf.FieldOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FieldOptions, String>
+ customname =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ String.class, null);
+
+ public static final int JSONTAG_FIELD_NUMBER = 65005;
+ /** extend .google.protobuf.FieldOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FieldOptions, String>
+ jsontag =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ String.class, null);
+
+ public static final int MORETAGS_FIELD_NUMBER = 65006;
+ /** extend .google.protobuf.FieldOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FieldOptions, String>
+ moretags =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ String.class, null);
+
+ public static final int CASTTYPE_FIELD_NUMBER = 65007;
+ /** extend .google.protobuf.FieldOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FieldOptions, String>
+ casttype =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ String.class, null);
+
+ public static final int CASTKEY_FIELD_NUMBER = 65008;
+ /** extend .google.protobuf.FieldOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FieldOptions, String>
+ castkey =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ String.class, null);
+
+ public static final int CASTVALUE_FIELD_NUMBER = 65009;
+ /** extend .google.protobuf.FieldOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FieldOptions, String>
+ castvalue =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ String.class, null);
+
+ public static final int STDTIME_FIELD_NUMBER = 65010;
+ /** extend .google.protobuf.FieldOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FieldOptions, Boolean>
+ stdtime =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int STDDURATION_FIELD_NUMBER = 65011;
+ /** extend .google.protobuf.FieldOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FieldOptions, Boolean>
+ stdduration =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static final int WKTPOINTER_FIELD_NUMBER = 65012;
+ /** extend .google.protobuf.FieldOptions { ... } */
+ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FieldOptions, Boolean>
+ wktpointer =
+ com.google.protobuf.GeneratedMessage.newFileScopedGeneratedExtension(
+ Boolean.class, null);
+
+ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
+ return descriptor;
+ }
+
+ private static com.google.protobuf.Descriptors.FileDescriptor descriptor;
+
+ static {
+ String[] descriptorData = {
+ "\n\ngogo.proto\022\tgogoproto\032 google/protobuf"
+ + "/descriptor.proto:;\n\023goproto_enum_prefix"
+ + "\022\034.google.protobuf.EnumOptions\030\261\344\003 \001(\010:="
+ + "\n\025goproto_enum_stringer\022\034.google.protobu"
+ + "f.EnumOptions\030\305\344\003 \001(\010:5\n\renum_stringer\022\034"
+ + ".google.protobuf.EnumOptions\030\306\344\003 \001(\010:7\n\017"
+ + "enum_customname\022\034.google.protobuf.EnumOp"
+ + "tions\030\307\344\003 \001(\t:0\n\010enumdecl\022\034.google.proto"
+ + "buf.EnumOptions\030\310\344\003 \001(\010:A\n\024enumvalue_cus"
+ + "tomname\022!.google.protobuf.EnumValueOptio"
+ + "ns\030\321\203\004 \001(\t:;\n\023goproto_getters_all\022\034.goog"
+ + "le.protobuf.FileOptions\030\231\354\003 \001(\010:?\n\027gopro"
+ + "to_enum_prefix_all\022\034.google.protobuf.Fil"
+ + "eOptions\030\232\354\003 \001(\010:<\n\024goproto_stringer_all"
+ + "\022\034.google.protobuf.FileOptions\030\233\354\003 \001(\010:9"
+ + "\n\021verbose_equal_all\022\034.google.protobuf.Fi"
+ + "leOptions\030\234\354\003 \001(\010:0\n\010face_all\022\034.google.p"
+ + "rotobuf.FileOptions\030\235\354\003 \001(\010:4\n\014gostring_"
+ + "all\022\034.google.protobuf.FileOptions\030\236\354\003 \001("
+ + "\010:4\n\014populate_all\022\034.google.protobuf.File"
+ + "Options\030\237\354\003 \001(\010:4\n\014stringer_all\022\034.google"
+ + ".protobuf.FileOptions\030\240\354\003 \001(\010:3\n\013onlyone"
+ + "_all\022\034.google.protobuf.FileOptions\030\241\354\003 \001"
+ + "(\010:1\n\tequal_all\022\034.google.protobuf.FileOp"
+ + "tions\030\245\354\003 \001(\010:7\n\017description_all\022\034.googl"
+ + "e.protobuf.FileOptions\030\246\354\003 \001(\010:3\n\013testge"
+ + "n_all\022\034.google.protobuf.FileOptions\030\247\354\003 "
+ + "\001(\010:4\n\014benchgen_all\022\034.google.protobuf.Fi"
+ + "leOptions\030\250\354\003 \001(\010:5\n\rmarshaler_all\022\034.goo"
+ + "gle.protobuf.FileOptions\030\251\354\003 \001(\010:7\n\017unma"
+ + "rshaler_all\022\034.google.protobuf.FileOption"
+ + "s\030\252\354\003 \001(\010:<\n\024stable_marshaler_all\022\034.goog"
+ + "le.protobuf.FileOptions\030\253\354\003 \001(\010:1\n\tsizer"
+ + "_all\022\034.google.protobuf.FileOptions\030\254\354\003 \001"
+ + "(\010:A\n\031goproto_enum_stringer_all\022\034.google"
+ + ".protobuf.FileOptions\030\255\354\003 \001(\010:9\n\021enum_st"
+ + "ringer_all\022\034.google.protobuf.FileOptions"
+ + "\030\256\354\003 \001(\010:<\n\024unsafe_marshaler_all\022\034.googl"
+ + "e.protobuf.FileOptions\030\257\354\003 \001(\010:>\n\026unsafe"
+ + "_unmarshaler_all\022\034.google.protobuf.FileO"
+ + "ptions\030\260\354\003 \001(\010:B\n\032goproto_extensions_map"
+ + "_all\022\034.google.protobuf.FileOptions\030\261\354\003 \001"
+ + "(\010:@\n\030goproto_unrecognized_all\022\034.google."
+ + "protobuf.FileOptions\030\262\354\003 \001(\010:8\n\020gogoprot"
+ + "o_import\022\034.google.protobuf.FileOptions\030\263"
+ + "\354\003 \001(\010:6\n\016protosizer_all\022\034.google.protob"
+ + "uf.FileOptions\030\264\354\003 \001(\010:3\n\013compare_all\022\034."
+ + "google.protobuf.FileOptions\030\265\354\003 \001(\010:4\n\014t"
+ + "ypedecl_all\022\034.google.protobuf.FileOption"
+ + "s\030\266\354\003 \001(\010:4\n\014enumdecl_all\022\034.google.proto"
+ + "buf.FileOptions\030\267\354\003 \001(\010:<\n\024goproto_regis"
+ + "tration\022\034.google.protobuf.FileOptions\030\270\354"
+ + "\003 \001(\010:7\n\017messagename_all\022\034.google.protob"
+ + "uf.FileOptions\030\271\354\003 \001(\010:=\n\025goproto_sizeca"
+ + "che_all\022\034.google.protobuf.FileOptions\030\272\354"
+ + "\003 \001(\010:;\n\023goproto_unkeyed_all\022\034.google.pr"
+ + "otobuf.FileOptions\030\273\354\003 \001(\010::\n\017goproto_ge"
+ + "tters\022\037.google.protobuf.MessageOptions\030\201"
+ + "\364\003 \001(\010:;\n\020goproto_stringer\022\037.google.prot"
+ + "obuf.MessageOptions\030\203\364\003 \001(\010:8\n\rverbose_e"
+ + "qual\022\037.google.protobuf.MessageOptions\030\204\364"
+ + "\003 \001(\010:/\n\004face\022\037.google.protobuf.MessageO"
+ + "ptions\030\205\364\003 \001(\010:3\n\010gostring\022\037.google.prot"
+ + "obuf.MessageOptions\030\206\364\003 \001(\010:3\n\010populate\022"
+ + "\037.google.protobuf.MessageOptions\030\207\364\003 \001(\010"
+ + ":3\n\010stringer\022\037.google.protobuf.MessageOp"
+ + "tions\030\300\213\004 \001(\010:2\n\007onlyone\022\037.google.protob"
+ + "uf.MessageOptions\030\211\364\003 \001(\010:0\n\005equal\022\037.goo"
+ + "gle.protobuf.MessageOptions\030\215\364\003 \001(\010:6\n\013d"
+ + "escription\022\037.google.protobuf.MessageOpti"
+ + "ons\030\216\364\003 \001(\010:2\n\007testgen\022\037.google.protobuf"
+ + ".MessageOptions\030\217\364\003 \001(\010:3\n\010benchgen\022\037.go"
+ + "ogle.protobuf.MessageOptions\030\220\364\003 \001(\010:4\n\t"
+ + "marshaler\022\037.google.protobuf.MessageOptio"
+ + "ns\030\221\364\003 \001(\010:6\n\013unmarshaler\022\037.google.proto"
+ + "buf.MessageOptions\030\222\364\003 \001(\010:;\n\020stable_mar"
+ + "shaler\022\037.google.protobuf.MessageOptions\030"
+ + "\223\364\003 \001(\010:0\n\005sizer\022\037.google.protobuf.Messa"
+ + "geOptions\030\224\364\003 \001(\010:;\n\020unsafe_marshaler\022\037."
+ + "google.protobuf.MessageOptions\030\227\364\003 \001(\010:="
+ + "\n\022unsafe_unmarshaler\022\037.google.protobuf.M"
+ + "essageOptions\030\230\364\003 \001(\010:A\n\026goproto_extensi"
+ + "ons_map\022\037.google.protobuf.MessageOptions"
+ + "\030\231\364\003 \001(\010:?\n\024goproto_unrecognized\022\037.googl"
+ + "e.protobuf.MessageOptions\030\232\364\003 \001(\010:5\n\npro"
+ + "tosizer\022\037.google.protobuf.MessageOptions"
+ + "\030\234\364\003 \001(\010:2\n\007compare\022\037.google.protobuf.Me"
+ + "ssageOptions\030\235\364\003 \001(\010:3\n\010typedecl\022\037.googl"
+ + "e.protobuf.MessageOptions\030\236\364\003 \001(\010:6\n\013mes"
+ + "sagename\022\037.google.protobuf.MessageOption"
+ + "s\030\241\364\003 \001(\010:<\n\021goproto_sizecache\022\037.google."
+ + "protobuf.MessageOptions\030\242\364\003 \001(\010::\n\017gopro"
+ + "to_unkeyed\022\037.google.protobuf.MessageOpti"
+ + "ons\030\243\364\003 \001(\010:1\n\010nullable\022\035.google.protobu"
+ + "f.FieldOptions\030\351\373\003 \001(\010:.\n\005embed\022\035.google"
+ + ".protobuf.FieldOptions\030\352\373\003 \001(\010:3\n\ncustom"
+ + "type\022\035.google.protobuf.FieldOptions\030\353\373\003 "
+ + "\001(\t:3\n\ncustomname\022\035.google.protobuf.Fiel"
+ + "dOptions\030\354\373\003 \001(\t:0\n\007jsontag\022\035.google.pro"
+ + "tobuf.FieldOptions\030\355\373\003 \001(\t:1\n\010moretags\022\035"
+ + ".google.protobuf.FieldOptions\030\356\373\003 \001(\t:1\n"
+ + "\010casttype\022\035.google.protobuf.FieldOptions"
+ + "\030\357\373\003 \001(\t:0\n\007castkey\022\035.google.protobuf.Fi"
+ + "eldOptions\030\360\373\003 \001(\t:2\n\tcastvalue\022\035.google"
+ + ".protobuf.FieldOptions\030\361\373\003 \001(\t:0\n\007stdtim"
+ + "e\022\035.google.protobuf.FieldOptions\030\362\373\003 \001(\010"
+ + ":4\n\013stdduration\022\035.google.protobuf.FieldO"
+ + "ptions\030\363\373\003 \001(\010:3\n\nwktpointer\022\035.google.pr"
+ + "otobuf.FieldOptions\030\364\373\003 \001(\010BE\n\023com.googl"
+ + "e.protobufB\nGoGoProtosZ\"github.com/gogo/"
+ + "protobuf/gogoproto"
+ };
+ descriptor =
+ com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
+ descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ com.google.protobuf.DescriptorProtos.getDescriptor(),
+ });
+ goprotoEnumPrefix.internalInit(descriptor.getExtensions().get(0));
+ goprotoEnumStringer.internalInit(descriptor.getExtensions().get(1));
+ enumStringer.internalInit(descriptor.getExtensions().get(2));
+ enumCustomname.internalInit(descriptor.getExtensions().get(3));
+ enumdecl.internalInit(descriptor.getExtensions().get(4));
+ enumvalueCustomname.internalInit(descriptor.getExtensions().get(5));
+ goprotoGettersAll.internalInit(descriptor.getExtensions().get(6));
+ goprotoEnumPrefixAll.internalInit(descriptor.getExtensions().get(7));
+ goprotoStringerAll.internalInit(descriptor.getExtensions().get(8));
+ verboseEqualAll.internalInit(descriptor.getExtensions().get(9));
+ faceAll.internalInit(descriptor.getExtensions().get(10));
+ gostringAll.internalInit(descriptor.getExtensions().get(11));
+ populateAll.internalInit(descriptor.getExtensions().get(12));
+ stringerAll.internalInit(descriptor.getExtensions().get(13));
+ onlyoneAll.internalInit(descriptor.getExtensions().get(14));
+ equalAll.internalInit(descriptor.getExtensions().get(15));
+ descriptionAll.internalInit(descriptor.getExtensions().get(16));
+ testgenAll.internalInit(descriptor.getExtensions().get(17));
+ benchgenAll.internalInit(descriptor.getExtensions().get(18));
+ marshalerAll.internalInit(descriptor.getExtensions().get(19));
+ unmarshalerAll.internalInit(descriptor.getExtensions().get(20));
+ stableMarshalerAll.internalInit(descriptor.getExtensions().get(21));
+ sizerAll.internalInit(descriptor.getExtensions().get(22));
+ goprotoEnumStringerAll.internalInit(descriptor.getExtensions().get(23));
+ enumStringerAll.internalInit(descriptor.getExtensions().get(24));
+ unsafeMarshalerAll.internalInit(descriptor.getExtensions().get(25));
+ unsafeUnmarshalerAll.internalInit(descriptor.getExtensions().get(26));
+ goprotoExtensionsMapAll.internalInit(descriptor.getExtensions().get(27));
+ goprotoUnrecognizedAll.internalInit(descriptor.getExtensions().get(28));
+ gogoprotoImport.internalInit(descriptor.getExtensions().get(29));
+ protosizerAll.internalInit(descriptor.getExtensions().get(30));
+ compareAll.internalInit(descriptor.getExtensions().get(31));
+ typedeclAll.internalInit(descriptor.getExtensions().get(32));
+ enumdeclAll.internalInit(descriptor.getExtensions().get(33));
+ goprotoRegistration.internalInit(descriptor.getExtensions().get(34));
+ messagenameAll.internalInit(descriptor.getExtensions().get(35));
+ goprotoSizecacheAll.internalInit(descriptor.getExtensions().get(36));
+ goprotoUnkeyedAll.internalInit(descriptor.getExtensions().get(37));
+ goprotoGetters.internalInit(descriptor.getExtensions().get(38));
+ goprotoStringer.internalInit(descriptor.getExtensions().get(39));
+ verboseEqual.internalInit(descriptor.getExtensions().get(40));
+ face.internalInit(descriptor.getExtensions().get(41));
+ gostring.internalInit(descriptor.getExtensions().get(42));
+ populate.internalInit(descriptor.getExtensions().get(43));
+ stringer.internalInit(descriptor.getExtensions().get(44));
+ onlyone.internalInit(descriptor.getExtensions().get(45));
+ equal.internalInit(descriptor.getExtensions().get(46));
+ description.internalInit(descriptor.getExtensions().get(47));
+ testgen.internalInit(descriptor.getExtensions().get(48));
+ benchgen.internalInit(descriptor.getExtensions().get(49));
+ marshaler.internalInit(descriptor.getExtensions().get(50));
+ unmarshaler.internalInit(descriptor.getExtensions().get(51));
+ stableMarshaler.internalInit(descriptor.getExtensions().get(52));
+ sizer.internalInit(descriptor.getExtensions().get(53));
+ unsafeMarshaler.internalInit(descriptor.getExtensions().get(54));
+ unsafeUnmarshaler.internalInit(descriptor.getExtensions().get(55));
+ goprotoExtensionsMap.internalInit(descriptor.getExtensions().get(56));
+ goprotoUnrecognized.internalInit(descriptor.getExtensions().get(57));
+ protosizer.internalInit(descriptor.getExtensions().get(58));
+ compare.internalInit(descriptor.getExtensions().get(59));
+ typedecl.internalInit(descriptor.getExtensions().get(60));
+ messagename.internalInit(descriptor.getExtensions().get(61));
+ goprotoSizecache.internalInit(descriptor.getExtensions().get(62));
+ goprotoUnkeyed.internalInit(descriptor.getExtensions().get(63));
+ nullable.internalInit(descriptor.getExtensions().get(64));
+ embed.internalInit(descriptor.getExtensions().get(65));
+ customtype.internalInit(descriptor.getExtensions().get(66));
+ customname.internalInit(descriptor.getExtensions().get(67));
+ jsontag.internalInit(descriptor.getExtensions().get(68));
+ moretags.internalInit(descriptor.getExtensions().get(69));
+ casttype.internalInit(descriptor.getExtensions().get(70));
+ castkey.internalInit(descriptor.getExtensions().get(71));
+ castvalue.internalInit(descriptor.getExtensions().get(72));
+ stdtime.internalInit(descriptor.getExtensions().get(73));
+ stdduration.internalInit(descriptor.getExtensions().get(74));
+ wktpointer.internalInit(descriptor.getExtensions().get(75));
+ com.google.protobuf.DescriptorProtos.getDescriptor();
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/seatunnel-connectors-v2/connector-prometheus/src/main/java/org/apache/seatunnel/connectors/seatunnel/prometheus/sink/proto/Remote.java b/seatunnel-connectors-v2/connector-prometheus/src/main/java/org/apache/seatunnel/connectors/seatunnel/prometheus/sink/proto/Remote.java
new file mode 100644
index 00000000000..17a67d4446b
--- /dev/null
+++ b/seatunnel-connectors-v2/connector-prometheus/src/main/java/org/apache/seatunnel/connectors/seatunnel/prometheus/sink/proto/Remote.java
@@ -0,0 +1,6998 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.seatunnel.connectors.seatunnel.prometheus.sink.proto;
+
+public final class Remote {
+ private Remote() {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {}
+
+ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry);
+ }
+
+ public interface WriteRequestOrBuilder
+ extends
+ // @@protoc_insertion_point(interface_extends:prometheus.WriteRequest)
+ com.google.protobuf.MessageOrBuilder {
+
+ /**
+ * repeated .prometheus.TimeSeries timeseries = 1 [(.gogoproto.nullable) = false];
+ *
+ */
+ java.util.Listrepeated .prometheus.TimeSeries timeseries = 1 [(.gogoproto.nullable) = false];
+ *
+ */
+ Types.TimeSeries getTimeseries(int index);
+
+ /**
+ * repeated .prometheus.TimeSeries timeseries = 1 [(.gogoproto.nullable) = false];
+ *
+ */
+ int getTimeseriesCount();
+
+ /**
+ * repeated .prometheus.TimeSeries timeseries = 1 [(.gogoproto.nullable) = false];
+ *
+ */
+ java.util.List extends Types.TimeSeriesOrBuilder> getTimeseriesOrBuilderList();
+
+ /**
+ * repeated .prometheus.TimeSeries timeseries = 1 [(.gogoproto.nullable) = false];
+ *
+ */
+ Types.TimeSeriesOrBuilder getTimeseriesOrBuilder(int index);
+
+ /**
+ * repeated .prometheus.MetricMetadata metadata = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ java.util.Listrepeated .prometheus.MetricMetadata metadata = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ Types.MetricMetadata getMetadata(int index);
+
+ /**
+ * repeated .prometheus.MetricMetadata metadata = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ int getMetadataCount();
+
+ /**
+ * repeated .prometheus.MetricMetadata metadata = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ java.util.List extends Types.MetricMetadataOrBuilder> getMetadataOrBuilderList();
+
+ /**
+ * repeated .prometheus.MetricMetadata metadata = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ Types.MetricMetadataOrBuilder getMetadataOrBuilder(int index);
+ }
+
+ /** Protobuf type {@code prometheus.WriteRequest} */
+ public static final class WriteRequest extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:prometheus.WriteRequest)
+ WriteRequestOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ // Use WriteRequest.newBuilder() to construct.
+ private WriteRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private WriteRequest() {
+ timeseries_ = java.util.Collections.emptyList();
+ metadata_ = java.util.Collections.emptyList();
+ }
+
+ @Override
+ @SuppressWarnings({"unused"})
+ protected Object newInstance(UnusedPrivateParameter unused) {
+ return new WriteRequest();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return Remote.internal_static_prometheus_WriteRequest_descriptor;
+ }
+
+ @Override
+ protected FieldAccessorTable internalGetFieldAccessorTable() {
+ return Remote.internal_static_prometheus_WriteRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Remote.WriteRequest.class, Remote.WriteRequest.Builder.class);
+ }
+
+ public static final int TIMESERIES_FIELD_NUMBER = 1;
+
+ @SuppressWarnings("serial")
+ private java.util.Listrepeated .prometheus.TimeSeries timeseries = 1 [(.gogoproto.nullable) = false];
+ *
+ */
+ @Override
+ public java.util.Listrepeated .prometheus.TimeSeries timeseries = 1 [(.gogoproto.nullable) = false];
+ *
+ */
+ @Override
+ public java.util.List extends Types.TimeSeriesOrBuilder> getTimeseriesOrBuilderList() {
+ return timeseries_;
+ }
+
+ /**
+ * repeated .prometheus.TimeSeries timeseries = 1 [(.gogoproto.nullable) = false];
+ *
+ */
+ @Override
+ public int getTimeseriesCount() {
+ return timeseries_.size();
+ }
+
+ /**
+ * repeated .prometheus.TimeSeries timeseries = 1 [(.gogoproto.nullable) = false];
+ *
+ */
+ @Override
+ public Types.TimeSeries getTimeseries(int index) {
+ return timeseries_.get(index);
+ }
+
+ /**
+ * repeated .prometheus.TimeSeries timeseries = 1 [(.gogoproto.nullable) = false];
+ *
+ */
+ @Override
+ public Types.TimeSeriesOrBuilder getTimeseriesOrBuilder(int index) {
+ return timeseries_.get(index);
+ }
+
+ public static final int METADATA_FIELD_NUMBER = 3;
+
+ @SuppressWarnings("serial")
+ private java.util.Listrepeated .prometheus.MetricMetadata metadata = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ @Override
+ public java.util.Listrepeated .prometheus.MetricMetadata metadata = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ @Override
+ public java.util.List extends Types.MetricMetadataOrBuilder> getMetadataOrBuilderList() {
+ return metadata_;
+ }
+
+ /**
+ * repeated .prometheus.MetricMetadata metadata = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ @Override
+ public int getMetadataCount() {
+ return metadata_.size();
+ }
+
+ /**
+ * repeated .prometheus.MetricMetadata metadata = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ @Override
+ public Types.MetricMetadata getMetadata(int index) {
+ return metadata_.get(index);
+ }
+
+ /**
+ * repeated .prometheus.MetricMetadata metadata = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ @Override
+ public Types.MetricMetadataOrBuilder getMetadataOrBuilder(int index) {
+ return metadata_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) {
+ return true;
+ }
+ if (isInitialized == 0) {
+ return false;
+ }
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ for (int i = 0; i < timeseries_.size(); i++) {
+ output.writeMessage(1, timeseries_.get(i));
+ }
+ for (int i = 0; i < metadata_.size(); i++) {
+ output.writeMessage(3, metadata_.get(i));
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) {
+ return size;
+ }
+
+ size = 0;
+ for (int i = 0; i < timeseries_.size(); i++) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 1, timeseries_.get(i));
+ }
+ for (int i = 0; i < metadata_.size(); i++) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 3, metadata_.get(i));
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof Remote.WriteRequest)) {
+ return super.equals(obj);
+ }
+ Remote.WriteRequest other = (Remote.WriteRequest) obj;
+
+ if (!getTimeseriesList().equals(other.getTimeseriesList())) {
+ return false;
+ }
+ if (!getMetadataList().equals(other.getMetadataList())) {
+ return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getTimeseriesCount() > 0) {
+ hash = (37 * hash) + TIMESERIES_FIELD_NUMBER;
+ hash = (53 * hash) + getTimeseriesList().hashCode();
+ }
+ if (getMetadataCount() > 0) {
+ hash = (37 * hash) + METADATA_FIELD_NUMBER;
+ hash = (53 * hash) + getMetadataList().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static Remote.WriteRequest parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Remote.WriteRequest parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Remote.WriteRequest parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Remote.WriteRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Remote.WriteRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Remote.WriteRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Remote.WriteRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static Remote.WriteRequest 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 Remote.WriteRequest parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input);
+ }
+
+ public static Remote.WriteRequest 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 Remote.WriteRequest parseFrom(com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static Remote.WriteRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(Remote.WriteRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /** Protobuf type {@code prometheus.WriteRequest} */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessageV3.Builderrepeated .prometheus.TimeSeries timeseries = 1 [(.gogoproto.nullable) = false];
+ *
+ */
+ public java.util.Listrepeated .prometheus.TimeSeries timeseries = 1 [(.gogoproto.nullable) = false];
+ *
+ */
+ public int getTimeseriesCount() {
+ if (timeseriesBuilder_ == null) {
+ return timeseries_.size();
+ } else {
+ return timeseriesBuilder_.getCount();
+ }
+ }
+
+ /**
+ * repeated .prometheus.TimeSeries timeseries = 1 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.TimeSeries getTimeseries(int index) {
+ if (timeseriesBuilder_ == null) {
+ return timeseries_.get(index);
+ } else {
+ return timeseriesBuilder_.getMessage(index);
+ }
+ }
+
+ /**
+ * repeated .prometheus.TimeSeries timeseries = 1 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder setTimeseries(int index, Types.TimeSeries value) {
+ if (timeseriesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureTimeseriesIsMutable();
+ timeseries_.set(index, value);
+ onChanged();
+ } else {
+ timeseriesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.TimeSeries timeseries = 1 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder setTimeseries(int index, Types.TimeSeries.Builder builderForValue) {
+ if (timeseriesBuilder_ == null) {
+ ensureTimeseriesIsMutable();
+ timeseries_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ timeseriesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.TimeSeries timeseries = 1 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addTimeseries(Types.TimeSeries value) {
+ if (timeseriesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureTimeseriesIsMutable();
+ timeseries_.add(value);
+ onChanged();
+ } else {
+ timeseriesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.TimeSeries timeseries = 1 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addTimeseries(int index, Types.TimeSeries value) {
+ if (timeseriesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureTimeseriesIsMutable();
+ timeseries_.add(index, value);
+ onChanged();
+ } else {
+ timeseriesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.TimeSeries timeseries = 1 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addTimeseries(Types.TimeSeries.Builder builderForValue) {
+ if (timeseriesBuilder_ == null) {
+ ensureTimeseriesIsMutable();
+ timeseries_.add(builderForValue.build());
+ onChanged();
+ } else {
+ timeseriesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.TimeSeries timeseries = 1 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addTimeseries(int index, Types.TimeSeries.Builder builderForValue) {
+ if (timeseriesBuilder_ == null) {
+ ensureTimeseriesIsMutable();
+ timeseries_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ timeseriesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.TimeSeries timeseries = 1 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addAllTimeseries(Iterable extends Types.TimeSeries> values) {
+ if (timeseriesBuilder_ == null) {
+ ensureTimeseriesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, timeseries_);
+ onChanged();
+ } else {
+ timeseriesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.TimeSeries timeseries = 1 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder clearTimeseries() {
+ if (timeseriesBuilder_ == null) {
+ timeseries_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ timeseriesBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.TimeSeries timeseries = 1 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder removeTimeseries(int index) {
+ if (timeseriesBuilder_ == null) {
+ ensureTimeseriesIsMutable();
+ timeseries_.remove(index);
+ onChanged();
+ } else {
+ timeseriesBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.TimeSeries timeseries = 1 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.TimeSeries.Builder getTimeseriesBuilder(int index) {
+ return getTimeseriesFieldBuilder().getBuilder(index);
+ }
+
+ /**
+ * repeated .prometheus.TimeSeries timeseries = 1 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.TimeSeriesOrBuilder getTimeseriesOrBuilder(int index) {
+ if (timeseriesBuilder_ == null) {
+ return timeseries_.get(index);
+ } else {
+ return timeseriesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /**
+ * repeated .prometheus.TimeSeries timeseries = 1 [(.gogoproto.nullable) = false];
+ *
+ */
+ public java.util.List extends Types.TimeSeriesOrBuilder>
+ getTimeseriesOrBuilderList() {
+ if (timeseriesBuilder_ != null) {
+ return timeseriesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(timeseries_);
+ }
+ }
+
+ /**
+ * repeated .prometheus.TimeSeries timeseries = 1 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.TimeSeries.Builder addTimeseriesBuilder() {
+ return getTimeseriesFieldBuilder()
+ .addBuilder(Types.TimeSeries.getDefaultInstance());
+ }
+
+ /**
+ * repeated .prometheus.TimeSeries timeseries = 1 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.TimeSeries.Builder addTimeseriesBuilder(int index) {
+ return getTimeseriesFieldBuilder()
+ .addBuilder(index, Types.TimeSeries.getDefaultInstance());
+ }
+
+ /**
+ * repeated .prometheus.TimeSeries timeseries = 1 [(.gogoproto.nullable) = false];
+ *
+ */
+ public java.util.List
+ * repeated .prometheus.MetricMetadata metadata = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public java.util.List
+ * repeated .prometheus.MetricMetadata metadata = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public int getMetadataCount() {
+ if (metadataBuilder_ == null) {
+ return metadata_.size();
+ } else {
+ return metadataBuilder_.getCount();
+ }
+ }
+
+ /**
+ *
+ * repeated .prometheus.MetricMetadata metadata = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.MetricMetadata getMetadata(int index) {
+ if (metadataBuilder_ == null) {
+ return metadata_.get(index);
+ } else {
+ return metadataBuilder_.getMessage(index);
+ }
+ }
+
+ /**
+ *
+ * repeated .prometheus.MetricMetadata metadata = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder setMetadata(int index, Types.MetricMetadata value) {
+ if (metadataBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMetadataIsMutable();
+ metadata_.set(index, value);
+ onChanged();
+ } else {
+ metadataBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ * repeated .prometheus.MetricMetadata metadata = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder setMetadata(int index, Types.MetricMetadata.Builder builderForValue) {
+ if (metadataBuilder_ == null) {
+ ensureMetadataIsMutable();
+ metadata_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ metadataBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ * repeated .prometheus.MetricMetadata metadata = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addMetadata(Types.MetricMetadata value) {
+ if (metadataBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMetadataIsMutable();
+ metadata_.add(value);
+ onChanged();
+ } else {
+ metadataBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ * repeated .prometheus.MetricMetadata metadata = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addMetadata(int index, Types.MetricMetadata value) {
+ if (metadataBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMetadataIsMutable();
+ metadata_.add(index, value);
+ onChanged();
+ } else {
+ metadataBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ * repeated .prometheus.MetricMetadata metadata = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addMetadata(Types.MetricMetadata.Builder builderForValue) {
+ if (metadataBuilder_ == null) {
+ ensureMetadataIsMutable();
+ metadata_.add(builderForValue.build());
+ onChanged();
+ } else {
+ metadataBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ * repeated .prometheus.MetricMetadata metadata = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addMetadata(int index, Types.MetricMetadata.Builder builderForValue) {
+ if (metadataBuilder_ == null) {
+ ensureMetadataIsMutable();
+ metadata_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ metadataBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ * repeated .prometheus.MetricMetadata metadata = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addAllMetadata(Iterable extends Types.MetricMetadata> values) {
+ if (metadataBuilder_ == null) {
+ ensureMetadataIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, metadata_);
+ onChanged();
+ } else {
+ metadataBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /**
+ *
+ * repeated .prometheus.MetricMetadata metadata = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder clearMetadata() {
+ if (metadataBuilder_ == null) {
+ metadata_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ } else {
+ metadataBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ *
+ * repeated .prometheus.MetricMetadata metadata = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder removeMetadata(int index) {
+ if (metadataBuilder_ == null) {
+ ensureMetadataIsMutable();
+ metadata_.remove(index);
+ onChanged();
+ } else {
+ metadataBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /**
+ *
+ * repeated .prometheus.MetricMetadata metadata = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.MetricMetadata.Builder getMetadataBuilder(int index) {
+ return getMetadataFieldBuilder().getBuilder(index);
+ }
+
+ /**
+ *
+ * repeated .prometheus.MetricMetadata metadata = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.MetricMetadataOrBuilder getMetadataOrBuilder(int index) {
+ if (metadataBuilder_ == null) {
+ return metadata_.get(index);
+ } else {
+ return metadataBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /**
+ *
+ * repeated .prometheus.MetricMetadata metadata = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public java.util.List extends Types.MetricMetadataOrBuilder>
+ getMetadataOrBuilderList() {
+ if (metadataBuilder_ != null) {
+ return metadataBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(metadata_);
+ }
+ }
+
+ /**
+ *
+ * repeated .prometheus.MetricMetadata metadata = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.MetricMetadata.Builder addMetadataBuilder() {
+ return getMetadataFieldBuilder()
+ .addBuilder(Types.MetricMetadata.getDefaultInstance());
+ }
+
+ /**
+ *
+ * repeated .prometheus.MetricMetadata metadata = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.MetricMetadata.Builder addMetadataBuilder(int index) {
+ return getMetadataFieldBuilder()
+ .addBuilder(index, Types.MetricMetadata.getDefaultInstance());
+ }
+
+ /**
+ *
+ * repeated .prometheus.MetricMetadata metadata = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public java.util.Listrepeated .prometheus.Query queries = 1; */
+ java.util.Listrepeated .prometheus.Query queries = 1; */
+ Remote.Query getQueries(int index);
+
+ /** repeated .prometheus.Query queries = 1; */
+ int getQueriesCount();
+
+ /** repeated .prometheus.Query queries = 1; */
+ java.util.List extends Remote.QueryOrBuilder> getQueriesOrBuilderList();
+
+ /** repeated .prometheus.Query queries = 1; */
+ Remote.QueryOrBuilder getQueriesOrBuilder(int index);
+
+ /**
+ *
+ *
+ *
+ * accepted_response_types allows negotiating the content type of the response.
+ *
+ * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
+ * implemented by server, error is returned.
+ * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
+ *
+ *
+ * repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;
+ *
+ * @return A list containing the acceptedResponseTypes.
+ */
+ java.util.List
+ * accepted_response_types allows negotiating the content type of the response.
+ *
+ * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
+ * implemented by server, error is returned.
+ * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
+ *
+ *
+ * repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;
+ *
+ * @return The count of acceptedResponseTypes.
+ */
+ int getAcceptedResponseTypesCount();
+
+ /**
+ *
+ *
+ *
+ * accepted_response_types allows negotiating the content type of the response.
+ *
+ * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
+ * implemented by server, error is returned.
+ * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
+ *
+ *
+ * repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;
+ *
+ * @param index The index of the element to return.
+ * @return The acceptedResponseTypes at the given index.
+ */
+ Remote.ReadRequest.ResponseType getAcceptedResponseTypes(int index);
+
+ /**
+ *
+ *
+ *
+ * accepted_response_types allows negotiating the content type of the response.
+ *
+ * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
+ * implemented by server, error is returned.
+ * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
+ *
+ *
+ * repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;
+ *
+ * @return A list containing the enum numeric values on the wire for acceptedResponseTypes.
+ */
+ java.util.List
+ * accepted_response_types allows negotiating the content type of the response.
+ *
+ * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
+ * implemented by server, error is returned.
+ * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
+ *
+ *
+ * repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;
+ *
+ * @param index The index of the value to return.
+ * @return The enum numeric value on the wire of acceptedResponseTypes at the given index.
+ */
+ int getAcceptedResponseTypesValue(int index);
+ }
+
+ /**
+ *
+ *
+ *
+ * ReadRequest represents a remote read request.
+ *
+ *
+ *
+ * Server will return a single ReadResponse message with matched series that includes list of raw samples.
+ * It's recommended to use streamed response types instead.
+ *
+ * Response headers:
+ * Content-Type: "application/x-protobuf"
+ * Content-Encoding: "snappy"
+ *
+ *
+ * SAMPLES = 0;
+ */
+ SAMPLES(0),
+ /**
+ *
+ *
+ *
+ * Server will stream a delimited ChunkedReadResponse message that
+ * contains XOR or HISTOGRAM(!) encoded chunks for a single series.
+ * Each message is following varint size and fixed size bigendian
+ * uint32 for CRC32 Castagnoli checksum.
+ *
+ * Response headers:
+ * Content-Type: "application/x-streamed-protobuf; proto=prometheus.ChunkedReadResponse"
+ * Content-Encoding: ""
+ *
+ *
+ * STREAMED_XOR_CHUNKS = 1;
+ */
+ STREAMED_XOR_CHUNKS(1),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ *
+ * Server will return a single ReadResponse message with matched series that includes list of raw samples.
+ * It's recommended to use streamed response types instead.
+ *
+ * Response headers:
+ * Content-Type: "application/x-protobuf"
+ * Content-Encoding: "snappy"
+ *
+ *
+ * SAMPLES = 0;
+ */
+ public static final int SAMPLES_VALUE = 0;
+ /**
+ *
+ *
+ *
+ * Server will stream a delimited ChunkedReadResponse message that
+ * contains XOR or HISTOGRAM(!) encoded chunks for a single series.
+ * Each message is following varint size and fixed size bigendian
+ * uint32 for CRC32 Castagnoli checksum.
+ *
+ * Response headers:
+ * Content-Type: "application/x-streamed-protobuf; proto=prometheus.ChunkedReadResponse"
+ * Content-Encoding: ""
+ *
+ *
+ * STREAMED_XOR_CHUNKS = 1;
+ */
+ public static final int STREAMED_XOR_CHUNKS_VALUE = 1;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @Deprecated
+ public static ResponseType 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 ResponseType forNumber(int value) {
+ switch (value) {
+ case 0:
+ return SAMPLES;
+ case 1:
+ return STREAMED_XOR_CHUNKS;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMaprepeated .prometheus.Query queries = 1; */
+ @Override
+ public java.util.Listrepeated .prometheus.Query queries = 1; */
+ @Override
+ public java.util.List extends Remote.QueryOrBuilder> getQueriesOrBuilderList() {
+ return queries_;
+ }
+
+ /** repeated .prometheus.Query queries = 1; */
+ @Override
+ public int getQueriesCount() {
+ return queries_.size();
+ }
+
+ /** repeated .prometheus.Query queries = 1; */
+ @Override
+ public Remote.Query getQueries(int index) {
+ return queries_.get(index);
+ }
+
+ /** repeated .prometheus.Query queries = 1; */
+ @Override
+ public Remote.QueryOrBuilder getQueriesOrBuilder(int index) {
+ return queries_.get(index);
+ }
+
+ public static final int ACCEPTED_RESPONSE_TYPES_FIELD_NUMBER = 2;
+
+ @SuppressWarnings("serial")
+ private java.util.List
+ * accepted_response_types allows negotiating the content type of the response.
+ *
+ * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
+ * implemented by server, error is returned.
+ * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
+ *
+ *
+ * repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;
+ *
+ * @return A list containing the acceptedResponseTypes.
+ */
+ @Override
+ public java.util.List
+ * accepted_response_types allows negotiating the content type of the response.
+ *
+ * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
+ * implemented by server, error is returned.
+ * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
+ *
+ *
+ * repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;
+ *
+ * @return The count of acceptedResponseTypes.
+ */
+ @Override
+ public int getAcceptedResponseTypesCount() {
+ return acceptedResponseTypes_.size();
+ }
+
+ /**
+ *
+ *
+ *
+ * accepted_response_types allows negotiating the content type of the response.
+ *
+ * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
+ * implemented by server, error is returned.
+ * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
+ *
+ *
+ * repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;
+ *
+ * @param index The index of the element to return.
+ * @return The acceptedResponseTypes at the given index.
+ */
+ @Override
+ public Remote.ReadRequest.ResponseType getAcceptedResponseTypes(int index) {
+ return acceptedResponseTypes_converter_.convert(acceptedResponseTypes_.get(index));
+ }
+
+ /**
+ *
+ *
+ *
+ * accepted_response_types allows negotiating the content type of the response.
+ *
+ * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
+ * implemented by server, error is returned.
+ * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
+ *
+ *
+ * repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;
+ *
+ * @return A list containing the enum numeric values on the wire for acceptedResponseTypes.
+ */
+ @Override
+ public java.util.List
+ * accepted_response_types allows negotiating the content type of the response.
+ *
+ * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
+ * implemented by server, error is returned.
+ * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
+ *
+ *
+ * repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;
+ *
+ * @param index The index of the value to return.
+ * @return The enum numeric value on the wire of acceptedResponseTypes at the given index.
+ */
+ @Override
+ public int getAcceptedResponseTypesValue(int index) {
+ return acceptedResponseTypes_.get(index);
+ }
+
+ private int acceptedResponseTypesMemoizedSerializedSize;
+
+ private byte memoizedIsInitialized = -1;
+
+ @Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) {
+ return true;
+ }
+ if (isInitialized == 0) {
+ return false;
+ }
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ for (int i = 0; i < queries_.size(); i++) {
+ output.writeMessage(1, queries_.get(i));
+ }
+ if (getAcceptedResponseTypesList().size() > 0) {
+ output.writeUInt32NoTag(18);
+ output.writeUInt32NoTag(acceptedResponseTypesMemoizedSerializedSize);
+ }
+ for (int i = 0; i < acceptedResponseTypes_.size(); i++) {
+ output.writeEnumNoTag(acceptedResponseTypes_.get(i));
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) {
+ return size;
+ }
+
+ size = 0;
+ for (int i = 0; i < queries_.size(); i++) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 1, queries_.get(i));
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < acceptedResponseTypes_.size(); i++) {
+ dataSize +=
+ com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(
+ acceptedResponseTypes_.get(i));
+ }
+ size += dataSize;
+ if (!getAcceptedResponseTypesList().isEmpty()) {
+ size += 1;
+ size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize);
+ }
+ acceptedResponseTypesMemoizedSerializedSize = dataSize;
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof Remote.ReadRequest)) {
+ return super.equals(obj);
+ }
+ Remote.ReadRequest other = (Remote.ReadRequest) obj;
+
+ if (!getQueriesList().equals(other.getQueriesList())) {
+ return false;
+ }
+ if (!acceptedResponseTypes_.equals(other.acceptedResponseTypes_)) {
+ return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getQueriesCount() > 0) {
+ hash = (37 * hash) + QUERIES_FIELD_NUMBER;
+ hash = (53 * hash) + getQueriesList().hashCode();
+ }
+ if (getAcceptedResponseTypesCount() > 0) {
+ hash = (37 * hash) + ACCEPTED_RESPONSE_TYPES_FIELD_NUMBER;
+ hash = (53 * hash) + acceptedResponseTypes_.hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static Remote.ReadRequest parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Remote.ReadRequest parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Remote.ReadRequest parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Remote.ReadRequest parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Remote.ReadRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Remote.ReadRequest parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Remote.ReadRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static Remote.ReadRequest 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 Remote.ReadRequest parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input);
+ }
+
+ public static Remote.ReadRequest 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 Remote.ReadRequest parseFrom(com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static Remote.ReadRequest parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(Remote.ReadRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ *
+ *
+ *
+ * ReadRequest represents a remote read request.
+ *
+ *
+ * repeated .prometheus.Query queries = 1; */
+ public java.util.Listrepeated .prometheus.Query queries = 1; */
+ public int getQueriesCount() {
+ if (queriesBuilder_ == null) {
+ return queries_.size();
+ } else {
+ return queriesBuilder_.getCount();
+ }
+ }
+
+ /** repeated .prometheus.Query queries = 1; */
+ public Remote.Query getQueries(int index) {
+ if (queriesBuilder_ == null) {
+ return queries_.get(index);
+ } else {
+ return queriesBuilder_.getMessage(index);
+ }
+ }
+
+ /** repeated .prometheus.Query queries = 1; */
+ public Builder setQueries(int index, Remote.Query value) {
+ if (queriesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureQueriesIsMutable();
+ queries_.set(index, value);
+ onChanged();
+ } else {
+ queriesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /** repeated .prometheus.Query queries = 1; */
+ public Builder setQueries(int index, Remote.Query.Builder builderForValue) {
+ if (queriesBuilder_ == null) {
+ ensureQueriesIsMutable();
+ queries_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ queriesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /** repeated .prometheus.Query queries = 1; */
+ public Builder addQueries(Remote.Query value) {
+ if (queriesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureQueriesIsMutable();
+ queries_.add(value);
+ onChanged();
+ } else {
+ queriesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /** repeated .prometheus.Query queries = 1; */
+ public Builder addQueries(int index, Remote.Query value) {
+ if (queriesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureQueriesIsMutable();
+ queries_.add(index, value);
+ onChanged();
+ } else {
+ queriesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /** repeated .prometheus.Query queries = 1; */
+ public Builder addQueries(Remote.Query.Builder builderForValue) {
+ if (queriesBuilder_ == null) {
+ ensureQueriesIsMutable();
+ queries_.add(builderForValue.build());
+ onChanged();
+ } else {
+ queriesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /** repeated .prometheus.Query queries = 1; */
+ public Builder addQueries(int index, Remote.Query.Builder builderForValue) {
+ if (queriesBuilder_ == null) {
+ ensureQueriesIsMutable();
+ queries_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ queriesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /** repeated .prometheus.Query queries = 1; */
+ public Builder addAllQueries(Iterable extends Remote.Query> values) {
+ if (queriesBuilder_ == null) {
+ ensureQueriesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, queries_);
+ onChanged();
+ } else {
+ queriesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /** repeated .prometheus.Query queries = 1; */
+ public Builder clearQueries() {
+ if (queriesBuilder_ == null) {
+ queries_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ queriesBuilder_.clear();
+ }
+ return this;
+ }
+
+ /** repeated .prometheus.Query queries = 1; */
+ public Builder removeQueries(int index) {
+ if (queriesBuilder_ == null) {
+ ensureQueriesIsMutable();
+ queries_.remove(index);
+ onChanged();
+ } else {
+ queriesBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /** repeated .prometheus.Query queries = 1; */
+ public Remote.Query.Builder getQueriesBuilder(int index) {
+ return getQueriesFieldBuilder().getBuilder(index);
+ }
+
+ /** repeated .prometheus.Query queries = 1; */
+ public Remote.QueryOrBuilder getQueriesOrBuilder(int index) {
+ if (queriesBuilder_ == null) {
+ return queries_.get(index);
+ } else {
+ return queriesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /** repeated .prometheus.Query queries = 1; */
+ public java.util.List extends Remote.QueryOrBuilder> getQueriesOrBuilderList() {
+ if (queriesBuilder_ != null) {
+ return queriesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(queries_);
+ }
+ }
+
+ /** repeated .prometheus.Query queries = 1; */
+ public Remote.Query.Builder addQueriesBuilder() {
+ return getQueriesFieldBuilder().addBuilder(Remote.Query.getDefaultInstance());
+ }
+
+ /** repeated .prometheus.Query queries = 1; */
+ public Remote.Query.Builder addQueriesBuilder(int index) {
+ return getQueriesFieldBuilder()
+ .addBuilder(index, Remote.Query.getDefaultInstance());
+ }
+
+ /** repeated .prometheus.Query queries = 1; */
+ public java.util.List
+ * accepted_response_types allows negotiating the content type of the response.
+ *
+ * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
+ * implemented by server, error is returned.
+ * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
+ *
+ *
+ * repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;
+ *
+ *
+ * @return A list containing the acceptedResponseTypes.
+ */
+ public java.util.List
+ * accepted_response_types allows negotiating the content type of the response.
+ *
+ * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
+ * implemented by server, error is returned.
+ * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
+ *
+ *
+ * repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;
+ *
+ *
+ * @return The count of acceptedResponseTypes.
+ */
+ public int getAcceptedResponseTypesCount() {
+ return acceptedResponseTypes_.size();
+ }
+
+ /**
+ *
+ *
+ *
+ * accepted_response_types allows negotiating the content type of the response.
+ *
+ * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
+ * implemented by server, error is returned.
+ * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
+ *
+ *
+ * repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;
+ *
+ *
+ * @param index The index of the element to return.
+ * @return The acceptedResponseTypes at the given index.
+ */
+ public Remote.ReadRequest.ResponseType getAcceptedResponseTypes(int index) {
+ return acceptedResponseTypes_converter_.convert(acceptedResponseTypes_.get(index));
+ }
+
+ /**
+ *
+ *
+ *
+ * accepted_response_types allows negotiating the content type of the response.
+ *
+ * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
+ * implemented by server, error is returned.
+ * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
+ *
+ *
+ * repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;
+ *
+ *
+ * @param index The index to set the value at.
+ * @param value The acceptedResponseTypes to set.
+ * @return This builder for chaining.
+ */
+ public Builder setAcceptedResponseTypes(
+ int index, Remote.ReadRequest.ResponseType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureAcceptedResponseTypesIsMutable();
+ acceptedResponseTypes_.set(index, value.getNumber());
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * accepted_response_types allows negotiating the content type of the response.
+ *
+ * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
+ * implemented by server, error is returned.
+ * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
+ *
+ *
+ * repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;
+ *
+ *
+ * @param value The acceptedResponseTypes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAcceptedResponseTypes(Remote.ReadRequest.ResponseType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureAcceptedResponseTypesIsMutable();
+ acceptedResponseTypes_.add(value.getNumber());
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * accepted_response_types allows negotiating the content type of the response.
+ *
+ * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
+ * implemented by server, error is returned.
+ * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
+ *
+ *
+ * repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;
+ *
+ *
+ * @param values The acceptedResponseTypes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllAcceptedResponseTypes(
+ Iterable extends Remote.ReadRequest.ResponseType> values) {
+ ensureAcceptedResponseTypesIsMutable();
+ for (Remote.ReadRequest.ResponseType value : values) {
+ acceptedResponseTypes_.add(value.getNumber());
+ }
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * accepted_response_types allows negotiating the content type of the response.
+ *
+ * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
+ * implemented by server, error is returned.
+ * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
+ *
+ *
+ * repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearAcceptedResponseTypes() {
+ acceptedResponseTypes_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * accepted_response_types allows negotiating the content type of the response.
+ *
+ * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
+ * implemented by server, error is returned.
+ * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
+ *
+ *
+ * repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;
+ *
+ *
+ * @return A list containing the enum numeric values on the wire for
+ * acceptedResponseTypes.
+ */
+ public java.util.List
+ * accepted_response_types allows negotiating the content type of the response.
+ *
+ * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
+ * implemented by server, error is returned.
+ * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
+ *
+ *
+ * repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;
+ *
+ *
+ * @param index The index of the value to return.
+ * @return The enum numeric value on the wire of acceptedResponseTypes at the given
+ * index.
+ */
+ public int getAcceptedResponseTypesValue(int index) {
+ return acceptedResponseTypes_.get(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * accepted_response_types allows negotiating the content type of the response.
+ *
+ * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
+ * implemented by server, error is returned.
+ * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
+ *
+ *
+ * repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;
+ *
+ *
+ * @param index The index to set the value at.
+ * @param value The enum numeric value on the wire for acceptedResponseTypes to set.
+ * @return This builder for chaining.
+ */
+ public Builder setAcceptedResponseTypesValue(int index, int value) {
+ ensureAcceptedResponseTypesIsMutable();
+ acceptedResponseTypes_.set(index, value);
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * accepted_response_types allows negotiating the content type of the response.
+ *
+ * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
+ * implemented by server, error is returned.
+ * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
+ *
+ *
+ * repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;
+ *
+ *
+ * @param value The enum numeric value on the wire for acceptedResponseTypes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAcceptedResponseTypesValue(int value) {
+ ensureAcceptedResponseTypesIsMutable();
+ acceptedResponseTypes_.add(value);
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * accepted_response_types allows negotiating the content type of the response.
+ *
+ * Response types are taken from the list in the FIFO order. If no response type in `accepted_response_types` is
+ * implemented by server, error is returned.
+ * For request that do not contain `accepted_response_types` field the SAMPLES response type will be used.
+ *
+ *
+ * repeated .prometheus.ReadRequest.ResponseType accepted_response_types = 2;
+ *
+ *
+ * @param values The enum numeric values on the wire for acceptedResponseTypes to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllAcceptedResponseTypesValue(Iterable
+ * In same order as the request's queries.
+ *
+ *
+ * repeated .prometheus.QueryResult results = 1;
+ */
+ java.util.List
+ * In same order as the request's queries.
+ *
+ *
+ * repeated .prometheus.QueryResult results = 1;
+ */
+ Remote.QueryResult getResults(int index);
+
+ /**
+ *
+ *
+ *
+ * In same order as the request's queries.
+ *
+ *
+ * repeated .prometheus.QueryResult results = 1;
+ */
+ int getResultsCount();
+
+ /**
+ *
+ *
+ *
+ * In same order as the request's queries.
+ *
+ *
+ * repeated .prometheus.QueryResult results = 1;
+ */
+ java.util.List extends Remote.QueryResultOrBuilder> getResultsOrBuilderList();
+
+ /**
+ *
+ *
+ *
+ * In same order as the request's queries.
+ *
+ *
+ * repeated .prometheus.QueryResult results = 1;
+ */
+ Remote.QueryResultOrBuilder getResultsOrBuilder(int index);
+ }
+
+ /**
+ *
+ *
+ *
+ * ReadResponse is a response when response_type equals SAMPLES.
+ *
+ *
+ *
+ * In same order as the request's queries.
+ *
+ *
+ * repeated .prometheus.QueryResult results = 1;
+ */
+ @Override
+ public java.util.List
+ * In same order as the request's queries.
+ *
+ *
+ * repeated .prometheus.QueryResult results = 1;
+ */
+ @Override
+ public java.util.List extends Remote.QueryResultOrBuilder> getResultsOrBuilderList() {
+ return results_;
+ }
+
+ /**
+ *
+ *
+ *
+ * In same order as the request's queries.
+ *
+ *
+ * repeated .prometheus.QueryResult results = 1;
+ */
+ @Override
+ public int getResultsCount() {
+ return results_.size();
+ }
+
+ /**
+ *
+ *
+ *
+ * In same order as the request's queries.
+ *
+ *
+ * repeated .prometheus.QueryResult results = 1;
+ */
+ @Override
+ public Remote.QueryResult getResults(int index) {
+ return results_.get(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * In same order as the request's queries.
+ *
+ *
+ * repeated .prometheus.QueryResult results = 1;
+ */
+ @Override
+ public Remote.QueryResultOrBuilder getResultsOrBuilder(int index) {
+ return results_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) {
+ return true;
+ }
+ if (isInitialized == 0) {
+ return false;
+ }
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ for (int i = 0; i < results_.size(); i++) {
+ output.writeMessage(1, results_.get(i));
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) {
+ return size;
+ }
+
+ size = 0;
+ for (int i = 0; i < results_.size(); i++) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 1, results_.get(i));
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof Remote.ReadResponse)) {
+ return super.equals(obj);
+ }
+ Remote.ReadResponse other = (Remote.ReadResponse) obj;
+
+ if (!getResultsList().equals(other.getResultsList())) {
+ return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getResultsCount() > 0) {
+ hash = (37 * hash) + RESULTS_FIELD_NUMBER;
+ hash = (53 * hash) + getResultsList().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static Remote.ReadResponse parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Remote.ReadResponse parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Remote.ReadResponse parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Remote.ReadResponse parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Remote.ReadResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Remote.ReadResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Remote.ReadResponse parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static Remote.ReadResponse 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 Remote.ReadResponse parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input);
+ }
+
+ public static Remote.ReadResponse 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 Remote.ReadResponse parseFrom(com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static Remote.ReadResponse parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(Remote.ReadResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ *
+ *
+ *
+ * ReadResponse is a response when response_type equals SAMPLES.
+ *
+ *
+ *
+ * In same order as the request's queries.
+ *
+ *
+ * repeated .prometheus.QueryResult results = 1;
+ */
+ public java.util.List
+ * In same order as the request's queries.
+ *
+ *
+ * repeated .prometheus.QueryResult results = 1;
+ */
+ public int getResultsCount() {
+ if (resultsBuilder_ == null) {
+ return results_.size();
+ } else {
+ return resultsBuilder_.getCount();
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * In same order as the request's queries.
+ *
+ *
+ * repeated .prometheus.QueryResult results = 1;
+ */
+ public Remote.QueryResult getResults(int index) {
+ if (resultsBuilder_ == null) {
+ return results_.get(index);
+ } else {
+ return resultsBuilder_.getMessage(index);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * In same order as the request's queries.
+ *
+ *
+ * repeated .prometheus.QueryResult results = 1;
+ */
+ public Builder setResults(int index, Remote.QueryResult value) {
+ if (resultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResultsIsMutable();
+ results_.set(index, value);
+ onChanged();
+ } else {
+ resultsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * In same order as the request's queries.
+ *
+ *
+ * repeated .prometheus.QueryResult results = 1;
+ */
+ public Builder setResults(int index, Remote.QueryResult.Builder builderForValue) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ resultsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * In same order as the request's queries.
+ *
+ *
+ * repeated .prometheus.QueryResult results = 1;
+ */
+ public Builder addResults(Remote.QueryResult value) {
+ if (resultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResultsIsMutable();
+ results_.add(value);
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * In same order as the request's queries.
+ *
+ *
+ * repeated .prometheus.QueryResult results = 1;
+ */
+ public Builder addResults(int index, Remote.QueryResult value) {
+ if (resultsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureResultsIsMutable();
+ results_.add(index, value);
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * In same order as the request's queries.
+ *
+ *
+ * repeated .prometheus.QueryResult results = 1;
+ */
+ public Builder addResults(Remote.QueryResult.Builder builderForValue) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.add(builderForValue.build());
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * In same order as the request's queries.
+ *
+ *
+ * repeated .prometheus.QueryResult results = 1;
+ */
+ public Builder addResults(int index, Remote.QueryResult.Builder builderForValue) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ resultsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * In same order as the request's queries.
+ *
+ *
+ * repeated .prometheus.QueryResult results = 1;
+ */
+ public Builder addAllResults(Iterable extends Remote.QueryResult> values) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, results_);
+ onChanged();
+ } else {
+ resultsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * In same order as the request's queries.
+ *
+ *
+ * repeated .prometheus.QueryResult results = 1;
+ */
+ public Builder clearResults() {
+ if (resultsBuilder_ == null) {
+ results_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ resultsBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * In same order as the request's queries.
+ *
+ *
+ * repeated .prometheus.QueryResult results = 1;
+ */
+ public Builder removeResults(int index) {
+ if (resultsBuilder_ == null) {
+ ensureResultsIsMutable();
+ results_.remove(index);
+ onChanged();
+ } else {
+ resultsBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * In same order as the request's queries.
+ *
+ *
+ * repeated .prometheus.QueryResult results = 1;
+ */
+ public Remote.QueryResult.Builder getResultsBuilder(int index) {
+ return getResultsFieldBuilder().getBuilder(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * In same order as the request's queries.
+ *
+ *
+ * repeated .prometheus.QueryResult results = 1;
+ */
+ public Remote.QueryResultOrBuilder getResultsOrBuilder(int index) {
+ if (resultsBuilder_ == null) {
+ return results_.get(index);
+ } else {
+ return resultsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * In same order as the request's queries.
+ *
+ *
+ * repeated .prometheus.QueryResult results = 1;
+ */
+ public java.util.List extends Remote.QueryResultOrBuilder> getResultsOrBuilderList() {
+ if (resultsBuilder_ != null) {
+ return resultsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(results_);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * In same order as the request's queries.
+ *
+ *
+ * repeated .prometheus.QueryResult results = 1;
+ */
+ public Remote.QueryResult.Builder addResultsBuilder() {
+ return getResultsFieldBuilder().addBuilder(Remote.QueryResult.getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ *
+ * In same order as the request's queries.
+ *
+ *
+ * repeated .prometheus.QueryResult results = 1;
+ */
+ public Remote.QueryResult.Builder addResultsBuilder(int index) {
+ return getResultsFieldBuilder()
+ .addBuilder(index, Remote.QueryResult.getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ *
+ * In same order as the request's queries.
+ *
+ *
+ * repeated .prometheus.QueryResult results = 1;
+ */
+ public java.util.Listint64 start_timestamp_ms = 1;
+ *
+ * @return The startTimestampMs.
+ */
+ long getStartTimestampMs();
+
+ /**
+ * int64 end_timestamp_ms = 2;
+ *
+ * @return The endTimestampMs.
+ */
+ long getEndTimestampMs();
+
+ /** repeated .prometheus.LabelMatcher matchers = 3; */
+ java.util.Listrepeated .prometheus.LabelMatcher matchers = 3; */
+ Types.LabelMatcher getMatchers(int index);
+
+ /** repeated .prometheus.LabelMatcher matchers = 3; */
+ int getMatchersCount();
+
+ /** repeated .prometheus.LabelMatcher matchers = 3; */
+ java.util.List extends Types.LabelMatcherOrBuilder> getMatchersOrBuilderList();
+
+ /** repeated .prometheus.LabelMatcher matchers = 3; */
+ Types.LabelMatcherOrBuilder getMatchersOrBuilder(int index);
+
+ /**
+ * .prometheus.ReadHints hints = 4;
+ *
+ * @return Whether the hints field is set.
+ */
+ boolean hasHints();
+
+ /**
+ * .prometheus.ReadHints hints = 4;
+ *
+ * @return The hints.
+ */
+ Types.ReadHints getHints();
+
+ /** .prometheus.ReadHints hints = 4; */
+ Types.ReadHintsOrBuilder getHintsOrBuilder();
+ }
+
+ /** Protobuf type {@code prometheus.Query} */
+ public static final class Query extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:prometheus.Query)
+ QueryOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ // Use Query.newBuilder() to construct.
+ private Query(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private Query() {
+ matchers_ = java.util.Collections.emptyList();
+ }
+
+ @Override
+ @SuppressWarnings({"unused"})
+ protected Object newInstance(UnusedPrivateParameter unused) {
+ return new Query();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return Remote.internal_static_prometheus_Query_descriptor;
+ }
+
+ @Override
+ protected FieldAccessorTable internalGetFieldAccessorTable() {
+ return Remote.internal_static_prometheus_Query_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Remote.Query.class, Remote.Query.Builder.class);
+ }
+
+ private int bitField0_;
+ public static final int START_TIMESTAMP_MS_FIELD_NUMBER = 1;
+ private long startTimestampMs_ = 0L;
+
+ /**
+ * int64 start_timestamp_ms = 1;
+ *
+ * @return The startTimestampMs.
+ */
+ @Override
+ public long getStartTimestampMs() {
+ return startTimestampMs_;
+ }
+
+ public static final int END_TIMESTAMP_MS_FIELD_NUMBER = 2;
+ private long endTimestampMs_ = 0L;
+
+ /**
+ * int64 end_timestamp_ms = 2;
+ *
+ * @return The endTimestampMs.
+ */
+ @Override
+ public long getEndTimestampMs() {
+ return endTimestampMs_;
+ }
+
+ public static final int MATCHERS_FIELD_NUMBER = 3;
+
+ @SuppressWarnings("serial")
+ private java.util.Listrepeated .prometheus.LabelMatcher matchers = 3; */
+ @Override
+ public java.util.Listrepeated .prometheus.LabelMatcher matchers = 3; */
+ @Override
+ public java.util.List extends Types.LabelMatcherOrBuilder> getMatchersOrBuilderList() {
+ return matchers_;
+ }
+
+ /** repeated .prometheus.LabelMatcher matchers = 3; */
+ @Override
+ public int getMatchersCount() {
+ return matchers_.size();
+ }
+
+ /** repeated .prometheus.LabelMatcher matchers = 3; */
+ @Override
+ public Types.LabelMatcher getMatchers(int index) {
+ return matchers_.get(index);
+ }
+
+ /** repeated .prometheus.LabelMatcher matchers = 3; */
+ @Override
+ public Types.LabelMatcherOrBuilder getMatchersOrBuilder(int index) {
+ return matchers_.get(index);
+ }
+
+ public static final int HINTS_FIELD_NUMBER = 4;
+ private Types.ReadHints hints_;
+
+ /**
+ * .prometheus.ReadHints hints = 4;
+ *
+ * @return Whether the hints field is set.
+ */
+ @Override
+ public boolean hasHints() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ * .prometheus.ReadHints hints = 4;
+ *
+ * @return The hints.
+ */
+ @Override
+ public Types.ReadHints getHints() {
+ return hints_ == null ? Types.ReadHints.getDefaultInstance() : hints_;
+ }
+
+ /** .prometheus.ReadHints hints = 4; */
+ @Override
+ public Types.ReadHintsOrBuilder getHintsOrBuilder() {
+ return hints_ == null ? Types.ReadHints.getDefaultInstance() : hints_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) {
+ return true;
+ }
+ if (isInitialized == 0) {
+ return false;
+ }
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (startTimestampMs_ != 0L) {
+ output.writeInt64(1, startTimestampMs_);
+ }
+ if (endTimestampMs_ != 0L) {
+ output.writeInt64(2, endTimestampMs_);
+ }
+ for (int i = 0; i < matchers_.size(); i++) {
+ output.writeMessage(3, matchers_.get(i));
+ }
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeMessage(4, getHints());
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) {
+ return size;
+ }
+
+ size = 0;
+ if (startTimestampMs_ != 0L) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeInt64Size(
+ 1, startTimestampMs_);
+ }
+ if (endTimestampMs_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, endTimestampMs_);
+ }
+ for (int i = 0; i < matchers_.size(); i++) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 3, matchers_.get(i));
+ }
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getHints());
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof Remote.Query)) {
+ return super.equals(obj);
+ }
+ Remote.Query other = (Remote.Query) obj;
+
+ if (getStartTimestampMs() != other.getStartTimestampMs()) {
+ return false;
+ }
+ if (getEndTimestampMs() != other.getEndTimestampMs()) {
+ return false;
+ }
+ if (!getMatchersList().equals(other.getMatchersList())) {
+ return false;
+ }
+ if (hasHints() != other.hasHints()) {
+ return false;
+ }
+ if (hasHints()) {
+ if (!getHints().equals(other.getHints())) {
+ return false;
+ }
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + START_TIMESTAMP_MS_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getStartTimestampMs());
+ hash = (37 * hash) + END_TIMESTAMP_MS_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getEndTimestampMs());
+ if (getMatchersCount() > 0) {
+ hash = (37 * hash) + MATCHERS_FIELD_NUMBER;
+ hash = (53 * hash) + getMatchersList().hashCode();
+ }
+ if (hasHints()) {
+ hash = (37 * hash) + HINTS_FIELD_NUMBER;
+ hash = (53 * hash) + getHints().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static Remote.Query parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Remote.Query parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Remote.Query parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Remote.Query parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Remote.Query parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Remote.Query parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Remote.Query parseFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static Remote.Query 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 Remote.Query parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input);
+ }
+
+ public static Remote.Query 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 Remote.Query parseFrom(com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static Remote.Query parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(Remote.Query prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /** Protobuf type {@code prometheus.Query} */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessageV3.Builderint64 start_timestamp_ms = 1;
+ *
+ * @return The startTimestampMs.
+ */
+ @Override
+ public long getStartTimestampMs() {
+ return startTimestampMs_;
+ }
+
+ /**
+ * int64 start_timestamp_ms = 1;
+ *
+ * @param value The startTimestampMs to set.
+ * @return This builder for chaining.
+ */
+ public Builder setStartTimestampMs(long value) {
+
+ startTimestampMs_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * int64 start_timestamp_ms = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearStartTimestampMs() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ startTimestampMs_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private long endTimestampMs_;
+
+ /**
+ * int64 end_timestamp_ms = 2;
+ *
+ * @return The endTimestampMs.
+ */
+ @Override
+ public long getEndTimestampMs() {
+ return endTimestampMs_;
+ }
+
+ /**
+ * int64 end_timestamp_ms = 2;
+ *
+ * @param value The endTimestampMs to set.
+ * @return This builder for chaining.
+ */
+ public Builder setEndTimestampMs(long value) {
+
+ endTimestampMs_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * int64 end_timestamp_ms = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearEndTimestampMs() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ endTimestampMs_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ private java.util.Listrepeated .prometheus.LabelMatcher matchers = 3; */
+ public java.util.Listrepeated .prometheus.LabelMatcher matchers = 3; */
+ public int getMatchersCount() {
+ if (matchersBuilder_ == null) {
+ return matchers_.size();
+ } else {
+ return matchersBuilder_.getCount();
+ }
+ }
+
+ /** repeated .prometheus.LabelMatcher matchers = 3; */
+ public Types.LabelMatcher getMatchers(int index) {
+ if (matchersBuilder_ == null) {
+ return matchers_.get(index);
+ } else {
+ return matchersBuilder_.getMessage(index);
+ }
+ }
+
+ /** repeated .prometheus.LabelMatcher matchers = 3; */
+ public Builder setMatchers(int index, Types.LabelMatcher value) {
+ if (matchersBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMatchersIsMutable();
+ matchers_.set(index, value);
+ onChanged();
+ } else {
+ matchersBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /** repeated .prometheus.LabelMatcher matchers = 3; */
+ public Builder setMatchers(int index, Types.LabelMatcher.Builder builderForValue) {
+ if (matchersBuilder_ == null) {
+ ensureMatchersIsMutable();
+ matchers_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ matchersBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /** repeated .prometheus.LabelMatcher matchers = 3; */
+ public Builder addMatchers(Types.LabelMatcher value) {
+ if (matchersBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMatchersIsMutable();
+ matchers_.add(value);
+ onChanged();
+ } else {
+ matchersBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /** repeated .prometheus.LabelMatcher matchers = 3; */
+ public Builder addMatchers(int index, Types.LabelMatcher value) {
+ if (matchersBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMatchersIsMutable();
+ matchers_.add(index, value);
+ onChanged();
+ } else {
+ matchersBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /** repeated .prometheus.LabelMatcher matchers = 3; */
+ public Builder addMatchers(Types.LabelMatcher.Builder builderForValue) {
+ if (matchersBuilder_ == null) {
+ ensureMatchersIsMutable();
+ matchers_.add(builderForValue.build());
+ onChanged();
+ } else {
+ matchersBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /** repeated .prometheus.LabelMatcher matchers = 3; */
+ public Builder addMatchers(int index, Types.LabelMatcher.Builder builderForValue) {
+ if (matchersBuilder_ == null) {
+ ensureMatchersIsMutable();
+ matchers_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ matchersBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /** repeated .prometheus.LabelMatcher matchers = 3; */
+ public Builder addAllMatchers(Iterable extends Types.LabelMatcher> values) {
+ if (matchersBuilder_ == null) {
+ ensureMatchersIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, matchers_);
+ onChanged();
+ } else {
+ matchersBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /** repeated .prometheus.LabelMatcher matchers = 3; */
+ public Builder clearMatchers() {
+ if (matchersBuilder_ == null) {
+ matchers_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ onChanged();
+ } else {
+ matchersBuilder_.clear();
+ }
+ return this;
+ }
+
+ /** repeated .prometheus.LabelMatcher matchers = 3; */
+ public Builder removeMatchers(int index) {
+ if (matchersBuilder_ == null) {
+ ensureMatchersIsMutable();
+ matchers_.remove(index);
+ onChanged();
+ } else {
+ matchersBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /** repeated .prometheus.LabelMatcher matchers = 3; */
+ public Types.LabelMatcher.Builder getMatchersBuilder(int index) {
+ return getMatchersFieldBuilder().getBuilder(index);
+ }
+
+ /** repeated .prometheus.LabelMatcher matchers = 3; */
+ public Types.LabelMatcherOrBuilder getMatchersOrBuilder(int index) {
+ if (matchersBuilder_ == null) {
+ return matchers_.get(index);
+ } else {
+ return matchersBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /** repeated .prometheus.LabelMatcher matchers = 3; */
+ public java.util.List extends Types.LabelMatcherOrBuilder>
+ getMatchersOrBuilderList() {
+ if (matchersBuilder_ != null) {
+ return matchersBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(matchers_);
+ }
+ }
+
+ /** repeated .prometheus.LabelMatcher matchers = 3; */
+ public Types.LabelMatcher.Builder addMatchersBuilder() {
+ return getMatchersFieldBuilder()
+ .addBuilder(Types.LabelMatcher.getDefaultInstance());
+ }
+
+ /** repeated .prometheus.LabelMatcher matchers = 3; */
+ public Types.LabelMatcher.Builder addMatchersBuilder(int index) {
+ return getMatchersFieldBuilder()
+ .addBuilder(index, Types.LabelMatcher.getDefaultInstance());
+ }
+
+ /** repeated .prometheus.LabelMatcher matchers = 3; */
+ public java.util.List.prometheus.ReadHints hints = 4;
+ *
+ * @return Whether the hints field is set.
+ */
+ public boolean hasHints() {
+ return ((bitField0_ & 0x00000008) != 0);
+ }
+
+ /**
+ * .prometheus.ReadHints hints = 4;
+ *
+ * @return The hints.
+ */
+ public Types.ReadHints getHints() {
+ if (hintsBuilder_ == null) {
+ return hints_ == null ? Types.ReadHints.getDefaultInstance() : hints_;
+ } else {
+ return hintsBuilder_.getMessage();
+ }
+ }
+
+ /** .prometheus.ReadHints hints = 4; */
+ public Builder setHints(Types.ReadHints value) {
+ if (hintsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ hints_ = value;
+ } else {
+ hintsBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+
+ /** .prometheus.ReadHints hints = 4; */
+ public Builder setHints(Types.ReadHints.Builder builderForValue) {
+ if (hintsBuilder_ == null) {
+ hints_ = builderForValue.build();
+ } else {
+ hintsBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+
+ /** .prometheus.ReadHints hints = 4; */
+ public Builder mergeHints(Types.ReadHints value) {
+ if (hintsBuilder_ == null) {
+ if (((bitField0_ & 0x00000008) != 0)
+ && hints_ != null
+ && hints_ != Types.ReadHints.getDefaultInstance()) {
+ getHintsBuilder().mergeFrom(value);
+ } else {
+ hints_ = value;
+ }
+ } else {
+ hintsBuilder_.mergeFrom(value);
+ }
+ if (hints_ != null) {
+ bitField0_ |= 0x00000008;
+ onChanged();
+ }
+ return this;
+ }
+
+ /** .prometheus.ReadHints hints = 4; */
+ public Builder clearHints() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ hints_ = null;
+ if (hintsBuilder_ != null) {
+ hintsBuilder_.dispose();
+ hintsBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+
+ /** .prometheus.ReadHints hints = 4; */
+ public Types.ReadHints.Builder getHintsBuilder() {
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return getHintsFieldBuilder().getBuilder();
+ }
+
+ /** .prometheus.ReadHints hints = 4; */
+ public Types.ReadHintsOrBuilder getHintsOrBuilder() {
+ if (hintsBuilder_ != null) {
+ return hintsBuilder_.getMessageOrBuilder();
+ } else {
+ return hints_ == null ? Types.ReadHints.getDefaultInstance() : hints_;
+ }
+ }
+
+ /** .prometheus.ReadHints hints = 4; */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ Types.ReadHints, Types.ReadHints.Builder, Types.ReadHintsOrBuilder>
+ getHintsFieldBuilder() {
+ if (hintsBuilder_ == null) {
+ hintsBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ Types.ReadHints,
+ Types.ReadHints.Builder,
+ Types.ReadHintsOrBuilder>(
+ getHints(), getParentForChildren(), isClean());
+ hints_ = null;
+ }
+ return hintsBuilder_;
+ }
+
+ @Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:prometheus.Query)
+ }
+
+ // @@protoc_insertion_point(class_scope:prometheus.Query)
+ private static final Remote.Query DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new Remote.Query();
+ }
+
+ public static Remote.Query getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Samples within a time series must be ordered by time.
+ *
+ *
+ * repeated .prometheus.TimeSeries timeseries = 1;
+ */
+ java.util.List
+ * Samples within a time series must be ordered by time.
+ *
+ *
+ * repeated .prometheus.TimeSeries timeseries = 1;
+ */
+ Types.TimeSeries getTimeseries(int index);
+
+ /**
+ *
+ *
+ *
+ * Samples within a time series must be ordered by time.
+ *
+ *
+ * repeated .prometheus.TimeSeries timeseries = 1;
+ */
+ int getTimeseriesCount();
+
+ /**
+ *
+ *
+ *
+ * Samples within a time series must be ordered by time.
+ *
+ *
+ * repeated .prometheus.TimeSeries timeseries = 1;
+ */
+ java.util.List extends Types.TimeSeriesOrBuilder> getTimeseriesOrBuilderList();
+
+ /**
+ *
+ *
+ *
+ * Samples within a time series must be ordered by time.
+ *
+ *
+ * repeated .prometheus.TimeSeries timeseries = 1;
+ */
+ Types.TimeSeriesOrBuilder getTimeseriesOrBuilder(int index);
+ }
+
+ /** Protobuf type {@code prometheus.QueryResult} */
+ public static final class QueryResult extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:prometheus.QueryResult)
+ QueryResultOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ // Use QueryResult.newBuilder() to construct.
+ private QueryResult(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private QueryResult() {
+ timeseries_ = java.util.Collections.emptyList();
+ }
+
+ @Override
+ @SuppressWarnings({"unused"})
+ protected Object newInstance(UnusedPrivateParameter unused) {
+ return new QueryResult();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return Remote.internal_static_prometheus_QueryResult_descriptor;
+ }
+
+ @Override
+ protected FieldAccessorTable internalGetFieldAccessorTable() {
+ return Remote.internal_static_prometheus_QueryResult_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Remote.QueryResult.class, Remote.QueryResult.Builder.class);
+ }
+
+ public static final int TIMESERIES_FIELD_NUMBER = 1;
+
+ @SuppressWarnings("serial")
+ private java.util.List
+ * Samples within a time series must be ordered by time.
+ *
+ *
+ * repeated .prometheus.TimeSeries timeseries = 1;
+ */
+ @Override
+ public java.util.List
+ * Samples within a time series must be ordered by time.
+ *
+ *
+ * repeated .prometheus.TimeSeries timeseries = 1;
+ */
+ @Override
+ public java.util.List extends Types.TimeSeriesOrBuilder> getTimeseriesOrBuilderList() {
+ return timeseries_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Samples within a time series must be ordered by time.
+ *
+ *
+ * repeated .prometheus.TimeSeries timeseries = 1;
+ */
+ @Override
+ public int getTimeseriesCount() {
+ return timeseries_.size();
+ }
+
+ /**
+ *
+ *
+ *
+ * Samples within a time series must be ordered by time.
+ *
+ *
+ * repeated .prometheus.TimeSeries timeseries = 1;
+ */
+ @Override
+ public Types.TimeSeries getTimeseries(int index) {
+ return timeseries_.get(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * Samples within a time series must be ordered by time.
+ *
+ *
+ * repeated .prometheus.TimeSeries timeseries = 1;
+ */
+ @Override
+ public Types.TimeSeriesOrBuilder getTimeseriesOrBuilder(int index) {
+ return timeseries_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) {
+ return true;
+ }
+ if (isInitialized == 0) {
+ return false;
+ }
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ for (int i = 0; i < timeseries_.size(); i++) {
+ output.writeMessage(1, timeseries_.get(i));
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) {
+ return size;
+ }
+
+ size = 0;
+ for (int i = 0; i < timeseries_.size(); i++) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 1, timeseries_.get(i));
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof Remote.QueryResult)) {
+ return super.equals(obj);
+ }
+ Remote.QueryResult other = (Remote.QueryResult) obj;
+
+ if (!getTimeseriesList().equals(other.getTimeseriesList())) {
+ return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getTimeseriesCount() > 0) {
+ hash = (37 * hash) + TIMESERIES_FIELD_NUMBER;
+ hash = (53 * hash) + getTimeseriesList().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static Remote.QueryResult parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Remote.QueryResult parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Remote.QueryResult parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Remote.QueryResult parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Remote.QueryResult parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Remote.QueryResult parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Remote.QueryResult parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static Remote.QueryResult 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 Remote.QueryResult parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input);
+ }
+
+ public static Remote.QueryResult 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 Remote.QueryResult parseFrom(com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static Remote.QueryResult parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(Remote.QueryResult prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /** Protobuf type {@code prometheus.QueryResult} */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Samples within a time series must be ordered by time.
+ *
+ *
+ * repeated .prometheus.TimeSeries timeseries = 1;
+ */
+ public java.util.List
+ * Samples within a time series must be ordered by time.
+ *
+ *
+ * repeated .prometheus.TimeSeries timeseries = 1;
+ */
+ public int getTimeseriesCount() {
+ if (timeseriesBuilder_ == null) {
+ return timeseries_.size();
+ } else {
+ return timeseriesBuilder_.getCount();
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Samples within a time series must be ordered by time.
+ *
+ *
+ * repeated .prometheus.TimeSeries timeseries = 1;
+ */
+ public Types.TimeSeries getTimeseries(int index) {
+ if (timeseriesBuilder_ == null) {
+ return timeseries_.get(index);
+ } else {
+ return timeseriesBuilder_.getMessage(index);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Samples within a time series must be ordered by time.
+ *
+ *
+ * repeated .prometheus.TimeSeries timeseries = 1;
+ */
+ public Builder setTimeseries(int index, Types.TimeSeries value) {
+ if (timeseriesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureTimeseriesIsMutable();
+ timeseries_.set(index, value);
+ onChanged();
+ } else {
+ timeseriesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Samples within a time series must be ordered by time.
+ *
+ *
+ * repeated .prometheus.TimeSeries timeseries = 1;
+ */
+ public Builder setTimeseries(int index, Types.TimeSeries.Builder builderForValue) {
+ if (timeseriesBuilder_ == null) {
+ ensureTimeseriesIsMutable();
+ timeseries_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ timeseriesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Samples within a time series must be ordered by time.
+ *
+ *
+ * repeated .prometheus.TimeSeries timeseries = 1;
+ */
+ public Builder addTimeseries(Types.TimeSeries value) {
+ if (timeseriesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureTimeseriesIsMutable();
+ timeseries_.add(value);
+ onChanged();
+ } else {
+ timeseriesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Samples within a time series must be ordered by time.
+ *
+ *
+ * repeated .prometheus.TimeSeries timeseries = 1;
+ */
+ public Builder addTimeseries(int index, Types.TimeSeries value) {
+ if (timeseriesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureTimeseriesIsMutable();
+ timeseries_.add(index, value);
+ onChanged();
+ } else {
+ timeseriesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Samples within a time series must be ordered by time.
+ *
+ *
+ * repeated .prometheus.TimeSeries timeseries = 1;
+ */
+ public Builder addTimeseries(Types.TimeSeries.Builder builderForValue) {
+ if (timeseriesBuilder_ == null) {
+ ensureTimeseriesIsMutable();
+ timeseries_.add(builderForValue.build());
+ onChanged();
+ } else {
+ timeseriesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Samples within a time series must be ordered by time.
+ *
+ *
+ * repeated .prometheus.TimeSeries timeseries = 1;
+ */
+ public Builder addTimeseries(int index, Types.TimeSeries.Builder builderForValue) {
+ if (timeseriesBuilder_ == null) {
+ ensureTimeseriesIsMutable();
+ timeseries_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ timeseriesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Samples within a time series must be ordered by time.
+ *
+ *
+ * repeated .prometheus.TimeSeries timeseries = 1;
+ */
+ public Builder addAllTimeseries(Iterable extends Types.TimeSeries> values) {
+ if (timeseriesBuilder_ == null) {
+ ensureTimeseriesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, timeseries_);
+ onChanged();
+ } else {
+ timeseriesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Samples within a time series must be ordered by time.
+ *
+ *
+ * repeated .prometheus.TimeSeries timeseries = 1;
+ */
+ public Builder clearTimeseries() {
+ if (timeseriesBuilder_ == null) {
+ timeseries_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ timeseriesBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Samples within a time series must be ordered by time.
+ *
+ *
+ * repeated .prometheus.TimeSeries timeseries = 1;
+ */
+ public Builder removeTimeseries(int index) {
+ if (timeseriesBuilder_ == null) {
+ ensureTimeseriesIsMutable();
+ timeseries_.remove(index);
+ onChanged();
+ } else {
+ timeseriesBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Samples within a time series must be ordered by time.
+ *
+ *
+ * repeated .prometheus.TimeSeries timeseries = 1;
+ */
+ public Types.TimeSeries.Builder getTimeseriesBuilder(int index) {
+ return getTimeseriesFieldBuilder().getBuilder(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * Samples within a time series must be ordered by time.
+ *
+ *
+ * repeated .prometheus.TimeSeries timeseries = 1;
+ */
+ public Types.TimeSeriesOrBuilder getTimeseriesOrBuilder(int index) {
+ if (timeseriesBuilder_ == null) {
+ return timeseries_.get(index);
+ } else {
+ return timeseriesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Samples within a time series must be ordered by time.
+ *
+ *
+ * repeated .prometheus.TimeSeries timeseries = 1;
+ */
+ public java.util.List extends Types.TimeSeriesOrBuilder>
+ getTimeseriesOrBuilderList() {
+ if (timeseriesBuilder_ != null) {
+ return timeseriesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(timeseries_);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Samples within a time series must be ordered by time.
+ *
+ *
+ * repeated .prometheus.TimeSeries timeseries = 1;
+ */
+ public Types.TimeSeries.Builder addTimeseriesBuilder() {
+ return getTimeseriesFieldBuilder()
+ .addBuilder(Types.TimeSeries.getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ *
+ * Samples within a time series must be ordered by time.
+ *
+ *
+ * repeated .prometheus.TimeSeries timeseries = 1;
+ */
+ public Types.TimeSeries.Builder addTimeseriesBuilder(int index) {
+ return getTimeseriesFieldBuilder()
+ .addBuilder(index, Types.TimeSeries.getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ *
+ * Samples within a time series must be ordered by time.
+ *
+ *
+ * repeated .prometheus.TimeSeries timeseries = 1;
+ */
+ public java.util.Listrepeated .prometheus.ChunkedSeries chunked_series = 1; */
+ java.util.Listrepeated .prometheus.ChunkedSeries chunked_series = 1; */
+ Types.ChunkedSeries getChunkedSeries(int index);
+
+ /** repeated .prometheus.ChunkedSeries chunked_series = 1; */
+ int getChunkedSeriesCount();
+
+ /** repeated .prometheus.ChunkedSeries chunked_series = 1; */
+ java.util.List extends Types.ChunkedSeriesOrBuilder> getChunkedSeriesOrBuilderList();
+
+ /** repeated .prometheus.ChunkedSeries chunked_series = 1; */
+ Types.ChunkedSeriesOrBuilder getChunkedSeriesOrBuilder(int index);
+
+ /**
+ *
+ *
+ *
+ * query_index represents an index of the query from ReadRequest.queries these chunks relates to.
+ *
+ *
+ * int64 query_index = 2;
+ *
+ * @return The queryIndex.
+ */
+ long getQueryIndex();
+ }
+
+ /**
+ *
+ *
+ *
+ * ChunkedReadResponse is a response when response_type equals STREAMED_XOR_CHUNKS.
+ * We strictly stream full series after series, optionally split by time. This means that a single frame can contain
+ * partition of the single series, but once a new series is started to be streamed it means that no more chunks will
+ * be sent for previous one. Series are returned sorted in the same way TSDB block are internally.
+ *
+ *
+ * repeated .prometheus.ChunkedSeries chunked_series = 1; */
+ @Override
+ public java.util.Listrepeated .prometheus.ChunkedSeries chunked_series = 1; */
+ @Override
+ public java.util.List extends Types.ChunkedSeriesOrBuilder>
+ getChunkedSeriesOrBuilderList() {
+ return chunkedSeries_;
+ }
+
+ /** repeated .prometheus.ChunkedSeries chunked_series = 1; */
+ @Override
+ public int getChunkedSeriesCount() {
+ return chunkedSeries_.size();
+ }
+
+ /** repeated .prometheus.ChunkedSeries chunked_series = 1; */
+ @Override
+ public Types.ChunkedSeries getChunkedSeries(int index) {
+ return chunkedSeries_.get(index);
+ }
+
+ /** repeated .prometheus.ChunkedSeries chunked_series = 1; */
+ @Override
+ public Types.ChunkedSeriesOrBuilder getChunkedSeriesOrBuilder(int index) {
+ return chunkedSeries_.get(index);
+ }
+
+ public static final int QUERY_INDEX_FIELD_NUMBER = 2;
+ private long queryIndex_ = 0L;
+
+ /**
+ *
+ *
+ *
+ * query_index represents an index of the query from ReadRequest.queries these chunks relates to.
+ *
+ *
+ * int64 query_index = 2;
+ *
+ * @return The queryIndex.
+ */
+ @Override
+ public long getQueryIndex() {
+ return queryIndex_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) {
+ return true;
+ }
+ if (isInitialized == 0) {
+ return false;
+ }
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ for (int i = 0; i < chunkedSeries_.size(); i++) {
+ output.writeMessage(1, chunkedSeries_.get(i));
+ }
+ if (queryIndex_ != 0L) {
+ output.writeInt64(2, queryIndex_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) {
+ return size;
+ }
+
+ size = 0;
+ for (int i = 0; i < chunkedSeries_.size(); i++) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 1, chunkedSeries_.get(i));
+ }
+ if (queryIndex_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, queryIndex_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof Remote.ChunkedReadResponse)) {
+ return super.equals(obj);
+ }
+ Remote.ChunkedReadResponse other = (Remote.ChunkedReadResponse) obj;
+
+ if (!getChunkedSeriesList().equals(other.getChunkedSeriesList())) {
+ return false;
+ }
+ if (getQueryIndex() != other.getQueryIndex()) {
+ return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getChunkedSeriesCount() > 0) {
+ hash = (37 * hash) + CHUNKED_SERIES_FIELD_NUMBER;
+ hash = (53 * hash) + getChunkedSeriesList().hashCode();
+ }
+ hash = (37 * hash) + QUERY_INDEX_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getQueryIndex());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static Remote.ChunkedReadResponse parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Remote.ChunkedReadResponse parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Remote.ChunkedReadResponse parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Remote.ChunkedReadResponse parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Remote.ChunkedReadResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Remote.ChunkedReadResponse parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Remote.ChunkedReadResponse parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static Remote.ChunkedReadResponse 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 Remote.ChunkedReadResponse parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input);
+ }
+
+ public static Remote.ChunkedReadResponse 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 Remote.ChunkedReadResponse parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static Remote.ChunkedReadResponse parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(Remote.ChunkedReadResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ *
+ *
+ *
+ * ChunkedReadResponse is a response when response_type equals STREAMED_XOR_CHUNKS.
+ * We strictly stream full series after series, optionally split by time. This means that a single frame can contain
+ * partition of the single series, but once a new series is started to be streamed it means that no more chunks will
+ * be sent for previous one. Series are returned sorted in the same way TSDB block are internally.
+ *
+ *
+ * repeated .prometheus.ChunkedSeries chunked_series = 1; */
+ public java.util.Listrepeated .prometheus.ChunkedSeries chunked_series = 1; */
+ public int getChunkedSeriesCount() {
+ if (chunkedSeriesBuilder_ == null) {
+ return chunkedSeries_.size();
+ } else {
+ return chunkedSeriesBuilder_.getCount();
+ }
+ }
+
+ /** repeated .prometheus.ChunkedSeries chunked_series = 1; */
+ public Types.ChunkedSeries getChunkedSeries(int index) {
+ if (chunkedSeriesBuilder_ == null) {
+ return chunkedSeries_.get(index);
+ } else {
+ return chunkedSeriesBuilder_.getMessage(index);
+ }
+ }
+
+ /** repeated .prometheus.ChunkedSeries chunked_series = 1; */
+ public Builder setChunkedSeries(int index, Types.ChunkedSeries value) {
+ if (chunkedSeriesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureChunkedSeriesIsMutable();
+ chunkedSeries_.set(index, value);
+ onChanged();
+ } else {
+ chunkedSeriesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /** repeated .prometheus.ChunkedSeries chunked_series = 1; */
+ public Builder setChunkedSeries(
+ int index, Types.ChunkedSeries.Builder builderForValue) {
+ if (chunkedSeriesBuilder_ == null) {
+ ensureChunkedSeriesIsMutable();
+ chunkedSeries_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ chunkedSeriesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /** repeated .prometheus.ChunkedSeries chunked_series = 1; */
+ public Builder addChunkedSeries(Types.ChunkedSeries value) {
+ if (chunkedSeriesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureChunkedSeriesIsMutable();
+ chunkedSeries_.add(value);
+ onChanged();
+ } else {
+ chunkedSeriesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /** repeated .prometheus.ChunkedSeries chunked_series = 1; */
+ public Builder addChunkedSeries(int index, Types.ChunkedSeries value) {
+ if (chunkedSeriesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureChunkedSeriesIsMutable();
+ chunkedSeries_.add(index, value);
+ onChanged();
+ } else {
+ chunkedSeriesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /** repeated .prometheus.ChunkedSeries chunked_series = 1; */
+ public Builder addChunkedSeries(Types.ChunkedSeries.Builder builderForValue) {
+ if (chunkedSeriesBuilder_ == null) {
+ ensureChunkedSeriesIsMutable();
+ chunkedSeries_.add(builderForValue.build());
+ onChanged();
+ } else {
+ chunkedSeriesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /** repeated .prometheus.ChunkedSeries chunked_series = 1; */
+ public Builder addChunkedSeries(
+ int index, Types.ChunkedSeries.Builder builderForValue) {
+ if (chunkedSeriesBuilder_ == null) {
+ ensureChunkedSeriesIsMutable();
+ chunkedSeries_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ chunkedSeriesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /** repeated .prometheus.ChunkedSeries chunked_series = 1; */
+ public Builder addAllChunkedSeries(Iterable extends Types.ChunkedSeries> values) {
+ if (chunkedSeriesBuilder_ == null) {
+ ensureChunkedSeriesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, chunkedSeries_);
+ onChanged();
+ } else {
+ chunkedSeriesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /** repeated .prometheus.ChunkedSeries chunked_series = 1; */
+ public Builder clearChunkedSeries() {
+ if (chunkedSeriesBuilder_ == null) {
+ chunkedSeries_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ chunkedSeriesBuilder_.clear();
+ }
+ return this;
+ }
+
+ /** repeated .prometheus.ChunkedSeries chunked_series = 1; */
+ public Builder removeChunkedSeries(int index) {
+ if (chunkedSeriesBuilder_ == null) {
+ ensureChunkedSeriesIsMutable();
+ chunkedSeries_.remove(index);
+ onChanged();
+ } else {
+ chunkedSeriesBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /** repeated .prometheus.ChunkedSeries chunked_series = 1; */
+ public Types.ChunkedSeries.Builder getChunkedSeriesBuilder(int index) {
+ return getChunkedSeriesFieldBuilder().getBuilder(index);
+ }
+
+ /** repeated .prometheus.ChunkedSeries chunked_series = 1; */
+ public Types.ChunkedSeriesOrBuilder getChunkedSeriesOrBuilder(int index) {
+ if (chunkedSeriesBuilder_ == null) {
+ return chunkedSeries_.get(index);
+ } else {
+ return chunkedSeriesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /** repeated .prometheus.ChunkedSeries chunked_series = 1; */
+ public java.util.List extends Types.ChunkedSeriesOrBuilder>
+ getChunkedSeriesOrBuilderList() {
+ if (chunkedSeriesBuilder_ != null) {
+ return chunkedSeriesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(chunkedSeries_);
+ }
+ }
+
+ /** repeated .prometheus.ChunkedSeries chunked_series = 1; */
+ public Types.ChunkedSeries.Builder addChunkedSeriesBuilder() {
+ return getChunkedSeriesFieldBuilder()
+ .addBuilder(Types.ChunkedSeries.getDefaultInstance());
+ }
+
+ /** repeated .prometheus.ChunkedSeries chunked_series = 1; */
+ public Types.ChunkedSeries.Builder addChunkedSeriesBuilder(int index) {
+ return getChunkedSeriesFieldBuilder()
+ .addBuilder(index, Types.ChunkedSeries.getDefaultInstance());
+ }
+
+ /** repeated .prometheus.ChunkedSeries chunked_series = 1; */
+ public java.util.List
+ * query_index represents an index of the query from ReadRequest.queries these chunks relates to.
+ *
+ *
+ * int64 query_index = 2;
+ *
+ * @return The queryIndex.
+ */
+ @Override
+ public long getQueryIndex() {
+ return queryIndex_;
+ }
+
+ /**
+ *
+ *
+ *
+ * query_index represents an index of the query from ReadRequest.queries these chunks relates to.
+ *
+ *
+ * int64 query_index = 2;
+ *
+ * @param value The queryIndex to set.
+ * @return This builder for chaining.
+ */
+ public Builder setQueryIndex(long value) {
+
+ queryIndex_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * query_index represents an index of the query from ReadRequest.queries these chunks relates to.
+ *
+ *
+ * int64 query_index = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearQueryIndex() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ queryIndex_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ @Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:prometheus.ChunkedReadResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:prometheus.ChunkedReadResponse)
+ private static final Remote.ChunkedReadResponse DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new Remote.ChunkedReadResponse();
+ }
+
+ public static Remote.ChunkedReadResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Represents the metric type, these match the set from Prometheus.
+ * Refer to github.com/prometheus/common/model/metadata.go for details.
+ *
+ *
+ * .prometheus.MetricMetadata.MetricType type = 1;
+ *
+ * @return The enum numeric value on the wire for type.
+ */
+ int getTypeValue();
+
+ /**
+ *
+ *
+ *
+ * Represents the metric type, these match the set from Prometheus.
+ * Refer to github.com/prometheus/common/model/metadata.go for details.
+ *
+ *
+ * .prometheus.MetricMetadata.MetricType type = 1;
+ *
+ * @return The type.
+ */
+ Types.MetricMetadata.MetricType getType();
+
+ /**
+ * string metric_family_name = 2;
+ *
+ * @return The metricFamilyName.
+ */
+ String getMetricFamilyName();
+
+ /**
+ * string metric_family_name = 2;
+ *
+ * @return The bytes for metricFamilyName.
+ */
+ com.google.protobuf.ByteString getMetricFamilyNameBytes();
+
+ /**
+ * string help = 4;
+ *
+ * @return The help.
+ */
+ String getHelp();
+
+ /**
+ * string help = 4;
+ *
+ * @return The bytes for help.
+ */
+ com.google.protobuf.ByteString getHelpBytes();
+
+ /**
+ * string unit = 5;
+ *
+ * @return The unit.
+ */
+ String getUnit();
+
+ /**
+ * string unit = 5;
+ *
+ * @return The bytes for unit.
+ */
+ com.google.protobuf.ByteString getUnitBytes();
+ }
+
+ /** Protobuf type {@code prometheus.MetricMetadata} */
+ public static final class MetricMetadata extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:prometheus.MetricMetadata)
+ MetricMetadataOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ // Use MetricMetadata.newBuilder() to construct.
+ private MetricMetadata(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private MetricMetadata() {
+ type_ = 0;
+ metricFamilyName_ = "";
+ help_ = "";
+ unit_ = "";
+ }
+
+ @Override
+ @SuppressWarnings({"unused"})
+ protected Object newInstance(UnusedPrivateParameter unused) {
+ return new MetricMetadata();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return Types.internal_static_prometheus_MetricMetadata_descriptor;
+ }
+
+ @Override
+ protected FieldAccessorTable internalGetFieldAccessorTable() {
+ return Types.internal_static_prometheus_MetricMetadata_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Types.MetricMetadata.class, Types.MetricMetadata.Builder.class);
+ }
+
+ /** Protobuf enum {@code prometheus.MetricMetadata.MetricType} */
+ public enum MetricType implements com.google.protobuf.ProtocolMessageEnum {
+ /** UNKNOWN = 0; */
+ UNKNOWN(0),
+ /** COUNTER = 1; */
+ COUNTER(1),
+ /** GAUGE = 2; */
+ GAUGE(2),
+ /** HISTOGRAM = 3; */
+ HISTOGRAM(3),
+ /** GAUGEHISTOGRAM = 4; */
+ GAUGEHISTOGRAM(4),
+ /** SUMMARY = 5; */
+ SUMMARY(5),
+ /** INFO = 6; */
+ INFO(6),
+ /** STATESET = 7; */
+ STATESET(7),
+ UNRECOGNIZED(-1),
+ ;
+
+ /** UNKNOWN = 0; */
+ public static final int UNKNOWN_VALUE = 0;
+ /** COUNTER = 1; */
+ public static final int COUNTER_VALUE = 1;
+ /** GAUGE = 2; */
+ public static final int GAUGE_VALUE = 2;
+ /** HISTOGRAM = 3; */
+ public static final int HISTOGRAM_VALUE = 3;
+ /** GAUGEHISTOGRAM = 4; */
+ public static final int GAUGEHISTOGRAM_VALUE = 4;
+ /** SUMMARY = 5; */
+ public static final int SUMMARY_VALUE = 5;
+ /** INFO = 6; */
+ public static final int INFO_VALUE = 6;
+ /** STATESET = 7; */
+ public static final int STATESET_VALUE = 7;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @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 UNKNOWN;
+ case 1:
+ return COUNTER;
+ case 2:
+ return GAUGE;
+ case 3:
+ return HISTOGRAM;
+ case 4:
+ return GAUGEHISTOGRAM;
+ case 5:
+ return SUMMARY;
+ case 6:
+ return INFO;
+ case 7:
+ return STATESET;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap
+ * Represents the metric type, these match the set from Prometheus.
+ * Refer to github.com/prometheus/common/model/metadata.go for details.
+ *
+ *
+ * .prometheus.MetricMetadata.MetricType type = 1;
+ *
+ * @return The enum numeric value on the wire for type.
+ */
+ @Override
+ public int getTypeValue() {
+ return type_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Represents the metric type, these match the set from Prometheus.
+ * Refer to github.com/prometheus/common/model/metadata.go for details.
+ *
+ *
+ * .prometheus.MetricMetadata.MetricType type = 1;
+ *
+ * @return The type.
+ */
+ @Override
+ public Types.MetricMetadata.MetricType getType() {
+ Types.MetricMetadata.MetricType result =
+ Types.MetricMetadata.MetricType.forNumber(type_);
+ return result == null ? Types.MetricMetadata.MetricType.UNRECOGNIZED : result;
+ }
+
+ public static final int METRIC_FAMILY_NAME_FIELD_NUMBER = 2;
+
+ @SuppressWarnings("serial")
+ private volatile Object metricFamilyName_ = "";
+
+ /**
+ * string metric_family_name = 2;
+ *
+ * @return The metricFamilyName.
+ */
+ @Override
+ public String getMetricFamilyName() {
+ Object ref = metricFamilyName_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ metricFamilyName_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * string metric_family_name = 2;
+ *
+ * @return The bytes for metricFamilyName.
+ */
+ @Override
+ public com.google.protobuf.ByteString getMetricFamilyNameBytes() {
+ Object ref = metricFamilyName_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((String) ref);
+ metricFamilyName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int HELP_FIELD_NUMBER = 4;
+
+ @SuppressWarnings("serial")
+ private volatile Object help_ = "";
+
+ /**
+ * string help = 4;
+ *
+ * @return The help.
+ */
+ @Override
+ public String getHelp() {
+ Object ref = help_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ help_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * string help = 4;
+ *
+ * @return The bytes for help.
+ */
+ @Override
+ public com.google.protobuf.ByteString getHelpBytes() {
+ Object ref = help_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((String) ref);
+ help_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int UNIT_FIELD_NUMBER = 5;
+
+ @SuppressWarnings("serial")
+ private volatile Object unit_ = "";
+
+ /**
+ * string unit = 5;
+ *
+ * @return The unit.
+ */
+ @Override
+ public String getUnit() {
+ Object ref = unit_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ unit_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * string unit = 5;
+ *
+ * @return The bytes for unit.
+ */
+ @Override
+ public com.google.protobuf.ByteString getUnitBytes() {
+ Object ref = unit_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((String) ref);
+ unit_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) {
+ return true;
+ }
+ if (isInitialized == 0) {
+ return false;
+ }
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (type_ != Types.MetricMetadata.MetricType.UNKNOWN.getNumber()) {
+ output.writeEnum(1, type_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metricFamilyName_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, metricFamilyName_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(help_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 4, help_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(unit_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, unit_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) {
+ return size;
+ }
+
+ size = 0;
+ if (type_ != Types.MetricMetadata.MetricType.UNKNOWN.getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, type_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metricFamilyName_)) {
+ size +=
+ com.google.protobuf.GeneratedMessageV3.computeStringSize(
+ 2, metricFamilyName_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(help_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, help_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(unit_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, unit_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof Types.MetricMetadata)) {
+ return super.equals(obj);
+ }
+ Types.MetricMetadata other = (Types.MetricMetadata) obj;
+
+ if (type_ != other.type_) {
+ return false;
+ }
+ if (!getMetricFamilyName().equals(other.getMetricFamilyName())) {
+ return false;
+ }
+ if (!getHelp().equals(other.getHelp())) {
+ return false;
+ }
+ if (!getUnit().equals(other.getUnit())) {
+ return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + type_;
+ hash = (37 * hash) + METRIC_FAMILY_NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getMetricFamilyName().hashCode();
+ hash = (37 * hash) + HELP_FIELD_NUMBER;
+ hash = (53 * hash) + getHelp().hashCode();
+ hash = (37 * hash) + UNIT_FIELD_NUMBER;
+ hash = (53 * hash) + getUnit().hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static Types.MetricMetadata parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Types.MetricMetadata parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Types.MetricMetadata parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Types.MetricMetadata parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Types.MetricMetadata parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Types.MetricMetadata parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Types.MetricMetadata parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static Types.MetricMetadata parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static Types.MetricMetadata parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input);
+ }
+
+ public static Types.MetricMetadata parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static Types.MetricMetadata parseFrom(com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static Types.MetricMetadata parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(Types.MetricMetadata prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /** Protobuf type {@code prometheus.MetricMetadata} */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Represents the metric type, these match the set from Prometheus.
+ * Refer to github.com/prometheus/common/model/metadata.go for details.
+ *
+ *
+ * .prometheus.MetricMetadata.MetricType type = 1;
+ *
+ * @return The enum numeric value on the wire for type.
+ */
+ @Override
+ public int getTypeValue() {
+ return type_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Represents the metric type, these match the set from Prometheus.
+ * Refer to github.com/prometheus/common/model/metadata.go for details.
+ *
+ *
+ * .prometheus.MetricMetadata.MetricType type = 1;
+ *
+ * @param value The enum numeric value on the wire for type to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTypeValue(int value) {
+ type_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Represents the metric type, these match the set from Prometheus.
+ * Refer to github.com/prometheus/common/model/metadata.go for details.
+ *
+ *
+ * .prometheus.MetricMetadata.MetricType type = 1;
+ *
+ * @return The type.
+ */
+ @Override
+ public Types.MetricMetadata.MetricType getType() {
+ Types.MetricMetadata.MetricType result =
+ Types.MetricMetadata.MetricType.forNumber(type_);
+ return result == null ? Types.MetricMetadata.MetricType.UNRECOGNIZED : result;
+ }
+
+ /**
+ *
+ *
+ *
+ * Represents the metric type, these match the set from Prometheus.
+ * Refer to github.com/prometheus/common/model/metadata.go for details.
+ *
+ *
+ * .prometheus.MetricMetadata.MetricType type = 1;
+ *
+ * @param value The type to set.
+ * @return This builder for chaining.
+ */
+ public Builder setType(Types.MetricMetadata.MetricType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000001;
+ type_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Represents the metric type, these match the set from Prometheus.
+ * Refer to github.com/prometheus/common/model/metadata.go for details.
+ *
+ *
+ * .prometheus.MetricMetadata.MetricType type = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearType() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ type_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private Object metricFamilyName_ = "";
+
+ /**
+ * string metric_family_name = 2;
+ *
+ * @return The metricFamilyName.
+ */
+ public String getMetricFamilyName() {
+ Object ref = metricFamilyName_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ metricFamilyName_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * string metric_family_name = 2;
+ *
+ * @return The bytes for metricFamilyName.
+ */
+ public com.google.protobuf.ByteString getMetricFamilyNameBytes() {
+ Object ref = metricFamilyName_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((String) ref);
+ metricFamilyName_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * string metric_family_name = 2;
+ *
+ * @param value The metricFamilyName to set.
+ * @return This builder for chaining.
+ */
+ public Builder setMetricFamilyName(String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ metricFamilyName_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * string metric_family_name = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearMetricFamilyName() {
+ metricFamilyName_ = getDefaultInstance().getMetricFamilyName();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+
+ /**
+ * string metric_family_name = 2;
+ *
+ * @param value The bytes for metricFamilyName to set.
+ * @return This builder for chaining.
+ */
+ public Builder setMetricFamilyNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ metricFamilyName_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ private Object help_ = "";
+
+ /**
+ * string help = 4;
+ *
+ * @return The help.
+ */
+ public String getHelp() {
+ Object ref = help_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ help_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * string help = 4;
+ *
+ * @return The bytes for help.
+ */
+ public com.google.protobuf.ByteString getHelpBytes() {
+ Object ref = help_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((String) ref);
+ help_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * string help = 4;
+ *
+ * @param value The help to set.
+ * @return This builder for chaining.
+ */
+ public Builder setHelp(String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ help_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * string help = 4;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearHelp() {
+ help_ = getDefaultInstance().getHelp();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ onChanged();
+ return this;
+ }
+
+ /**
+ * string help = 4;
+ *
+ * @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();
+ }
+ checkByteStringIsUtf8(value);
+ help_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+
+ private Object unit_ = "";
+
+ /**
+ * string unit = 5;
+ *
+ * @return The unit.
+ */
+ public String getUnit() {
+ Object ref = unit_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ unit_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * string unit = 5;
+ *
+ * @return The bytes for unit.
+ */
+ public com.google.protobuf.ByteString getUnitBytes() {
+ Object ref = unit_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((String) ref);
+ unit_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * string unit = 5;
+ *
+ * @param value The unit to set.
+ * @return This builder for chaining.
+ */
+ public Builder setUnit(String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ unit_ = value;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * string unit = 5;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearUnit() {
+ unit_ = getDefaultInstance().getUnit();
+ bitField0_ = (bitField0_ & ~0x00000008);
+ onChanged();
+ return this;
+ }
+
+ /**
+ * string unit = 5;
+ *
+ * @param value The bytes for unit to set.
+ * @return This builder for chaining.
+ */
+ public Builder setUnitBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ unit_ = value;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+
+ @Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:prometheus.MetricMetadata)
+ }
+
+ // @@protoc_insertion_point(class_scope:prometheus.MetricMetadata)
+ private static final Types.MetricMetadata DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new Types.MetricMetadata();
+ }
+
+ public static Types.MetricMetadata getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parserdouble value = 1;
+ *
+ * @return The value.
+ */
+ double getValue();
+
+ /**
+ *
+ *
+ *
+ * timestamp is in ms format, see model/timestamp/timestamp.go for
+ * conversion from time.Time to Prometheus timestamp.
+ *
+ *
+ * int64 timestamp = 2;
+ *
+ * @return The timestamp.
+ */
+ long getTimestamp();
+ }
+
+ /** Protobuf type {@code prometheus.Sample} */
+ public static final class Sample extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:prometheus.Sample)
+ SampleOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ // Use Sample.newBuilder() to construct.
+ private Sample(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private Sample() {}
+
+ @Override
+ @SuppressWarnings({"unused"})
+ protected Object newInstance(UnusedPrivateParameter unused) {
+ return new Sample();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return Types.internal_static_prometheus_Sample_descriptor;
+ }
+
+ @Override
+ protected FieldAccessorTable internalGetFieldAccessorTable() {
+ return Types.internal_static_prometheus_Sample_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Types.Sample.class, Types.Sample.Builder.class);
+ }
+
+ public static final int VALUE_FIELD_NUMBER = 1;
+ private double value_ = 0D;
+
+ /**
+ * double value = 1;
+ *
+ * @return The value.
+ */
+ @Override
+ public double getValue() {
+ return value_;
+ }
+
+ public static final int TIMESTAMP_FIELD_NUMBER = 2;
+ private long timestamp_ = 0L;
+
+ /**
+ *
+ *
+ *
+ * timestamp is in ms format, see model/timestamp/timestamp.go for
+ * conversion from time.Time to Prometheus timestamp.
+ *
+ *
+ * int64 timestamp = 2;
+ *
+ * @return The timestamp.
+ */
+ @Override
+ public long getTimestamp() {
+ return timestamp_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) {
+ return true;
+ }
+ if (isInitialized == 0) {
+ return false;
+ }
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (Double.doubleToRawLongBits(value_) != 0) {
+ output.writeDouble(1, value_);
+ }
+ if (timestamp_ != 0L) {
+ output.writeInt64(2, timestamp_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) {
+ return size;
+ }
+
+ size = 0;
+ if (Double.doubleToRawLongBits(value_) != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeDoubleSize(1, value_);
+ }
+ if (timestamp_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, timestamp_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof Types.Sample)) {
+ return super.equals(obj);
+ }
+ Types.Sample other = (Types.Sample) obj;
+
+ if (Double.doubleToLongBits(getValue()) != Double.doubleToLongBits(other.getValue())) {
+ return false;
+ }
+ if (getTimestamp() != other.getTimestamp()) {
+ return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + VALUE_FIELD_NUMBER;
+ hash =
+ (53 * hash)
+ + com.google.protobuf.Internal.hashLong(
+ Double.doubleToLongBits(getValue()));
+ hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTimestamp());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static Types.Sample parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Types.Sample parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Types.Sample parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Types.Sample parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Types.Sample parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Types.Sample parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Types.Sample parseFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static Types.Sample parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static Types.Sample parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input);
+ }
+
+ public static Types.Sample parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static Types.Sample parseFrom(com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static Types.Sample parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(Types.Sample prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /** Protobuf type {@code prometheus.Sample} */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessageV3.Builderdouble value = 1;
+ *
+ * @return The value.
+ */
+ @Override
+ public double getValue() {
+ return value_;
+ }
+
+ /**
+ * double value = 1;
+ *
+ * @param value The value to set.
+ * @return This builder for chaining.
+ */
+ public Builder setValue(double value) {
+
+ value_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * double value = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearValue() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ value_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private long timestamp_;
+
+ /**
+ *
+ *
+ *
+ * timestamp is in ms format, see model/timestamp/timestamp.go for
+ * conversion from time.Time to Prometheus timestamp.
+ *
+ *
+ * int64 timestamp = 2;
+ *
+ * @return The timestamp.
+ */
+ @Override
+ public long getTimestamp() {
+ return timestamp_;
+ }
+
+ /**
+ *
+ *
+ *
+ * timestamp is in ms format, see model/timestamp/timestamp.go for
+ * conversion from time.Time to Prometheus timestamp.
+ *
+ *
+ * int64 timestamp = 2;
+ *
+ * @param value The timestamp to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTimestamp(long value) {
+
+ timestamp_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * timestamp is in ms format, see model/timestamp/timestamp.go for
+ * conversion from time.Time to Prometheus timestamp.
+ *
+ *
+ * int64 timestamp = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTimestamp() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ timestamp_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ @Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:prometheus.Sample)
+ }
+
+ // @@protoc_insertion_point(class_scope:prometheus.Sample)
+ private static final Types.Sample DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new Types.Sample();
+ }
+
+ public static Types.Sample getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Optional, can be empty.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ java.util.List
+ * Optional, can be empty.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ Types.Label getLabels(int index);
+
+ /**
+ *
+ *
+ *
+ * Optional, can be empty.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ int getLabelsCount();
+
+ /**
+ *
+ *
+ *
+ * Optional, can be empty.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ java.util.List extends Types.LabelOrBuilder> getLabelsOrBuilderList();
+
+ /**
+ *
+ *
+ *
+ * Optional, can be empty.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ Types.LabelOrBuilder getLabelsOrBuilder(int index);
+
+ /**
+ * double value = 2;
+ *
+ * @return The value.
+ */
+ double getValue();
+
+ /**
+ *
+ *
+ *
+ * timestamp is in ms format, see model/timestamp/timestamp.go for
+ * conversion from time.Time to Prometheus timestamp.
+ *
+ *
+ * int64 timestamp = 3;
+ *
+ * @return The timestamp.
+ */
+ long getTimestamp();
+ }
+
+ /** Protobuf type {@code prometheus.Exemplar} */
+ public static final class Exemplar extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:prometheus.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() {
+ labels_ = java.util.Collections.emptyList();
+ }
+
+ @Override
+ @SuppressWarnings({"unused"})
+ protected Object newInstance(UnusedPrivateParameter unused) {
+ return new Exemplar();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return Types.internal_static_prometheus_Exemplar_descriptor;
+ }
+
+ @Override
+ protected FieldAccessorTable internalGetFieldAccessorTable() {
+ return Types.internal_static_prometheus_Exemplar_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ Types.Exemplar.class, Types.Exemplar.Builder.class);
+ }
+
+ public static final int LABELS_FIELD_NUMBER = 1;
+
+ @SuppressWarnings("serial")
+ private java.util.List
+ * Optional, can be empty.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ @Override
+ public java.util.List
+ * Optional, can be empty.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ @Override
+ public java.util.List extends Types.LabelOrBuilder> getLabelsOrBuilderList() {
+ return labels_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional, can be empty.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ @Override
+ public int getLabelsCount() {
+ return labels_.size();
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional, can be empty.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ @Override
+ public Types.Label getLabels(int index) {
+ return labels_.get(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional, can be empty.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ @Override
+ public Types.LabelOrBuilder getLabelsOrBuilder(int index) {
+ return labels_.get(index);
+ }
+
+ public static final int VALUE_FIELD_NUMBER = 2;
+ private double value_ = 0D;
+
+ /**
+ * double value = 2;
+ *
+ * @return The value.
+ */
+ @Override
+ public double getValue() {
+ return value_;
+ }
+
+ public static final int TIMESTAMP_FIELD_NUMBER = 3;
+ private long timestamp_ = 0L;
+
+ /**
+ *
+ *
+ *
+ * timestamp is in ms format, see model/timestamp/timestamp.go for
+ * conversion from time.Time to Prometheus timestamp.
+ *
+ *
+ * int64 timestamp = 3;
+ *
+ * @return The timestamp.
+ */
+ @Override
+ public long getTimestamp() {
+ return timestamp_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) {
+ return true;
+ }
+ if (isInitialized == 0) {
+ return false;
+ }
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ for (int i = 0; i < labels_.size(); i++) {
+ output.writeMessage(1, labels_.get(i));
+ }
+ if (Double.doubleToRawLongBits(value_) != 0) {
+ output.writeDouble(2, value_);
+ }
+ if (timestamp_ != 0L) {
+ output.writeInt64(3, timestamp_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) {
+ return size;
+ }
+
+ size = 0;
+ for (int i = 0; i < labels_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, labels_.get(i));
+ }
+ if (Double.doubleToRawLongBits(value_) != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, value_);
+ }
+ if (timestamp_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, timestamp_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof Types.Exemplar)) {
+ return super.equals(obj);
+ }
+ Types.Exemplar other = (Types.Exemplar) obj;
+
+ if (!getLabelsList().equals(other.getLabelsList())) {
+ return false;
+ }
+ if (Double.doubleToLongBits(getValue()) != Double.doubleToLongBits(other.getValue())) {
+ return false;
+ }
+ if (getTimestamp() != other.getTimestamp()) {
+ return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getLabelsCount() > 0) {
+ hash = (37 * hash) + LABELS_FIELD_NUMBER;
+ hash = (53 * hash) + getLabelsList().hashCode();
+ }
+ hash = (37 * hash) + VALUE_FIELD_NUMBER;
+ hash =
+ (53 * hash)
+ + com.google.protobuf.Internal.hashLong(
+ Double.doubleToLongBits(getValue()));
+ hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTimestamp());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static Types.Exemplar parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Types.Exemplar parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Types.Exemplar parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Types.Exemplar parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Types.Exemplar parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Types.Exemplar parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Types.Exemplar parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static Types.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 Types.Exemplar parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input);
+ }
+
+ public static Types.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 Types.Exemplar parseFrom(com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static Types.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);
+ }
+
+ @Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(Types.Exemplar prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /** Protobuf type {@code prometheus.Exemplar} */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Optional, can be empty.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public java.util.List
+ * Optional, can be empty.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public int getLabelsCount() {
+ if (labelsBuilder_ == null) {
+ return labels_.size();
+ } else {
+ return labelsBuilder_.getCount();
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional, can be empty.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public Types.Label getLabels(int index) {
+ if (labelsBuilder_ == null) {
+ return labels_.get(index);
+ } else {
+ return labelsBuilder_.getMessage(index);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional, can be empty.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public Builder setLabels(int index, Types.Label value) {
+ if (labelsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLabelsIsMutable();
+ labels_.set(index, value);
+ onChanged();
+ } else {
+ labelsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional, can be empty.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public Builder setLabels(int index, Types.Label.Builder builderForValue) {
+ if (labelsBuilder_ == null) {
+ ensureLabelsIsMutable();
+ labels_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ labelsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional, can be empty.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public Builder addLabels(Types.Label value) {
+ if (labelsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLabelsIsMutable();
+ labels_.add(value);
+ onChanged();
+ } else {
+ labelsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional, can be empty.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public Builder addLabels(int index, Types.Label value) {
+ if (labelsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLabelsIsMutable();
+ labels_.add(index, value);
+ onChanged();
+ } else {
+ labelsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional, can be empty.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public Builder addLabels(Types.Label.Builder builderForValue) {
+ if (labelsBuilder_ == null) {
+ ensureLabelsIsMutable();
+ labels_.add(builderForValue.build());
+ onChanged();
+ } else {
+ labelsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional, can be empty.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public Builder addLabels(int index, Types.Label.Builder builderForValue) {
+ if (labelsBuilder_ == null) {
+ ensureLabelsIsMutable();
+ labels_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ labelsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional, can be empty.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public Builder addAllLabels(Iterable extends Types.Label> values) {
+ if (labelsBuilder_ == null) {
+ ensureLabelsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, labels_);
+ onChanged();
+ } else {
+ labelsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional, can be empty.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public Builder clearLabels() {
+ if (labelsBuilder_ == null) {
+ labels_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ labelsBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional, can be empty.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public Builder removeLabels(int index) {
+ if (labelsBuilder_ == null) {
+ ensureLabelsIsMutable();
+ labels_.remove(index);
+ onChanged();
+ } else {
+ labelsBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional, can be empty.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public Types.Label.Builder getLabelsBuilder(int index) {
+ return getLabelsFieldBuilder().getBuilder(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional, can be empty.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public Types.LabelOrBuilder getLabelsOrBuilder(int index) {
+ if (labelsBuilder_ == null) {
+ return labels_.get(index);
+ } else {
+ return labelsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional, can be empty.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public java.util.List extends Types.LabelOrBuilder> getLabelsOrBuilderList() {
+ if (labelsBuilder_ != null) {
+ return labelsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(labels_);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional, can be empty.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public Types.Label.Builder addLabelsBuilder() {
+ return getLabelsFieldBuilder().addBuilder(Types.Label.getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional, can be empty.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public Types.Label.Builder addLabelsBuilder(int index) {
+ return getLabelsFieldBuilder().addBuilder(index, Types.Label.getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ *
+ * Optional, can be empty.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public java.util.Listdouble value = 2;
+ *
+ * @return The value.
+ */
+ @Override
+ public double getValue() {
+ return value_;
+ }
+
+ /**
+ * double value = 2;
+ *
+ * @param value The value to set.
+ * @return This builder for chaining.
+ */
+ public Builder setValue(double value) {
+
+ value_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * double value = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearValue() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ value_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private long timestamp_;
+
+ /**
+ *
+ *
+ *
+ * timestamp is in ms format, see model/timestamp/timestamp.go for
+ * conversion from time.Time to Prometheus timestamp.
+ *
+ *
+ * int64 timestamp = 3;
+ *
+ * @return The timestamp.
+ */
+ @Override
+ public long getTimestamp() {
+ return timestamp_;
+ }
+
+ /**
+ *
+ *
+ *
+ * timestamp is in ms format, see model/timestamp/timestamp.go for
+ * conversion from time.Time to Prometheus timestamp.
+ *
+ *
+ * int64 timestamp = 3;
+ *
+ * @param value The timestamp to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTimestamp(long value) {
+
+ timestamp_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * timestamp is in ms format, see model/timestamp/timestamp.go for
+ * conversion from time.Time to Prometheus timestamp.
+ *
+ *
+ * int64 timestamp = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTimestamp() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ timestamp_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ @Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:prometheus.Exemplar)
+ }
+
+ // @@protoc_insertion_point(class_scope:prometheus.Exemplar)
+ private static final Types.Exemplar DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new Types.Exemplar();
+ }
+
+ public static Types.Exemplar getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parseruint64 count_int = 1;
+ *
+ * @return Whether the countInt field is set.
+ */
+ boolean hasCountInt();
+
+ /**
+ * uint64 count_int = 1;
+ *
+ * @return The countInt.
+ */
+ long getCountInt();
+
+ /**
+ * double count_float = 2;
+ *
+ * @return Whether the countFloat field is set.
+ */
+ boolean hasCountFloat();
+
+ /**
+ * double count_float = 2;
+ *
+ * @return The countFloat.
+ */
+ double getCountFloat();
+
+ /**
+ *
+ *
+ *
+ * Sum of observations in the histogram.
+ *
+ *
+ * double sum = 3;
+ *
+ * @return The sum.
+ */
+ double getSum();
+
+ /**
+ *
+ *
+ *
+ * The 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.
+ *
+ *
+ * sint32 schema = 4;
+ *
+ * @return The schema.
+ */
+ int getSchema();
+
+ /**
+ *
+ *
+ *
+ * Breadth of the zero bucket.
+ *
+ *
+ * double zero_threshold = 5;
+ *
+ * @return The zeroThreshold.
+ */
+ double getZeroThreshold();
+
+ /**
+ * uint64 zero_count_int = 6;
+ *
+ * @return Whether the zeroCountInt field is set.
+ */
+ boolean hasZeroCountInt();
+
+ /**
+ * uint64 zero_count_int = 6;
+ *
+ * @return The zeroCountInt.
+ */
+ long getZeroCountInt();
+
+ /**
+ * double zero_count_float = 7;
+ *
+ * @return Whether the zeroCountFloat field is set.
+ */
+ boolean hasZeroCountFloat();
+
+ /**
+ * double zero_count_float = 7;
+ *
+ * @return The zeroCountFloat.
+ */
+ double getZeroCountFloat();
+
+ /**
+ *
+ *
+ *
+ * Negative Buckets.
+ *
+ *
+ * repeated .prometheus.BucketSpan negative_spans = 8 [(.gogoproto.nullable) = false];
+ *
+ */
+ java.util.List
+ * Negative Buckets.
+ *
+ *
+ * repeated .prometheus.BucketSpan negative_spans = 8 [(.gogoproto.nullable) = false];
+ *
+ */
+ Types.BucketSpan getNegativeSpans(int index);
+
+ /**
+ *
+ *
+ *
+ * Negative Buckets.
+ *
+ *
+ * repeated .prometheus.BucketSpan negative_spans = 8 [(.gogoproto.nullable) = false];
+ *
+ */
+ int getNegativeSpansCount();
+
+ /**
+ *
+ *
+ *
+ * Negative Buckets.
+ *
+ *
+ * repeated .prometheus.BucketSpan negative_spans = 8 [(.gogoproto.nullable) = false];
+ *
+ */
+ java.util.List extends Types.BucketSpanOrBuilder> getNegativeSpansOrBuilderList();
+
+ /**
+ *
+ *
+ *
+ * Negative Buckets.
+ *
+ *
+ * repeated .prometheus.BucketSpan negative_spans = 8 [(.gogoproto.nullable) = false];
+ *
+ */
+ Types.BucketSpanOrBuilder getNegativeSpansOrBuilder(int index);
+
+ /**
+ *
+ *
+ *
+ * Use either "negative_deltas" or "negative_counts", the former for
+ * regular histograms with integer counts, the latter for float
+ * histograms.
+ *
+ *
+ * repeated sint64 negative_deltas = 9;
+ *
+ * @return A list containing the negativeDeltas.
+ */
+ java.util.List
+ * Use either "negative_deltas" or "negative_counts", the former for
+ * regular histograms with integer counts, the latter for float
+ * histograms.
+ *
+ *
+ * repeated sint64 negative_deltas = 9;
+ *
+ * @return The count of negativeDeltas.
+ */
+ int getNegativeDeltasCount();
+
+ /**
+ *
+ *
+ *
+ * Use either "negative_deltas" or "negative_counts", the former for
+ * regular histograms with integer counts, the latter for float
+ * histograms.
+ *
+ *
+ * repeated sint64 negative_deltas = 9;
+ *
+ * @param index The index of the element to return.
+ * @return The negativeDeltas at the given index.
+ */
+ long getNegativeDeltas(int index);
+
+ /**
+ *
+ *
+ *
+ * Absolute count of each bucket.
+ *
+ *
+ * repeated double negative_counts = 10;
+ *
+ * @return A list containing the negativeCounts.
+ */
+ java.util.List
+ * Absolute count of each bucket.
+ *
+ *
+ * repeated double negative_counts = 10;
+ *
+ * @return The count of negativeCounts.
+ */
+ int getNegativeCountsCount();
+
+ /**
+ *
+ *
+ *
+ * Absolute count of each bucket.
+ *
+ *
+ * repeated double negative_counts = 10;
+ *
+ * @param index The index of the element to return.
+ * @return The negativeCounts at the given index.
+ */
+ double getNegativeCounts(int index);
+
+ /**
+ *
+ *
+ *
+ * Positive Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan positive_spans = 11 [(.gogoproto.nullable) = false];
+ *
+ */
+ java.util.List
+ * Positive Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan positive_spans = 11 [(.gogoproto.nullable) = false];
+ *
+ */
+ Types.BucketSpan getPositiveSpans(int index);
+
+ /**
+ *
+ *
+ *
+ * Positive Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan positive_spans = 11 [(.gogoproto.nullable) = false];
+ *
+ */
+ int getPositiveSpansCount();
+
+ /**
+ *
+ *
+ *
+ * Positive Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan positive_spans = 11 [(.gogoproto.nullable) = false];
+ *
+ */
+ java.util.List extends Types.BucketSpanOrBuilder> getPositiveSpansOrBuilderList();
+
+ /**
+ *
+ *
+ *
+ * Positive Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan positive_spans = 11 [(.gogoproto.nullable) = false];
+ *
+ */
+ Types.BucketSpanOrBuilder getPositiveSpansOrBuilder(int index);
+
+ /**
+ *
+ *
+ *
+ * Use either "positive_deltas" or "positive_counts", the former for
+ * regular histograms with integer counts, the latter for float
+ * histograms.
+ *
+ *
+ * repeated sint64 positive_deltas = 12;
+ *
+ * @return A list containing the positiveDeltas.
+ */
+ java.util.List
+ * Use either "positive_deltas" or "positive_counts", the former for
+ * regular histograms with integer counts, the latter for float
+ * histograms.
+ *
+ *
+ * repeated sint64 positive_deltas = 12;
+ *
+ * @return The count of positiveDeltas.
+ */
+ int getPositiveDeltasCount();
+
+ /**
+ *
+ *
+ *
+ * Use either "positive_deltas" or "positive_counts", the former for
+ * regular histograms with integer counts, the latter for float
+ * histograms.
+ *
+ *
+ * repeated sint64 positive_deltas = 12;
+ *
+ * @param index The index of the element to return.
+ * @return The positiveDeltas at the given index.
+ */
+ long getPositiveDeltas(int index);
+
+ /**
+ *
+ *
+ *
+ * Absolute count of each bucket.
+ *
+ *
+ * repeated double positive_counts = 13;
+ *
+ * @return A list containing the positiveCounts.
+ */
+ java.util.List
+ * Absolute count of each bucket.
+ *
+ *
+ * repeated double positive_counts = 13;
+ *
+ * @return The count of positiveCounts.
+ */
+ int getPositiveCountsCount();
+
+ /**
+ *
+ *
+ *
+ * Absolute count of each bucket.
+ *
+ *
+ * repeated double positive_counts = 13;
+ *
+ * @param index The index of the element to return.
+ * @return The positiveCounts at the given index.
+ */
+ double getPositiveCounts(int index);
+
+ /**
+ * .prometheus.Histogram.ResetHint reset_hint = 14;
+ *
+ * @return The enum numeric value on the wire for resetHint.
+ */
+ int getResetHintValue();
+
+ /**
+ * .prometheus.Histogram.ResetHint reset_hint = 14;
+ *
+ * @return The resetHint.
+ */
+ Types.Histogram.ResetHint getResetHint();
+
+ /**
+ *
+ *
+ *
+ * timestamp is in ms format, see model/timestamp/timestamp.go for
+ * conversion from time.Time to Prometheus timestamp.
+ *
+ *
+ * int64 timestamp = 15;
+ *
+ * @return The timestamp.
+ */
+ long getTimestamp();
+
+ Types.Histogram.CountCase getCountCase();
+
+ Types.Histogram.ZeroCountCase getZeroCountCase();
+ }
+
+ /**
+ *
+ *
+ *
+ * A native histogram, also known as a sparse histogram.
+ * Original design doc:
+ * https://docs.google.com/document/d/1cLNv3aufPZb3fNfaJgdaRBZsInZKKIHo9E6HinJVbpM/edit
+ * The appendix of this design doc also explains the concept of float
+ * histograms. This Histogram message can represent both, the usual
+ * integer histogram as well as a float histogram.
+ *
+ *
+ *
+ * Need to test for a counter reset explicitly.
+ *
+ *
+ * UNKNOWN = 0;
+ */
+ UNKNOWN(0),
+ /**
+ *
+ *
+ *
+ * This is the 1st histogram after a counter reset.
+ *
+ *
+ * YES = 1;
+ */
+ YES(1),
+ /**
+ *
+ *
+ *
+ * There was no counter reset between this and the previous Histogram.
+ *
+ *
+ * NO = 2;
+ */
+ NO(2),
+ /**
+ *
+ *
+ *
+ * This is a gauge histogram where counter resets don't happen.
+ *
+ *
+ * GAUGE = 3;
+ */
+ GAUGE(3),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ *
+ * Need to test for a counter reset explicitly.
+ *
+ *
+ * UNKNOWN = 0;
+ */
+ public static final int UNKNOWN_VALUE = 0;
+ /**
+ *
+ *
+ *
+ * This is the 1st histogram after a counter reset.
+ *
+ *
+ * YES = 1;
+ */
+ public static final int YES_VALUE = 1;
+ /**
+ *
+ *
+ *
+ * There was no counter reset between this and the previous Histogram.
+ *
+ *
+ * NO = 2;
+ */
+ public static final int NO_VALUE = 2;
+ /**
+ *
+ *
+ *
+ * This is a gauge histogram where counter resets don't happen.
+ *
+ *
+ * GAUGE = 3;
+ */
+ public static final int GAUGE_VALUE = 3;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @Deprecated
+ public static ResetHint 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 ResetHint forNumber(int value) {
+ switch (value) {
+ case 0:
+ return UNKNOWN;
+ case 1:
+ return YES;
+ case 2:
+ return NO;
+ case 3:
+ return GAUGE;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMapuint64 count_int = 1;
+ *
+ * @return Whether the countInt field is set.
+ */
+ @Override
+ public boolean hasCountInt() {
+ return countCase_ == 1;
+ }
+
+ /**
+ * uint64 count_int = 1;
+ *
+ * @return The countInt.
+ */
+ @Override
+ public long getCountInt() {
+ if (countCase_ == 1) {
+ return (Long) count_;
+ }
+ return 0L;
+ }
+
+ public static final int COUNT_FLOAT_FIELD_NUMBER = 2;
+
+ /**
+ * double count_float = 2;
+ *
+ * @return Whether the countFloat field is set.
+ */
+ @Override
+ public boolean hasCountFloat() {
+ return countCase_ == 2;
+ }
+
+ /**
+ * double count_float = 2;
+ *
+ * @return The countFloat.
+ */
+ @Override
+ public double getCountFloat() {
+ if (countCase_ == 2) {
+ return (Double) count_;
+ }
+ return 0D;
+ }
+
+ public static final int SUM_FIELD_NUMBER = 3;
+ private double sum_ = 0D;
+
+ /**
+ *
+ *
+ *
+ * Sum of observations in the histogram.
+ *
+ *
+ * double sum = 3;
+ *
+ * @return The sum.
+ */
+ @Override
+ public double getSum() {
+ return sum_;
+ }
+
+ public static final int SCHEMA_FIELD_NUMBER = 4;
+ private int schema_ = 0;
+
+ /**
+ *
+ *
+ *
+ * The 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.
+ *
+ *
+ * sint32 schema = 4;
+ *
+ * @return The schema.
+ */
+ @Override
+ public int getSchema() {
+ return schema_;
+ }
+
+ public static final int ZERO_THRESHOLD_FIELD_NUMBER = 5;
+ private double zeroThreshold_ = 0D;
+
+ /**
+ *
+ *
+ *
+ * Breadth of the zero bucket.
+ *
+ *
+ * double zero_threshold = 5;
+ *
+ * @return The zeroThreshold.
+ */
+ @Override
+ public double getZeroThreshold() {
+ return zeroThreshold_;
+ }
+
+ public static final int ZERO_COUNT_INT_FIELD_NUMBER = 6;
+
+ /**
+ * uint64 zero_count_int = 6;
+ *
+ * @return Whether the zeroCountInt field is set.
+ */
+ @Override
+ public boolean hasZeroCountInt() {
+ return zeroCountCase_ == 6;
+ }
+
+ /**
+ * uint64 zero_count_int = 6;
+ *
+ * @return The zeroCountInt.
+ */
+ @Override
+ public long getZeroCountInt() {
+ if (zeroCountCase_ == 6) {
+ return (Long) zeroCount_;
+ }
+ return 0L;
+ }
+
+ public static final int ZERO_COUNT_FLOAT_FIELD_NUMBER = 7;
+
+ /**
+ * double zero_count_float = 7;
+ *
+ * @return Whether the zeroCountFloat field is set.
+ */
+ @Override
+ public boolean hasZeroCountFloat() {
+ return zeroCountCase_ == 7;
+ }
+
+ /**
+ * double zero_count_float = 7;
+ *
+ * @return The zeroCountFloat.
+ */
+ @Override
+ public double getZeroCountFloat() {
+ if (zeroCountCase_ == 7) {
+ return (Double) zeroCount_;
+ }
+ return 0D;
+ }
+
+ public static final int NEGATIVE_SPANS_FIELD_NUMBER = 8;
+
+ @SuppressWarnings("serial")
+ private java.util.List
+ * Negative Buckets.
+ *
+ *
+ * repeated .prometheus.BucketSpan negative_spans = 8 [(.gogoproto.nullable) = false];
+ *
+ */
+ @Override
+ public java.util.List
+ * Negative Buckets.
+ *
+ *
+ * repeated .prometheus.BucketSpan negative_spans = 8 [(.gogoproto.nullable) = false];
+ *
+ */
+ @Override
+ public java.util.List extends Types.BucketSpanOrBuilder> getNegativeSpansOrBuilderList() {
+ return negativeSpans_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Negative Buckets.
+ *
+ *
+ * repeated .prometheus.BucketSpan negative_spans = 8 [(.gogoproto.nullable) = false];
+ *
+ */
+ @Override
+ public int getNegativeSpansCount() {
+ return negativeSpans_.size();
+ }
+
+ /**
+ *
+ *
+ *
+ * Negative Buckets.
+ *
+ *
+ * repeated .prometheus.BucketSpan negative_spans = 8 [(.gogoproto.nullable) = false];
+ *
+ */
+ @Override
+ public Types.BucketSpan getNegativeSpans(int index) {
+ return negativeSpans_.get(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * Negative Buckets.
+ *
+ *
+ * repeated .prometheus.BucketSpan negative_spans = 8 [(.gogoproto.nullable) = false];
+ *
+ */
+ @Override
+ public Types.BucketSpanOrBuilder getNegativeSpansOrBuilder(int index) {
+ return negativeSpans_.get(index);
+ }
+
+ public static final int NEGATIVE_DELTAS_FIELD_NUMBER = 9;
+
+ @SuppressWarnings("serial")
+ private com.google.protobuf.Internal.LongList negativeDeltas_ = emptyLongList();
+
+ /**
+ *
+ *
+ *
+ * Use either "negative_deltas" or "negative_counts", the former for
+ * regular histograms with integer counts, the latter for float
+ * histograms.
+ *
+ *
+ * repeated sint64 negative_deltas = 9;
+ *
+ * @return A list containing the negativeDeltas.
+ */
+ @Override
+ public java.util.List
+ * Use either "negative_deltas" or "negative_counts", the former for
+ * regular histograms with integer counts, the latter for float
+ * histograms.
+ *
+ *
+ * repeated sint64 negative_deltas = 9;
+ *
+ * @return The count of negativeDeltas.
+ */
+ public int getNegativeDeltasCount() {
+ return negativeDeltas_.size();
+ }
+
+ /**
+ *
+ *
+ *
+ * Use either "negative_deltas" or "negative_counts", the former for
+ * regular histograms with integer counts, the latter for float
+ * histograms.
+ *
+ *
+ * repeated sint64 negative_deltas = 9;
+ *
+ * @param index The index of the element to return.
+ * @return The negativeDeltas at the given index.
+ */
+ public long getNegativeDeltas(int index) {
+ return negativeDeltas_.getLong(index);
+ }
+
+ private int negativeDeltasMemoizedSerializedSize = -1;
+
+ public static final int NEGATIVE_COUNTS_FIELD_NUMBER = 10;
+
+ @SuppressWarnings("serial")
+ private com.google.protobuf.Internal.DoubleList negativeCounts_ = emptyDoubleList();
+
+ /**
+ *
+ *
+ *
+ * Absolute count of each bucket.
+ *
+ *
+ * repeated double negative_counts = 10;
+ *
+ * @return A list containing the negativeCounts.
+ */
+ @Override
+ public java.util.List
+ * Absolute count of each bucket.
+ *
+ *
+ * repeated double negative_counts = 10;
+ *
+ * @return The count of negativeCounts.
+ */
+ public int getNegativeCountsCount() {
+ return negativeCounts_.size();
+ }
+
+ /**
+ *
+ *
+ *
+ * Absolute count of each bucket.
+ *
+ *
+ * repeated double negative_counts = 10;
+ *
+ * @param index The index of the element to return.
+ * @return The negativeCounts at the given index.
+ */
+ public double getNegativeCounts(int index) {
+ return negativeCounts_.getDouble(index);
+ }
+
+ private int negativeCountsMemoizedSerializedSize = -1;
+
+ public static final int POSITIVE_SPANS_FIELD_NUMBER = 11;
+
+ @SuppressWarnings("serial")
+ private java.util.List
+ * Positive Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan positive_spans = 11 [(.gogoproto.nullable) = false];
+ *
+ */
+ @Override
+ public java.util.List
+ * Positive Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan positive_spans = 11 [(.gogoproto.nullable) = false];
+ *
+ */
+ @Override
+ public java.util.List extends Types.BucketSpanOrBuilder> getPositiveSpansOrBuilderList() {
+ return positiveSpans_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Positive Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan positive_spans = 11 [(.gogoproto.nullable) = false];
+ *
+ */
+ @Override
+ public int getPositiveSpansCount() {
+ return positiveSpans_.size();
+ }
+
+ /**
+ *
+ *
+ *
+ * Positive Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan positive_spans = 11 [(.gogoproto.nullable) = false];
+ *
+ */
+ @Override
+ public Types.BucketSpan getPositiveSpans(int index) {
+ return positiveSpans_.get(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * Positive Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan positive_spans = 11 [(.gogoproto.nullable) = false];
+ *
+ */
+ @Override
+ public Types.BucketSpanOrBuilder getPositiveSpansOrBuilder(int index) {
+ return positiveSpans_.get(index);
+ }
+
+ public static final int POSITIVE_DELTAS_FIELD_NUMBER = 12;
+
+ @SuppressWarnings("serial")
+ private com.google.protobuf.Internal.LongList positiveDeltas_ = emptyLongList();
+
+ /**
+ *
+ *
+ *
+ * Use either "positive_deltas" or "positive_counts", the former for
+ * regular histograms with integer counts, the latter for float
+ * histograms.
+ *
+ *
+ * repeated sint64 positive_deltas = 12;
+ *
+ * @return A list containing the positiveDeltas.
+ */
+ @Override
+ public java.util.List
+ * Use either "positive_deltas" or "positive_counts", the former for
+ * regular histograms with integer counts, the latter for float
+ * histograms.
+ *
+ *
+ * repeated sint64 positive_deltas = 12;
+ *
+ * @return The count of positiveDeltas.
+ */
+ public int getPositiveDeltasCount() {
+ return positiveDeltas_.size();
+ }
+
+ /**
+ *
+ *
+ *
+ * Use either "positive_deltas" or "positive_counts", the former for
+ * regular histograms with integer counts, the latter for float
+ * histograms.
+ *
+ *
+ * repeated sint64 positive_deltas = 12;
+ *
+ * @param index The index of the element to return.
+ * @return The positiveDeltas at the given index.
+ */
+ public long getPositiveDeltas(int index) {
+ return positiveDeltas_.getLong(index);
+ }
+
+ private int positiveDeltasMemoizedSerializedSize = -1;
+
+ public static final int POSITIVE_COUNTS_FIELD_NUMBER = 13;
+
+ @SuppressWarnings("serial")
+ private com.google.protobuf.Internal.DoubleList positiveCounts_ = emptyDoubleList();
+
+ /**
+ *
+ *
+ *
+ * Absolute count of each bucket.
+ *
+ *
+ * repeated double positive_counts = 13;
+ *
+ * @return A list containing the positiveCounts.
+ */
+ @Override
+ public java.util.List
+ * Absolute count of each bucket.
+ *
+ *
+ * repeated double positive_counts = 13;
+ *
+ * @return The count of positiveCounts.
+ */
+ public int getPositiveCountsCount() {
+ return positiveCounts_.size();
+ }
+
+ /**
+ *
+ *
+ *
+ * Absolute count of each bucket.
+ *
+ *
+ * repeated double positive_counts = 13;
+ *
+ * @param index The index of the element to return.
+ * @return The positiveCounts at the given index.
+ */
+ public double getPositiveCounts(int index) {
+ return positiveCounts_.getDouble(index);
+ }
+
+ private int positiveCountsMemoizedSerializedSize = -1;
+
+ public static final int RESET_HINT_FIELD_NUMBER = 14;
+ private int resetHint_ = 0;
+
+ /**
+ * .prometheus.Histogram.ResetHint reset_hint = 14;
+ *
+ * @return The enum numeric value on the wire for resetHint.
+ */
+ @Override
+ public int getResetHintValue() {
+ return resetHint_;
+ }
+
+ /**
+ * .prometheus.Histogram.ResetHint reset_hint = 14;
+ *
+ * @return The resetHint.
+ */
+ @Override
+ public Types.Histogram.ResetHint getResetHint() {
+ Types.Histogram.ResetHint result = Types.Histogram.ResetHint.forNumber(resetHint_);
+ return result == null ? Types.Histogram.ResetHint.UNRECOGNIZED : result;
+ }
+
+ public static final int TIMESTAMP_FIELD_NUMBER = 15;
+ private long timestamp_ = 0L;
+
+ /**
+ *
+ *
+ *
+ * timestamp is in ms format, see model/timestamp/timestamp.go for
+ * conversion from time.Time to Prometheus timestamp.
+ *
+ *
+ * int64 timestamp = 15;
+ *
+ * @return The timestamp.
+ */
+ @Override
+ public long getTimestamp() {
+ return timestamp_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) {
+ return true;
+ }
+ if (isInitialized == 0) {
+ return false;
+ }
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ getSerializedSize();
+ if (countCase_ == 1) {
+ output.writeUInt64(1, (long) ((Long) count_));
+ }
+ if (countCase_ == 2) {
+ output.writeDouble(2, (double) ((Double) count_));
+ }
+ if (Double.doubleToRawLongBits(sum_) != 0) {
+ output.writeDouble(3, sum_);
+ }
+ if (schema_ != 0) {
+ output.writeSInt32(4, schema_);
+ }
+ if (Double.doubleToRawLongBits(zeroThreshold_) != 0) {
+ output.writeDouble(5, zeroThreshold_);
+ }
+ if (zeroCountCase_ == 6) {
+ output.writeUInt64(6, (long) ((Long) zeroCount_));
+ }
+ if (zeroCountCase_ == 7) {
+ output.writeDouble(7, (double) ((Double) zeroCount_));
+ }
+ for (int i = 0; i < negativeSpans_.size(); i++) {
+ output.writeMessage(8, negativeSpans_.get(i));
+ }
+ if (getNegativeDeltasList().size() > 0) {
+ output.writeUInt32NoTag(74);
+ output.writeUInt32NoTag(negativeDeltasMemoizedSerializedSize);
+ }
+ for (int i = 0; i < negativeDeltas_.size(); i++) {
+ output.writeSInt64NoTag(negativeDeltas_.getLong(i));
+ }
+ if (getNegativeCountsList().size() > 0) {
+ output.writeUInt32NoTag(82);
+ output.writeUInt32NoTag(negativeCountsMemoizedSerializedSize);
+ }
+ for (int i = 0; i < negativeCounts_.size(); i++) {
+ output.writeDoubleNoTag(negativeCounts_.getDouble(i));
+ }
+ for (int i = 0; i < positiveSpans_.size(); i++) {
+ output.writeMessage(11, positiveSpans_.get(i));
+ }
+ if (getPositiveDeltasList().size() > 0) {
+ output.writeUInt32NoTag(98);
+ output.writeUInt32NoTag(positiveDeltasMemoizedSerializedSize);
+ }
+ for (int i = 0; i < positiveDeltas_.size(); i++) {
+ output.writeSInt64NoTag(positiveDeltas_.getLong(i));
+ }
+ if (getPositiveCountsList().size() > 0) {
+ output.writeUInt32NoTag(106);
+ output.writeUInt32NoTag(positiveCountsMemoizedSerializedSize);
+ }
+ for (int i = 0; i < positiveCounts_.size(); i++) {
+ output.writeDoubleNoTag(positiveCounts_.getDouble(i));
+ }
+ if (resetHint_ != Types.Histogram.ResetHint.UNKNOWN.getNumber()) {
+ output.writeEnum(14, resetHint_);
+ }
+ if (timestamp_ != 0L) {
+ output.writeInt64(15, timestamp_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) {
+ return size;
+ }
+
+ size = 0;
+ if (countCase_ == 1) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeUInt64Size(
+ 1, (long) ((Long) count_));
+ }
+ if (countCase_ == 2) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeDoubleSize(
+ 2, (double) ((Double) count_));
+ }
+ if (Double.doubleToRawLongBits(sum_) != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeDoubleSize(3, sum_);
+ }
+ if (schema_ != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeSInt32Size(4, schema_);
+ }
+ if (Double.doubleToRawLongBits(zeroThreshold_) != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeDoubleSize(5, zeroThreshold_);
+ }
+ if (zeroCountCase_ == 6) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeUInt64Size(
+ 6, (long) ((Long) zeroCount_));
+ }
+ if (zeroCountCase_ == 7) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeDoubleSize(
+ 7, (double) ((Double) zeroCount_));
+ }
+ for (int i = 0; i < negativeSpans_.size(); i++) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 8, negativeSpans_.get(i));
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < negativeDeltas_.size(); i++) {
+ dataSize +=
+ com.google.protobuf.CodedOutputStream.computeSInt64SizeNoTag(
+ negativeDeltas_.getLong(i));
+ }
+ size += dataSize;
+ if (!getNegativeDeltasList().isEmpty()) {
+ size += 1;
+ size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
+ }
+ negativeDeltasMemoizedSerializedSize = dataSize;
+ }
+ {
+ int dataSize = 0;
+ dataSize = 8 * getNegativeCountsList().size();
+ size += dataSize;
+ if (!getNegativeCountsList().isEmpty()) {
+ size += 1;
+ size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
+ }
+ negativeCountsMemoizedSerializedSize = dataSize;
+ }
+ for (int i = 0; i < positiveSpans_.size(); i++) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 11, positiveSpans_.get(i));
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < positiveDeltas_.size(); i++) {
+ dataSize +=
+ com.google.protobuf.CodedOutputStream.computeSInt64SizeNoTag(
+ positiveDeltas_.getLong(i));
+ }
+ size += dataSize;
+ if (!getPositiveDeltasList().isEmpty()) {
+ size += 1;
+ size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
+ }
+ positiveDeltasMemoizedSerializedSize = dataSize;
+ }
+ {
+ int dataSize = 0;
+ dataSize = 8 * getPositiveCountsList().size();
+ size += dataSize;
+ if (!getPositiveCountsList().isEmpty()) {
+ size += 1;
+ size += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(dataSize);
+ }
+ positiveCountsMemoizedSerializedSize = dataSize;
+ }
+ if (resetHint_ != Types.Histogram.ResetHint.UNKNOWN.getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(14, resetHint_);
+ }
+ if (timestamp_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(15, timestamp_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof Types.Histogram)) {
+ return super.equals(obj);
+ }
+ Types.Histogram other = (Types.Histogram) obj;
+
+ if (Double.doubleToLongBits(getSum()) != Double.doubleToLongBits(other.getSum())) {
+ return false;
+ }
+ if (getSchema() != other.getSchema()) {
+ return false;
+ }
+ if (Double.doubleToLongBits(getZeroThreshold())
+ != Double.doubleToLongBits(other.getZeroThreshold())) {
+ return false;
+ }
+ if (!getNegativeSpansList().equals(other.getNegativeSpansList())) {
+ return false;
+ }
+ if (!getNegativeDeltasList().equals(other.getNegativeDeltasList())) {
+ return false;
+ }
+ if (!getNegativeCountsList().equals(other.getNegativeCountsList())) {
+ return false;
+ }
+ if (!getPositiveSpansList().equals(other.getPositiveSpansList())) {
+ return false;
+ }
+ if (!getPositiveDeltasList().equals(other.getPositiveDeltasList())) {
+ return false;
+ }
+ if (!getPositiveCountsList().equals(other.getPositiveCountsList())) {
+ return false;
+ }
+ if (resetHint_ != other.resetHint_) {
+ return false;
+ }
+ if (getTimestamp() != other.getTimestamp()) {
+ return false;
+ }
+ if (!getCountCase().equals(other.getCountCase())) {
+ return false;
+ }
+ switch (countCase_) {
+ case 1:
+ if (getCountInt() != other.getCountInt()) {
+ return false;
+ }
+ break;
+ case 2:
+ if (Double.doubleToLongBits(getCountFloat())
+ != Double.doubleToLongBits(other.getCountFloat())) {
+ return false;
+ }
+ break;
+ case 0:
+ default:
+ }
+ if (!getZeroCountCase().equals(other.getZeroCountCase())) {
+ return false;
+ }
+ switch (zeroCountCase_) {
+ case 6:
+ if (getZeroCountInt() != other.getZeroCountInt()) {
+ return false;
+ }
+ break;
+ case 7:
+ if (Double.doubleToLongBits(getZeroCountFloat())
+ != Double.doubleToLongBits(other.getZeroCountFloat())) {
+ return false;
+ }
+ break;
+ case 0:
+ default:
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + SUM_FIELD_NUMBER;
+ hash =
+ (53 * hash)
+ + com.google.protobuf.Internal.hashLong(
+ Double.doubleToLongBits(getSum()));
+ hash = (37 * hash) + SCHEMA_FIELD_NUMBER;
+ hash = (53 * hash) + getSchema();
+ hash = (37 * hash) + ZERO_THRESHOLD_FIELD_NUMBER;
+ hash =
+ (53 * hash)
+ + com.google.protobuf.Internal.hashLong(
+ Double.doubleToLongBits(getZeroThreshold()));
+ if (getNegativeSpansCount() > 0) {
+ hash = (37 * hash) + NEGATIVE_SPANS_FIELD_NUMBER;
+ hash = (53 * hash) + getNegativeSpansList().hashCode();
+ }
+ if (getNegativeDeltasCount() > 0) {
+ hash = (37 * hash) + NEGATIVE_DELTAS_FIELD_NUMBER;
+ hash = (53 * hash) + getNegativeDeltasList().hashCode();
+ }
+ if (getNegativeCountsCount() > 0) {
+ hash = (37 * hash) + NEGATIVE_COUNTS_FIELD_NUMBER;
+ hash = (53 * hash) + getNegativeCountsList().hashCode();
+ }
+ if (getPositiveSpansCount() > 0) {
+ hash = (37 * hash) + POSITIVE_SPANS_FIELD_NUMBER;
+ hash = (53 * hash) + getPositiveSpansList().hashCode();
+ }
+ if (getPositiveDeltasCount() > 0) {
+ hash = (37 * hash) + POSITIVE_DELTAS_FIELD_NUMBER;
+ hash = (53 * hash) + getPositiveDeltasList().hashCode();
+ }
+ if (getPositiveCountsCount() > 0) {
+ hash = (37 * hash) + POSITIVE_COUNTS_FIELD_NUMBER;
+ hash = (53 * hash) + getPositiveCountsList().hashCode();
+ }
+ hash = (37 * hash) + RESET_HINT_FIELD_NUMBER;
+ hash = (53 * hash) + resetHint_;
+ hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getTimestamp());
+ switch (countCase_) {
+ case 1:
+ hash = (37 * hash) + COUNT_INT_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCountInt());
+ break;
+ case 2:
+ hash = (37 * hash) + COUNT_FLOAT_FIELD_NUMBER;
+ hash =
+ (53 * hash)
+ + com.google.protobuf.Internal.hashLong(
+ Double.doubleToLongBits(getCountFloat()));
+ break;
+ case 0:
+ default:
+ }
+ switch (zeroCountCase_) {
+ case 6:
+ hash = (37 * hash) + ZERO_COUNT_INT_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getZeroCountInt());
+ break;
+ case 7:
+ hash = (37 * hash) + ZERO_COUNT_FLOAT_FIELD_NUMBER;
+ hash =
+ (53 * hash)
+ + com.google.protobuf.Internal.hashLong(
+ Double.doubleToLongBits(getZeroCountFloat()));
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static Types.Histogram parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Types.Histogram parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Types.Histogram parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Types.Histogram parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Types.Histogram parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Types.Histogram parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Types.Histogram parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static Types.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 Types.Histogram parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input);
+ }
+
+ public static Types.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 Types.Histogram parseFrom(com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static Types.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);
+ }
+
+ @Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(Types.Histogram prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ *
+ *
+ *
+ * A native histogram, also known as a sparse histogram.
+ * Original design doc:
+ * https://docs.google.com/document/d/1cLNv3aufPZb3fNfaJgdaRBZsInZKKIHo9E6HinJVbpM/edit
+ * The appendix of this design doc also explains the concept of float
+ * histograms. This Histogram message can represent both, the usual
+ * integer histogram as well as a float histogram.
+ *
+ *
+ * uint64 count_int = 1;
+ *
+ * @return Whether the countInt field is set.
+ */
+ public boolean hasCountInt() {
+ return countCase_ == 1;
+ }
+
+ /**
+ * uint64 count_int = 1;
+ *
+ * @return The countInt.
+ */
+ public long getCountInt() {
+ if (countCase_ == 1) {
+ return (Long) count_;
+ }
+ return 0L;
+ }
+
+ /**
+ * uint64 count_int = 1;
+ *
+ * @param value The countInt to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCountInt(long value) {
+
+ countCase_ = 1;
+ count_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * uint64 count_int = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearCountInt() {
+ if (countCase_ == 1) {
+ countCase_ = 0;
+ count_ = null;
+ onChanged();
+ }
+ return this;
+ }
+
+ /**
+ * double count_float = 2;
+ *
+ * @return Whether the countFloat field is set.
+ */
+ public boolean hasCountFloat() {
+ return countCase_ == 2;
+ }
+
+ /**
+ * double count_float = 2;
+ *
+ * @return The countFloat.
+ */
+ public double getCountFloat() {
+ if (countCase_ == 2) {
+ return (Double) count_;
+ }
+ return 0D;
+ }
+
+ /**
+ * double count_float = 2;
+ *
+ * @param value The countFloat to set.
+ * @return This builder for chaining.
+ */
+ public Builder setCountFloat(double value) {
+
+ countCase_ = 2;
+ count_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * double count_float = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearCountFloat() {
+ if (countCase_ == 2) {
+ countCase_ = 0;
+ count_ = null;
+ onChanged();
+ }
+ return this;
+ }
+
+ private double sum_;
+
+ /**
+ *
+ *
+ *
+ * Sum of observations in the histogram.
+ *
+ *
+ * double sum = 3;
+ *
+ * @return The sum.
+ */
+ @Override
+ public double getSum() {
+ return sum_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Sum of observations in the histogram.
+ *
+ *
+ * double sum = 3;
+ *
+ * @param value The sum to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSum(double value) {
+
+ sum_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Sum of observations in the histogram.
+ *
+ *
+ * double sum = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearSum() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ sum_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ private int schema_;
+
+ /**
+ *
+ *
+ *
+ * The 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.
+ *
+ *
+ * sint32 schema = 4;
+ *
+ * @return The schema.
+ */
+ @Override
+ public int getSchema() {
+ return schema_;
+ }
+
+ /**
+ *
+ *
+ *
+ * The 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.
+ *
+ *
+ * sint32 schema = 4;
+ *
+ * @param value The schema to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSchema(int value) {
+
+ schema_ = value;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * The 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.
+ *
+ *
+ * sint32 schema = 4;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearSchema() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ schema_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private double zeroThreshold_;
+
+ /**
+ *
+ *
+ *
+ * Breadth of the zero bucket.
+ *
+ *
+ * double zero_threshold = 5;
+ *
+ * @return The zeroThreshold.
+ */
+ @Override
+ public double getZeroThreshold() {
+ return zeroThreshold_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Breadth of the zero bucket.
+ *
+ *
+ * double zero_threshold = 5;
+ *
+ * @param value The zeroThreshold to set.
+ * @return This builder for chaining.
+ */
+ public Builder setZeroThreshold(double value) {
+
+ zeroThreshold_ = value;
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Breadth of the zero bucket.
+ *
+ *
+ * double zero_threshold = 5;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearZeroThreshold() {
+ bitField0_ = (bitField0_ & ~0x00000010);
+ zeroThreshold_ = 0D;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * uint64 zero_count_int = 6;
+ *
+ * @return Whether the zeroCountInt field is set.
+ */
+ public boolean hasZeroCountInt() {
+ return zeroCountCase_ == 6;
+ }
+
+ /**
+ * uint64 zero_count_int = 6;
+ *
+ * @return The zeroCountInt.
+ */
+ public long getZeroCountInt() {
+ if (zeroCountCase_ == 6) {
+ return (Long) zeroCount_;
+ }
+ return 0L;
+ }
+
+ /**
+ * uint64 zero_count_int = 6;
+ *
+ * @param value The zeroCountInt to set.
+ * @return This builder for chaining.
+ */
+ public Builder setZeroCountInt(long value) {
+
+ zeroCountCase_ = 6;
+ zeroCount_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * uint64 zero_count_int = 6;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearZeroCountInt() {
+ if (zeroCountCase_ == 6) {
+ zeroCountCase_ = 0;
+ zeroCount_ = null;
+ onChanged();
+ }
+ return this;
+ }
+
+ /**
+ * double zero_count_float = 7;
+ *
+ * @return Whether the zeroCountFloat field is set.
+ */
+ public boolean hasZeroCountFloat() {
+ return zeroCountCase_ == 7;
+ }
+
+ /**
+ * double zero_count_float = 7;
+ *
+ * @return The zeroCountFloat.
+ */
+ public double getZeroCountFloat() {
+ if (zeroCountCase_ == 7) {
+ return (Double) zeroCount_;
+ }
+ return 0D;
+ }
+
+ /**
+ * double zero_count_float = 7;
+ *
+ * @param value The zeroCountFloat to set.
+ * @return This builder for chaining.
+ */
+ public Builder setZeroCountFloat(double value) {
+
+ zeroCountCase_ = 7;
+ zeroCount_ = value;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * double zero_count_float = 7;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearZeroCountFloat() {
+ if (zeroCountCase_ == 7) {
+ zeroCountCase_ = 0;
+ zeroCount_ = null;
+ onChanged();
+ }
+ return this;
+ }
+
+ private java.util.List
+ * Negative Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan negative_spans = 8 [(.gogoproto.nullable) = false];
+ *
+ */
+ public java.util.List
+ * Negative Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan negative_spans = 8 [(.gogoproto.nullable) = false];
+ *
+ */
+ public int getNegativeSpansCount() {
+ if (negativeSpansBuilder_ == null) {
+ return negativeSpans_.size();
+ } else {
+ return negativeSpansBuilder_.getCount();
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Negative Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan negative_spans = 8 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.BucketSpan getNegativeSpans(int index) {
+ if (negativeSpansBuilder_ == null) {
+ return negativeSpans_.get(index);
+ } else {
+ return negativeSpansBuilder_.getMessage(index);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Negative Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan negative_spans = 8 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder setNegativeSpans(int index, Types.BucketSpan value) {
+ if (negativeSpansBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureNegativeSpansIsMutable();
+ negativeSpans_.set(index, value);
+ onChanged();
+ } else {
+ negativeSpansBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Negative Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan negative_spans = 8 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder setNegativeSpans(int index, Types.BucketSpan.Builder builderForValue) {
+ if (negativeSpansBuilder_ == null) {
+ ensureNegativeSpansIsMutable();
+ negativeSpans_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ negativeSpansBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Negative Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan negative_spans = 8 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addNegativeSpans(Types.BucketSpan value) {
+ if (negativeSpansBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureNegativeSpansIsMutable();
+ negativeSpans_.add(value);
+ onChanged();
+ } else {
+ negativeSpansBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Negative Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan negative_spans = 8 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addNegativeSpans(int index, Types.BucketSpan value) {
+ if (negativeSpansBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureNegativeSpansIsMutable();
+ negativeSpans_.add(index, value);
+ onChanged();
+ } else {
+ negativeSpansBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Negative Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan negative_spans = 8 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addNegativeSpans(Types.BucketSpan.Builder builderForValue) {
+ if (negativeSpansBuilder_ == null) {
+ ensureNegativeSpansIsMutable();
+ negativeSpans_.add(builderForValue.build());
+ onChanged();
+ } else {
+ negativeSpansBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Negative Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan negative_spans = 8 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addNegativeSpans(int index, Types.BucketSpan.Builder builderForValue) {
+ if (negativeSpansBuilder_ == null) {
+ ensureNegativeSpansIsMutable();
+ negativeSpans_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ negativeSpansBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Negative Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan negative_spans = 8 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addAllNegativeSpans(Iterable extends Types.BucketSpan> values) {
+ if (negativeSpansBuilder_ == null) {
+ ensureNegativeSpansIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, negativeSpans_);
+ onChanged();
+ } else {
+ negativeSpansBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Negative Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan negative_spans = 8 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder clearNegativeSpans() {
+ if (negativeSpansBuilder_ == null) {
+ negativeSpans_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000080);
+ onChanged();
+ } else {
+ negativeSpansBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Negative Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan negative_spans = 8 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder removeNegativeSpans(int index) {
+ if (negativeSpansBuilder_ == null) {
+ ensureNegativeSpansIsMutable();
+ negativeSpans_.remove(index);
+ onChanged();
+ } else {
+ negativeSpansBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Negative Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan negative_spans = 8 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.BucketSpan.Builder getNegativeSpansBuilder(int index) {
+ return getNegativeSpansFieldBuilder().getBuilder(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * Negative Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan negative_spans = 8 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.BucketSpanOrBuilder getNegativeSpansOrBuilder(int index) {
+ if (negativeSpansBuilder_ == null) {
+ return negativeSpans_.get(index);
+ } else {
+ return negativeSpansBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Negative Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan negative_spans = 8 [(.gogoproto.nullable) = false];
+ *
+ */
+ public java.util.List extends Types.BucketSpanOrBuilder>
+ getNegativeSpansOrBuilderList() {
+ if (negativeSpansBuilder_ != null) {
+ return negativeSpansBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(negativeSpans_);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Negative Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan negative_spans = 8 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.BucketSpan.Builder addNegativeSpansBuilder() {
+ return getNegativeSpansFieldBuilder()
+ .addBuilder(Types.BucketSpan.getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ *
+ * Negative Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan negative_spans = 8 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.BucketSpan.Builder addNegativeSpansBuilder(int index) {
+ return getNegativeSpansFieldBuilder()
+ .addBuilder(index, Types.BucketSpan.getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ *
+ * Negative Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan negative_spans = 8 [(.gogoproto.nullable) = false];
+ *
+ */
+ public java.util.List
+ * Use either "negative_deltas" or "negative_counts", the former for
+ * regular histograms with integer counts, the latter for float
+ * histograms.
+ *
+ *
+ * repeated sint64 negative_deltas = 9;
+ *
+ * @return A list containing the negativeDeltas.
+ */
+ public java.util.List
+ * Use either "negative_deltas" or "negative_counts", the former for
+ * regular histograms with integer counts, the latter for float
+ * histograms.
+ *
+ *
+ * repeated sint64 negative_deltas = 9;
+ *
+ * @return The count of negativeDeltas.
+ */
+ public int getNegativeDeltasCount() {
+ return negativeDeltas_.size();
+ }
+
+ /**
+ *
+ *
+ *
+ * Use either "negative_deltas" or "negative_counts", the former for
+ * regular histograms with integer counts, the latter for float
+ * histograms.
+ *
+ *
+ * repeated sint64 negative_deltas = 9;
+ *
+ * @param index The index of the element to return.
+ * @return The negativeDeltas at the given index.
+ */
+ public long getNegativeDeltas(int index) {
+ return negativeDeltas_.getLong(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * Use either "negative_deltas" or "negative_counts", the former for
+ * regular histograms with integer counts, the latter for float
+ * histograms.
+ *
+ *
+ * repeated sint64 negative_deltas = 9;
+ *
+ * @param index The index to set the value at.
+ * @param value The negativeDeltas to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNegativeDeltas(int index, long value) {
+
+ ensureNegativeDeltasIsMutable();
+ negativeDeltas_.setLong(index, value);
+ bitField0_ |= 0x00000100;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Use either "negative_deltas" or "negative_counts", the former for
+ * regular histograms with integer counts, the latter for float
+ * histograms.
+ *
+ *
+ * repeated sint64 negative_deltas = 9;
+ *
+ * @param value The negativeDeltas to add.
+ * @return This builder for chaining.
+ */
+ public Builder addNegativeDeltas(long value) {
+
+ ensureNegativeDeltasIsMutable();
+ negativeDeltas_.addLong(value);
+ bitField0_ |= 0x00000100;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Use either "negative_deltas" or "negative_counts", the former for
+ * regular histograms with integer counts, the latter for float
+ * histograms.
+ *
+ *
+ * repeated sint64 negative_deltas = 9;
+ *
+ * @param values The negativeDeltas to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllNegativeDeltas(Iterable extends Long> values) {
+ ensureNegativeDeltasIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, negativeDeltas_);
+ bitField0_ |= 0x00000100;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Use either "negative_deltas" or "negative_counts", the former for
+ * regular histograms with integer counts, the latter for float
+ * histograms.
+ *
+ *
+ * repeated sint64 negative_deltas = 9;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearNegativeDeltas() {
+ negativeDeltas_ = emptyLongList();
+ bitField0_ = (bitField0_ & ~0x00000100);
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Internal.DoubleList negativeCounts_ = emptyDoubleList();
+
+ private void ensureNegativeCountsIsMutable() {
+ if (!negativeCounts_.isModifiable()) {
+ negativeCounts_ = makeMutableCopy(negativeCounts_);
+ }
+ bitField0_ |= 0x00000200;
+ }
+
+ private void ensureNegativeCountsIsMutable(int capacity) {
+ if (!negativeCounts_.isModifiable()) {
+ negativeCounts_ = makeMutableCopy(negativeCounts_, capacity);
+ }
+ bitField0_ |= 0x00000200;
+ }
+
+ /**
+ *
+ *
+ *
+ * Absolute count of each bucket.
+ *
+ *
+ * repeated double negative_counts = 10;
+ *
+ * @return A list containing the negativeCounts.
+ */
+ public java.util.List
+ * Absolute count of each bucket.
+ *
+ *
+ * repeated double negative_counts = 10;
+ *
+ * @return The count of negativeCounts.
+ */
+ public int getNegativeCountsCount() {
+ return negativeCounts_.size();
+ }
+
+ /**
+ *
+ *
+ *
+ * Absolute count of each bucket.
+ *
+ *
+ * repeated double negative_counts = 10;
+ *
+ * @param index The index of the element to return.
+ * @return The negativeCounts at the given index.
+ */
+ public double getNegativeCounts(int index) {
+ return negativeCounts_.getDouble(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * Absolute count of each bucket.
+ *
+ *
+ * repeated double negative_counts = 10;
+ *
+ * @param index The index to set the value at.
+ * @param value The negativeCounts to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNegativeCounts(int index, double value) {
+
+ ensureNegativeCountsIsMutable();
+ negativeCounts_.setDouble(index, value);
+ bitField0_ |= 0x00000200;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Absolute count of each bucket.
+ *
+ *
+ * repeated double negative_counts = 10;
+ *
+ * @param value The negativeCounts to add.
+ * @return This builder for chaining.
+ */
+ public Builder addNegativeCounts(double value) {
+
+ ensureNegativeCountsIsMutable();
+ negativeCounts_.addDouble(value);
+ bitField0_ |= 0x00000200;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Absolute count of each bucket.
+ *
+ *
+ * repeated double negative_counts = 10;
+ *
+ * @param values The negativeCounts to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllNegativeCounts(Iterable extends Double> values) {
+ ensureNegativeCountsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, negativeCounts_);
+ bitField0_ |= 0x00000200;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Absolute count of each bucket.
+ *
+ *
+ * repeated double negative_counts = 10;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearNegativeCounts() {
+ negativeCounts_ = emptyDoubleList();
+ bitField0_ = (bitField0_ & ~0x00000200);
+ onChanged();
+ return this;
+ }
+
+ private java.util.List
+ * Positive Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan positive_spans = 11 [(.gogoproto.nullable) = false];
+ *
+ */
+ public java.util.List
+ * Positive Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan positive_spans = 11 [(.gogoproto.nullable) = false];
+ *
+ */
+ public int getPositiveSpansCount() {
+ if (positiveSpansBuilder_ == null) {
+ return positiveSpans_.size();
+ } else {
+ return positiveSpansBuilder_.getCount();
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Positive Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan positive_spans = 11 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.BucketSpan getPositiveSpans(int index) {
+ if (positiveSpansBuilder_ == null) {
+ return positiveSpans_.get(index);
+ } else {
+ return positiveSpansBuilder_.getMessage(index);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Positive Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan positive_spans = 11 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder setPositiveSpans(int index, Types.BucketSpan value) {
+ if (positiveSpansBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePositiveSpansIsMutable();
+ positiveSpans_.set(index, value);
+ onChanged();
+ } else {
+ positiveSpansBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Positive Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan positive_spans = 11 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder setPositiveSpans(int index, Types.BucketSpan.Builder builderForValue) {
+ if (positiveSpansBuilder_ == null) {
+ ensurePositiveSpansIsMutable();
+ positiveSpans_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ positiveSpansBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Positive Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan positive_spans = 11 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addPositiveSpans(Types.BucketSpan value) {
+ if (positiveSpansBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePositiveSpansIsMutable();
+ positiveSpans_.add(value);
+ onChanged();
+ } else {
+ positiveSpansBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Positive Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan positive_spans = 11 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addPositiveSpans(int index, Types.BucketSpan value) {
+ if (positiveSpansBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePositiveSpansIsMutable();
+ positiveSpans_.add(index, value);
+ onChanged();
+ } else {
+ positiveSpansBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Positive Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan positive_spans = 11 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addPositiveSpans(Types.BucketSpan.Builder builderForValue) {
+ if (positiveSpansBuilder_ == null) {
+ ensurePositiveSpansIsMutable();
+ positiveSpans_.add(builderForValue.build());
+ onChanged();
+ } else {
+ positiveSpansBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Positive Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan positive_spans = 11 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addPositiveSpans(int index, Types.BucketSpan.Builder builderForValue) {
+ if (positiveSpansBuilder_ == null) {
+ ensurePositiveSpansIsMutable();
+ positiveSpans_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ positiveSpansBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Positive Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan positive_spans = 11 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addAllPositiveSpans(Iterable extends Types.BucketSpan> values) {
+ if (positiveSpansBuilder_ == null) {
+ ensurePositiveSpansIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, positiveSpans_);
+ onChanged();
+ } else {
+ positiveSpansBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Positive Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan positive_spans = 11 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder clearPositiveSpans() {
+ if (positiveSpansBuilder_ == null) {
+ positiveSpans_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000400);
+ onChanged();
+ } else {
+ positiveSpansBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Positive Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan positive_spans = 11 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder removePositiveSpans(int index) {
+ if (positiveSpansBuilder_ == null) {
+ ensurePositiveSpansIsMutable();
+ positiveSpans_.remove(index);
+ onChanged();
+ } else {
+ positiveSpansBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Positive Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan positive_spans = 11 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.BucketSpan.Builder getPositiveSpansBuilder(int index) {
+ return getPositiveSpansFieldBuilder().getBuilder(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * Positive Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan positive_spans = 11 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.BucketSpanOrBuilder getPositiveSpansOrBuilder(int index) {
+ if (positiveSpansBuilder_ == null) {
+ return positiveSpans_.get(index);
+ } else {
+ return positiveSpansBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Positive Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan positive_spans = 11 [(.gogoproto.nullable) = false];
+ *
+ */
+ public java.util.List extends Types.BucketSpanOrBuilder>
+ getPositiveSpansOrBuilderList() {
+ if (positiveSpansBuilder_ != null) {
+ return positiveSpansBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(positiveSpans_);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Positive Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan positive_spans = 11 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.BucketSpan.Builder addPositiveSpansBuilder() {
+ return getPositiveSpansFieldBuilder()
+ .addBuilder(Types.BucketSpan.getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ *
+ * Positive Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan positive_spans = 11 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.BucketSpan.Builder addPositiveSpansBuilder(int index) {
+ return getPositiveSpansFieldBuilder()
+ .addBuilder(index, Types.BucketSpan.getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ *
+ * Positive Buckets.
+ *
+ *
+ *
+ * repeated .prometheus.BucketSpan positive_spans = 11 [(.gogoproto.nullable) = false];
+ *
+ */
+ public java.util.List
+ * Use either "positive_deltas" or "positive_counts", the former for
+ * regular histograms with integer counts, the latter for float
+ * histograms.
+ *
+ *
+ * repeated sint64 positive_deltas = 12;
+ *
+ * @return A list containing the positiveDeltas.
+ */
+ public java.util.List
+ * Use either "positive_deltas" or "positive_counts", the former for
+ * regular histograms with integer counts, the latter for float
+ * histograms.
+ *
+ *
+ * repeated sint64 positive_deltas = 12;
+ *
+ * @return The count of positiveDeltas.
+ */
+ public int getPositiveDeltasCount() {
+ return positiveDeltas_.size();
+ }
+
+ /**
+ *
+ *
+ *
+ * Use either "positive_deltas" or "positive_counts", the former for
+ * regular histograms with integer counts, the latter for float
+ * histograms.
+ *
+ *
+ * repeated sint64 positive_deltas = 12;
+ *
+ * @param index The index of the element to return.
+ * @return The positiveDeltas at the given index.
+ */
+ public long getPositiveDeltas(int index) {
+ return positiveDeltas_.getLong(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * Use either "positive_deltas" or "positive_counts", the former for
+ * regular histograms with integer counts, the latter for float
+ * histograms.
+ *
+ *
+ * repeated sint64 positive_deltas = 12;
+ *
+ * @param index The index to set the value at.
+ * @param value The positiveDeltas to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPositiveDeltas(int index, long value) {
+
+ ensurePositiveDeltasIsMutable();
+ positiveDeltas_.setLong(index, value);
+ bitField0_ |= 0x00000800;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Use either "positive_deltas" or "positive_counts", the former for
+ * regular histograms with integer counts, the latter for float
+ * histograms.
+ *
+ *
+ * repeated sint64 positive_deltas = 12;
+ *
+ * @param value The positiveDeltas to add.
+ * @return This builder for chaining.
+ */
+ public Builder addPositiveDeltas(long value) {
+
+ ensurePositiveDeltasIsMutable();
+ positiveDeltas_.addLong(value);
+ bitField0_ |= 0x00000800;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Use either "positive_deltas" or "positive_counts", the former for
+ * regular histograms with integer counts, the latter for float
+ * histograms.
+ *
+ *
+ * repeated sint64 positive_deltas = 12;
+ *
+ * @param values The positiveDeltas to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllPositiveDeltas(Iterable extends Long> values) {
+ ensurePositiveDeltasIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, positiveDeltas_);
+ bitField0_ |= 0x00000800;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Use either "positive_deltas" or "positive_counts", the former for
+ * regular histograms with integer counts, the latter for float
+ * histograms.
+ *
+ *
+ * repeated sint64 positive_deltas = 12;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPositiveDeltas() {
+ positiveDeltas_ = emptyLongList();
+ bitField0_ = (bitField0_ & ~0x00000800);
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Internal.DoubleList positiveCounts_ = emptyDoubleList();
+
+ private void ensurePositiveCountsIsMutable() {
+ if (!positiveCounts_.isModifiable()) {
+ positiveCounts_ = makeMutableCopy(positiveCounts_);
+ }
+ bitField0_ |= 0x00001000;
+ }
+
+ private void ensurePositiveCountsIsMutable(int capacity) {
+ if (!positiveCounts_.isModifiable()) {
+ positiveCounts_ = makeMutableCopy(positiveCounts_, capacity);
+ }
+ bitField0_ |= 0x00001000;
+ }
+
+ /**
+ *
+ *
+ *
+ * Absolute count of each bucket.
+ *
+ *
+ * repeated double positive_counts = 13;
+ *
+ * @return A list containing the positiveCounts.
+ */
+ public java.util.List
+ * Absolute count of each bucket.
+ *
+ *
+ * repeated double positive_counts = 13;
+ *
+ * @return The count of positiveCounts.
+ */
+ public int getPositiveCountsCount() {
+ return positiveCounts_.size();
+ }
+
+ /**
+ *
+ *
+ *
+ * Absolute count of each bucket.
+ *
+ *
+ * repeated double positive_counts = 13;
+ *
+ * @param index The index of the element to return.
+ * @return The positiveCounts at the given index.
+ */
+ public double getPositiveCounts(int index) {
+ return positiveCounts_.getDouble(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * Absolute count of each bucket.
+ *
+ *
+ * repeated double positive_counts = 13;
+ *
+ * @param index The index to set the value at.
+ * @param value The positiveCounts to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPositiveCounts(int index, double value) {
+
+ ensurePositiveCountsIsMutable();
+ positiveCounts_.setDouble(index, value);
+ bitField0_ |= 0x00001000;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Absolute count of each bucket.
+ *
+ *
+ * repeated double positive_counts = 13;
+ *
+ * @param value The positiveCounts to add.
+ * @return This builder for chaining.
+ */
+ public Builder addPositiveCounts(double value) {
+
+ ensurePositiveCountsIsMutable();
+ positiveCounts_.addDouble(value);
+ bitField0_ |= 0x00001000;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Absolute count of each bucket.
+ *
+ *
+ * repeated double positive_counts = 13;
+ *
+ * @param values The positiveCounts to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllPositiveCounts(Iterable extends Double> values) {
+ ensurePositiveCountsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, positiveCounts_);
+ bitField0_ |= 0x00001000;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Absolute count of each bucket.
+ *
+ *
+ * repeated double positive_counts = 13;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPositiveCounts() {
+ positiveCounts_ = emptyDoubleList();
+ bitField0_ = (bitField0_ & ~0x00001000);
+ onChanged();
+ return this;
+ }
+
+ private int resetHint_ = 0;
+
+ /**
+ * .prometheus.Histogram.ResetHint reset_hint = 14;
+ *
+ * @return The enum numeric value on the wire for resetHint.
+ */
+ @Override
+ public int getResetHintValue() {
+ return resetHint_;
+ }
+
+ /**
+ * .prometheus.Histogram.ResetHint reset_hint = 14;
+ *
+ * @param value The enum numeric value on the wire for resetHint to set.
+ * @return This builder for chaining.
+ */
+ public Builder setResetHintValue(int value) {
+ resetHint_ = value;
+ bitField0_ |= 0x00002000;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * .prometheus.Histogram.ResetHint reset_hint = 14;
+ *
+ * @return The resetHint.
+ */
+ @Override
+ public Types.Histogram.ResetHint getResetHint() {
+ Types.Histogram.ResetHint result = Types.Histogram.ResetHint.forNumber(resetHint_);
+ return result == null ? Types.Histogram.ResetHint.UNRECOGNIZED : result;
+ }
+
+ /**
+ * .prometheus.Histogram.ResetHint reset_hint = 14;
+ *
+ * @param value The resetHint to set.
+ * @return This builder for chaining.
+ */
+ public Builder setResetHint(Types.Histogram.ResetHint value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00002000;
+ resetHint_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+
+ /**
+ * .prometheus.Histogram.ResetHint reset_hint = 14;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearResetHint() {
+ bitField0_ = (bitField0_ & ~0x00002000);
+ resetHint_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private long timestamp_;
+
+ /**
+ *
+ *
+ *
+ * timestamp is in ms format, see model/timestamp/timestamp.go for
+ * conversion from time.Time to Prometheus timestamp.
+ *
+ *
+ * int64 timestamp = 15;
+ *
+ * @return The timestamp.
+ */
+ @Override
+ public long getTimestamp() {
+ return timestamp_;
+ }
+
+ /**
+ *
+ *
+ *
+ * timestamp is in ms format, see model/timestamp/timestamp.go for
+ * conversion from time.Time to Prometheus timestamp.
+ *
+ *
+ * int64 timestamp = 15;
+ *
+ * @param value The timestamp to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTimestamp(long value) {
+
+ timestamp_ = value;
+ bitField0_ |= 0x00004000;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * timestamp is in ms format, see model/timestamp/timestamp.go for
+ * conversion from time.Time to Prometheus timestamp.
+ *
+ *
+ * int64 timestamp = 15;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTimestamp() {
+ bitField0_ = (bitField0_ & ~0x00004000);
+ timestamp_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ @Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:prometheus.Histogram)
+ }
+
+ // @@protoc_insertion_point(class_scope:prometheus.Histogram)
+ private static final Types.Histogram DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new Types.Histogram();
+ }
+
+ public static Types.Histogram getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * Gap to previous span, or starting point for 1st span (which can be negative).
+ *
+ *
+ * sint32 offset = 1;
+ *
+ * @return The offset.
+ */
+ int getOffset();
+
+ /**
+ *
+ *
+ *
+ * Length of consecutive buckets.
+ *
+ *
+ * uint32 length = 2;
+ *
+ * @return The length.
+ */
+ int getLength();
+ }
+
+ /**
+ *
+ *
+ *
+ * A BucketSpan defines a number of consecutive buckets 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).
+ *
+ *
+ *
+ * Gap to previous span, or starting point for 1st span (which can be negative).
+ *
+ *
+ * sint32 offset = 1;
+ *
+ * @return The offset.
+ */
+ @Override
+ public int getOffset() {
+ return offset_;
+ }
+
+ public static final int LENGTH_FIELD_NUMBER = 2;
+ private int length_ = 0;
+
+ /**
+ *
+ *
+ *
+ * Length of consecutive buckets.
+ *
+ *
+ * uint32 length = 2;
+ *
+ * @return The length.
+ */
+ @Override
+ public int getLength() {
+ return length_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) {
+ return true;
+ }
+ if (isInitialized == 0) {
+ return false;
+ }
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (offset_ != 0) {
+ output.writeSInt32(1, offset_);
+ }
+ if (length_ != 0) {
+ output.writeUInt32(2, length_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) {
+ return size;
+ }
+
+ size = 0;
+ if (offset_ != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeSInt32Size(1, offset_);
+ }
+ if (length_ != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeUInt32Size(2, length_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof Types.BucketSpan)) {
+ return super.equals(obj);
+ }
+ Types.BucketSpan other = (Types.BucketSpan) obj;
+
+ if (getOffset() != other.getOffset()) {
+ return false;
+ }
+ if (getLength() != other.getLength()) {
+ return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + OFFSET_FIELD_NUMBER;
+ hash = (53 * hash) + getOffset();
+ hash = (37 * hash) + LENGTH_FIELD_NUMBER;
+ hash = (53 * hash) + getLength();
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static Types.BucketSpan parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Types.BucketSpan parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Types.BucketSpan parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Types.BucketSpan parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Types.BucketSpan parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Types.BucketSpan parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Types.BucketSpan parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static Types.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 Types.BucketSpan parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input);
+ }
+
+ public static Types.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 Types.BucketSpan parseFrom(com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static Types.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);
+ }
+
+ @Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(Types.BucketSpan prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ *
+ *
+ *
+ * A BucketSpan defines a number of consecutive buckets 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).
+ *
+ *
+ *
+ * Gap to previous span, or starting point for 1st span (which can be negative).
+ *
+ *
+ * sint32 offset = 1;
+ *
+ * @return The offset.
+ */
+ @Override
+ public int getOffset() {
+ return offset_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Gap to previous span, or starting point for 1st span (which can be negative).
+ *
+ *
+ * sint32 offset = 1;
+ *
+ * @param value The offset to set.
+ * @return This builder for chaining.
+ */
+ public Builder setOffset(int value) {
+
+ offset_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Gap to previous span, or starting point for 1st span (which can be negative).
+ *
+ *
+ * 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.
+ *
+ *
+ * uint32 length = 2;
+ *
+ * @return The length.
+ */
+ @Override
+ public int getLength() {
+ return length_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Length of consecutive buckets.
+ *
+ *
+ * uint32 length = 2;
+ *
+ * @param value The length to set.
+ * @return This builder for chaining.
+ */
+ public Builder setLength(int value) {
+
+ length_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Length of consecutive buckets.
+ *
+ *
+ * uint32 length = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearLength() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ length_ = 0;
+ onChanged();
+ return this;
+ }
+
+ @Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:prometheus.BucketSpan)
+ }
+
+ // @@protoc_insertion_point(class_scope:prometheus.BucketSpan)
+ private static final Types.BucketSpan DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new Types.BucketSpan();
+ }
+
+ public static Types.BucketSpan getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser
+ * For a timeseries to be valid, and for the samples and exemplars
+ * to be ingested by the remote system properly, the labels field is required.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ java.util.List
+ * For a timeseries to be valid, and for the samples and exemplars
+ * to be ingested by the remote system properly, the labels field is required.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ Types.Label getLabels(int index);
+
+ /**
+ *
+ *
+ *
+ * For a timeseries to be valid, and for the samples and exemplars
+ * to be ingested by the remote system properly, the labels field is required.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ int getLabelsCount();
+
+ /**
+ *
+ *
+ *
+ * For a timeseries to be valid, and for the samples and exemplars
+ * to be ingested by the remote system properly, the labels field is required.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ java.util.List extends Types.LabelOrBuilder> getLabelsOrBuilderList();
+
+ /**
+ *
+ *
+ *
+ * For a timeseries to be valid, and for the samples and exemplars
+ * to be ingested by the remote system properly, the labels field is required.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ Types.LabelOrBuilder getLabelsOrBuilder(int index);
+
+ /** repeated .prometheus.Sample samples = 2 [(.gogoproto.nullable) = false]; */
+ java.util.Listrepeated .prometheus.Sample samples = 2 [(.gogoproto.nullable) = false]; */
+ Types.Sample getSamples(int index);
+
+ /** repeated .prometheus.Sample samples = 2 [(.gogoproto.nullable) = false]; */
+ int getSamplesCount();
+
+ /** repeated .prometheus.Sample samples = 2 [(.gogoproto.nullable) = false]; */
+ java.util.List extends Types.SampleOrBuilder> getSamplesOrBuilderList();
+
+ /** repeated .prometheus.Sample samples = 2 [(.gogoproto.nullable) = false]; */
+ Types.SampleOrBuilder getSamplesOrBuilder(int index);
+
+ /**
+ * repeated .prometheus.Exemplar exemplars = 3 [(.gogoproto.nullable) = false];
+ */
+ java.util.Listrepeated .prometheus.Exemplar exemplars = 3 [(.gogoproto.nullable) = false];
+ */
+ Types.Exemplar getExemplars(int index);
+
+ /**
+ * repeated .prometheus.Exemplar exemplars = 3 [(.gogoproto.nullable) = false];
+ */
+ int getExemplarsCount();
+
+ /**
+ * repeated .prometheus.Exemplar exemplars = 3 [(.gogoproto.nullable) = false];
+ */
+ java.util.List extends Types.ExemplarOrBuilder> getExemplarsOrBuilderList();
+
+ /**
+ * repeated .prometheus.Exemplar exemplars = 3 [(.gogoproto.nullable) = false];
+ */
+ Types.ExemplarOrBuilder getExemplarsOrBuilder(int index);
+
+ /**
+ * repeated .prometheus.Histogram histograms = 4 [(.gogoproto.nullable) = false];
+ *
+ */
+ java.util.Listrepeated .prometheus.Histogram histograms = 4 [(.gogoproto.nullable) = false];
+ *
+ */
+ Types.Histogram getHistograms(int index);
+
+ /**
+ * repeated .prometheus.Histogram histograms = 4 [(.gogoproto.nullable) = false];
+ *
+ */
+ int getHistogramsCount();
+
+ /**
+ * repeated .prometheus.Histogram histograms = 4 [(.gogoproto.nullable) = false];
+ *
+ */
+ java.util.List extends Types.HistogramOrBuilder> getHistogramsOrBuilderList();
+
+ /**
+ * repeated .prometheus.Histogram histograms = 4 [(.gogoproto.nullable) = false];
+ *
+ */
+ Types.HistogramOrBuilder getHistogramsOrBuilder(int index);
+ }
+
+ /**
+ *
+ *
+ *
+ * TimeSeries represents samples and labels for a single time series.
+ *
+ *
+ *
+ * For a timeseries to be valid, and for the samples and exemplars
+ * to be ingested by the remote system properly, the labels field is required.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ @Override
+ public java.util.List
+ * For a timeseries to be valid, and for the samples and exemplars
+ * to be ingested by the remote system properly, the labels field is required.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ @Override
+ public java.util.List extends Types.LabelOrBuilder> getLabelsOrBuilderList() {
+ return labels_;
+ }
+
+ /**
+ *
+ *
+ *
+ * For a timeseries to be valid, and for the samples and exemplars
+ * to be ingested by the remote system properly, the labels field is required.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ @Override
+ public int getLabelsCount() {
+ return labels_.size();
+ }
+
+ /**
+ *
+ *
+ *
+ * For a timeseries to be valid, and for the samples and exemplars
+ * to be ingested by the remote system properly, the labels field is required.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ @Override
+ public Types.Label getLabels(int index) {
+ return labels_.get(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * For a timeseries to be valid, and for the samples and exemplars
+ * to be ingested by the remote system properly, the labels field is required.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ @Override
+ public Types.LabelOrBuilder getLabelsOrBuilder(int index) {
+ return labels_.get(index);
+ }
+
+ public static final int SAMPLES_FIELD_NUMBER = 2;
+
+ @SuppressWarnings("serial")
+ private java.util.Listrepeated .prometheus.Sample samples = 2 [(.gogoproto.nullable) = false]; */
+ @Override
+ public java.util.Listrepeated .prometheus.Sample samples = 2 [(.gogoproto.nullable) = false]; */
+ @Override
+ public java.util.List extends Types.SampleOrBuilder> getSamplesOrBuilderList() {
+ return samples_;
+ }
+
+ /** repeated .prometheus.Sample samples = 2 [(.gogoproto.nullable) = false]; */
+ @Override
+ public int getSamplesCount() {
+ return samples_.size();
+ }
+
+ /** repeated .prometheus.Sample samples = 2 [(.gogoproto.nullable) = false]; */
+ @Override
+ public Types.Sample getSamples(int index) {
+ return samples_.get(index);
+ }
+
+ /** repeated .prometheus.Sample samples = 2 [(.gogoproto.nullable) = false]; */
+ @Override
+ public Types.SampleOrBuilder getSamplesOrBuilder(int index) {
+ return samples_.get(index);
+ }
+
+ public static final int EXEMPLARS_FIELD_NUMBER = 3;
+
+ @SuppressWarnings("serial")
+ private java.util.Listrepeated .prometheus.Exemplar exemplars = 3 [(.gogoproto.nullable) = false];
+ */
+ @Override
+ public java.util.Listrepeated .prometheus.Exemplar exemplars = 3 [(.gogoproto.nullable) = false];
+ */
+ @Override
+ public java.util.List extends Types.ExemplarOrBuilder> getExemplarsOrBuilderList() {
+ return exemplars_;
+ }
+
+ /**
+ * repeated .prometheus.Exemplar exemplars = 3 [(.gogoproto.nullable) = false];
+ */
+ @Override
+ public int getExemplarsCount() {
+ return exemplars_.size();
+ }
+
+ /**
+ * repeated .prometheus.Exemplar exemplars = 3 [(.gogoproto.nullable) = false];
+ */
+ @Override
+ public Types.Exemplar getExemplars(int index) {
+ return exemplars_.get(index);
+ }
+
+ /**
+ * repeated .prometheus.Exemplar exemplars = 3 [(.gogoproto.nullable) = false];
+ */
+ @Override
+ public Types.ExemplarOrBuilder getExemplarsOrBuilder(int index) {
+ return exemplars_.get(index);
+ }
+
+ public static final int HISTOGRAMS_FIELD_NUMBER = 4;
+
+ @SuppressWarnings("serial")
+ private java.util.Listrepeated .prometheus.Histogram histograms = 4 [(.gogoproto.nullable) = false];
+ *
+ */
+ @Override
+ public java.util.Listrepeated .prometheus.Histogram histograms = 4 [(.gogoproto.nullable) = false];
+ *
+ */
+ @Override
+ public java.util.List extends Types.HistogramOrBuilder> getHistogramsOrBuilderList() {
+ return histograms_;
+ }
+
+ /**
+ * repeated .prometheus.Histogram histograms = 4 [(.gogoproto.nullable) = false];
+ *
+ */
+ @Override
+ public int getHistogramsCount() {
+ return histograms_.size();
+ }
+
+ /**
+ * repeated .prometheus.Histogram histograms = 4 [(.gogoproto.nullable) = false];
+ *
+ */
+ @Override
+ public Types.Histogram getHistograms(int index) {
+ return histograms_.get(index);
+ }
+
+ /**
+ * repeated .prometheus.Histogram histograms = 4 [(.gogoproto.nullable) = false];
+ *
+ */
+ @Override
+ public Types.HistogramOrBuilder getHistogramsOrBuilder(int index) {
+ return histograms_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) {
+ return true;
+ }
+ if (isInitialized == 0) {
+ return false;
+ }
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ for (int i = 0; i < labels_.size(); i++) {
+ output.writeMessage(1, labels_.get(i));
+ }
+ for (int i = 0; i < samples_.size(); i++) {
+ output.writeMessage(2, samples_.get(i));
+ }
+ for (int i = 0; i < exemplars_.size(); i++) {
+ output.writeMessage(3, exemplars_.get(i));
+ }
+ for (int i = 0; i < histograms_.size(); i++) {
+ output.writeMessage(4, histograms_.get(i));
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) {
+ return size;
+ }
+
+ size = 0;
+ for (int i = 0; i < labels_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, labels_.get(i));
+ }
+ for (int i = 0; i < samples_.size(); i++) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 2, samples_.get(i));
+ }
+ for (int i = 0; i < exemplars_.size(); i++) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 3, exemplars_.get(i));
+ }
+ for (int i = 0; i < histograms_.size(); i++) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 4, histograms_.get(i));
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof Types.TimeSeries)) {
+ return super.equals(obj);
+ }
+ Types.TimeSeries other = (Types.TimeSeries) obj;
+
+ if (!getLabelsList().equals(other.getLabelsList())) {
+ return false;
+ }
+ if (!getSamplesList().equals(other.getSamplesList())) {
+ return false;
+ }
+ if (!getExemplarsList().equals(other.getExemplarsList())) {
+ return false;
+ }
+ if (!getHistogramsList().equals(other.getHistogramsList())) {
+ return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getLabelsCount() > 0) {
+ hash = (37 * hash) + LABELS_FIELD_NUMBER;
+ hash = (53 * hash) + getLabelsList().hashCode();
+ }
+ if (getSamplesCount() > 0) {
+ hash = (37 * hash) + SAMPLES_FIELD_NUMBER;
+ hash = (53 * hash) + getSamplesList().hashCode();
+ }
+ if (getExemplarsCount() > 0) {
+ hash = (37 * hash) + EXEMPLARS_FIELD_NUMBER;
+ hash = (53 * hash) + getExemplarsList().hashCode();
+ }
+ if (getHistogramsCount() > 0) {
+ hash = (37 * hash) + HISTOGRAMS_FIELD_NUMBER;
+ hash = (53 * hash) + getHistogramsList().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static Types.TimeSeries parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Types.TimeSeries parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Types.TimeSeries parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Types.TimeSeries parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Types.TimeSeries parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Types.TimeSeries parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Types.TimeSeries parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static Types.TimeSeries parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static Types.TimeSeries parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input);
+ }
+
+ public static Types.TimeSeries parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static Types.TimeSeries parseFrom(com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static Types.TimeSeries parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(Types.TimeSeries prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ *
+ *
+ *
+ * TimeSeries represents samples and labels for a single time series.
+ *
+ *
+ *
+ * For a timeseries to be valid, and for the samples and exemplars
+ * to be ingested by the remote system properly, the labels field is required.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public java.util.List
+ * For a timeseries to be valid, and for the samples and exemplars
+ * to be ingested by the remote system properly, the labels field is required.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public int getLabelsCount() {
+ if (labelsBuilder_ == null) {
+ return labels_.size();
+ } else {
+ return labelsBuilder_.getCount();
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * For a timeseries to be valid, and for the samples and exemplars
+ * to be ingested by the remote system properly, the labels field is required.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public Types.Label getLabels(int index) {
+ if (labelsBuilder_ == null) {
+ return labels_.get(index);
+ } else {
+ return labelsBuilder_.getMessage(index);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * For a timeseries to be valid, and for the samples and exemplars
+ * to be ingested by the remote system properly, the labels field is required.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public Builder setLabels(int index, Types.Label value) {
+ if (labelsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLabelsIsMutable();
+ labels_.set(index, value);
+ onChanged();
+ } else {
+ labelsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * For a timeseries to be valid, and for the samples and exemplars
+ * to be ingested by the remote system properly, the labels field is required.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public Builder setLabels(int index, Types.Label.Builder builderForValue) {
+ if (labelsBuilder_ == null) {
+ ensureLabelsIsMutable();
+ labels_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ labelsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * For a timeseries to be valid, and for the samples and exemplars
+ * to be ingested by the remote system properly, the labels field is required.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public Builder addLabels(Types.Label value) {
+ if (labelsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLabelsIsMutable();
+ labels_.add(value);
+ onChanged();
+ } else {
+ labelsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * For a timeseries to be valid, and for the samples and exemplars
+ * to be ingested by the remote system properly, the labels field is required.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public Builder addLabels(int index, Types.Label value) {
+ if (labelsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureLabelsIsMutable();
+ labels_.add(index, value);
+ onChanged();
+ } else {
+ labelsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * For a timeseries to be valid, and for the samples and exemplars
+ * to be ingested by the remote system properly, the labels field is required.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public Builder addLabels(Types.Label.Builder builderForValue) {
+ if (labelsBuilder_ == null) {
+ ensureLabelsIsMutable();
+ labels_.add(builderForValue.build());
+ onChanged();
+ } else {
+ labelsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * For a timeseries to be valid, and for the samples and exemplars
+ * to be ingested by the remote system properly, the labels field is required.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public Builder addLabels(int index, Types.Label.Builder builderForValue) {
+ if (labelsBuilder_ == null) {
+ ensureLabelsIsMutable();
+ labels_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ labelsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * For a timeseries to be valid, and for the samples and exemplars
+ * to be ingested by the remote system properly, the labels field is required.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public Builder addAllLabels(Iterable extends Types.Label> values) {
+ if (labelsBuilder_ == null) {
+ ensureLabelsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, labels_);
+ onChanged();
+ } else {
+ labelsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * For a timeseries to be valid, and for the samples and exemplars
+ * to be ingested by the remote system properly, the labels field is required.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public Builder clearLabels() {
+ if (labelsBuilder_ == null) {
+ labels_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ labelsBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * For a timeseries to be valid, and for the samples and exemplars
+ * to be ingested by the remote system properly, the labels field is required.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public Builder removeLabels(int index) {
+ if (labelsBuilder_ == null) {
+ ensureLabelsIsMutable();
+ labels_.remove(index);
+ onChanged();
+ } else {
+ labelsBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * For a timeseries to be valid, and for the samples and exemplars
+ * to be ingested by the remote system properly, the labels field is required.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public Types.Label.Builder getLabelsBuilder(int index) {
+ return getLabelsFieldBuilder().getBuilder(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * For a timeseries to be valid, and for the samples and exemplars
+ * to be ingested by the remote system properly, the labels field is required.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public Types.LabelOrBuilder getLabelsOrBuilder(int index) {
+ if (labelsBuilder_ == null) {
+ return labels_.get(index);
+ } else {
+ return labelsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * For a timeseries to be valid, and for the samples and exemplars
+ * to be ingested by the remote system properly, the labels field is required.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public java.util.List extends Types.LabelOrBuilder> getLabelsOrBuilderList() {
+ if (labelsBuilder_ != null) {
+ return labelsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(labels_);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * For a timeseries to be valid, and for the samples and exemplars
+ * to be ingested by the remote system properly, the labels field is required.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public Types.Label.Builder addLabelsBuilder() {
+ return getLabelsFieldBuilder().addBuilder(Types.Label.getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ *
+ * For a timeseries to be valid, and for the samples and exemplars
+ * to be ingested by the remote system properly, the labels field is required.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public Types.Label.Builder addLabelsBuilder(int index) {
+ return getLabelsFieldBuilder().addBuilder(index, Types.Label.getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ *
+ * For a timeseries to be valid, and for the samples and exemplars
+ * to be ingested by the remote system properly, the labels field is required.
+ *
+ *
+ * repeated .prometheus.Label labels = 1 [(.gogoproto.nullable) = false];
+ */
+ public java.util.Listrepeated .prometheus.Sample samples = 2 [(.gogoproto.nullable) = false];
+ */
+ public java.util.Listrepeated .prometheus.Sample samples = 2 [(.gogoproto.nullable) = false];
+ */
+ public int getSamplesCount() {
+ if (samplesBuilder_ == null) {
+ return samples_.size();
+ } else {
+ return samplesBuilder_.getCount();
+ }
+ }
+
+ /**
+ * repeated .prometheus.Sample samples = 2 [(.gogoproto.nullable) = false];
+ */
+ public Types.Sample getSamples(int index) {
+ if (samplesBuilder_ == null) {
+ return samples_.get(index);
+ } else {
+ return samplesBuilder_.getMessage(index);
+ }
+ }
+
+ /**
+ * repeated .prometheus.Sample samples = 2 [(.gogoproto.nullable) = false];
+ */
+ public Builder setSamples(int index, Types.Sample value) {
+ if (samplesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureSamplesIsMutable();
+ samples_.set(index, value);
+ onChanged();
+ } else {
+ samplesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.Sample samples = 2 [(.gogoproto.nullable) = false];
+ */
+ public Builder setSamples(int index, Types.Sample.Builder builderForValue) {
+ if (samplesBuilder_ == null) {
+ ensureSamplesIsMutable();
+ samples_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ samplesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.Sample samples = 2 [(.gogoproto.nullable) = false];
+ */
+ public Builder addSamples(Types.Sample value) {
+ if (samplesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureSamplesIsMutable();
+ samples_.add(value);
+ onChanged();
+ } else {
+ samplesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.Sample samples = 2 [(.gogoproto.nullable) = false];
+ */
+ public Builder addSamples(int index, Types.Sample value) {
+ if (samplesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureSamplesIsMutable();
+ samples_.add(index, value);
+ onChanged();
+ } else {
+ samplesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.Sample samples = 2 [(.gogoproto.nullable) = false];
+ */
+ public Builder addSamples(Types.Sample.Builder builderForValue) {
+ if (samplesBuilder_ == null) {
+ ensureSamplesIsMutable();
+ samples_.add(builderForValue.build());
+ onChanged();
+ } else {
+ samplesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.Sample samples = 2 [(.gogoproto.nullable) = false];
+ */
+ public Builder addSamples(int index, Types.Sample.Builder builderForValue) {
+ if (samplesBuilder_ == null) {
+ ensureSamplesIsMutable();
+ samples_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ samplesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.Sample samples = 2 [(.gogoproto.nullable) = false];
+ */
+ public Builder addAllSamples(Iterable extends Types.Sample> values) {
+ if (samplesBuilder_ == null) {
+ ensureSamplesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, samples_);
+ onChanged();
+ } else {
+ samplesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.Sample samples = 2 [(.gogoproto.nullable) = false];
+ */
+ public Builder clearSamples() {
+ if (samplesBuilder_ == null) {
+ samples_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ } else {
+ samplesBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.Sample samples = 2 [(.gogoproto.nullable) = false];
+ */
+ public Builder removeSamples(int index) {
+ if (samplesBuilder_ == null) {
+ ensureSamplesIsMutable();
+ samples_.remove(index);
+ onChanged();
+ } else {
+ samplesBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.Sample samples = 2 [(.gogoproto.nullable) = false];
+ */
+ public Types.Sample.Builder getSamplesBuilder(int index) {
+ return getSamplesFieldBuilder().getBuilder(index);
+ }
+
+ /**
+ * repeated .prometheus.Sample samples = 2 [(.gogoproto.nullable) = false];
+ */
+ public Types.SampleOrBuilder getSamplesOrBuilder(int index) {
+ if (samplesBuilder_ == null) {
+ return samples_.get(index);
+ } else {
+ return samplesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /**
+ * repeated .prometheus.Sample samples = 2 [(.gogoproto.nullable) = false];
+ */
+ public java.util.List extends Types.SampleOrBuilder> getSamplesOrBuilderList() {
+ if (samplesBuilder_ != null) {
+ return samplesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(samples_);
+ }
+ }
+
+ /**
+ * repeated .prometheus.Sample samples = 2 [(.gogoproto.nullable) = false];
+ */
+ public Types.Sample.Builder addSamplesBuilder() {
+ return getSamplesFieldBuilder().addBuilder(Types.Sample.getDefaultInstance());
+ }
+
+ /**
+ * repeated .prometheus.Sample samples = 2 [(.gogoproto.nullable) = false];
+ */
+ public Types.Sample.Builder addSamplesBuilder(int index) {
+ return getSamplesFieldBuilder()
+ .addBuilder(index, Types.Sample.getDefaultInstance());
+ }
+
+ /**
+ * repeated .prometheus.Sample samples = 2 [(.gogoproto.nullable) = false];
+ */
+ public java.util.Listrepeated .prometheus.Exemplar exemplars = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public java.util.Listrepeated .prometheus.Exemplar exemplars = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public int getExemplarsCount() {
+ if (exemplarsBuilder_ == null) {
+ return exemplars_.size();
+ } else {
+ return exemplarsBuilder_.getCount();
+ }
+ }
+
+ /**
+ * repeated .prometheus.Exemplar exemplars = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.Exemplar getExemplars(int index) {
+ if (exemplarsBuilder_ == null) {
+ return exemplars_.get(index);
+ } else {
+ return exemplarsBuilder_.getMessage(index);
+ }
+ }
+
+ /**
+ * repeated .prometheus.Exemplar exemplars = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder setExemplars(int index, Types.Exemplar value) {
+ if (exemplarsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureExemplarsIsMutable();
+ exemplars_.set(index, value);
+ onChanged();
+ } else {
+ exemplarsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.Exemplar exemplars = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder setExemplars(int index, Types.Exemplar.Builder builderForValue) {
+ if (exemplarsBuilder_ == null) {
+ ensureExemplarsIsMutable();
+ exemplars_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ exemplarsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.Exemplar exemplars = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addExemplars(Types.Exemplar value) {
+ if (exemplarsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureExemplarsIsMutable();
+ exemplars_.add(value);
+ onChanged();
+ } else {
+ exemplarsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.Exemplar exemplars = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addExemplars(int index, Types.Exemplar value) {
+ if (exemplarsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureExemplarsIsMutable();
+ exemplars_.add(index, value);
+ onChanged();
+ } else {
+ exemplarsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.Exemplar exemplars = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addExemplars(Types.Exemplar.Builder builderForValue) {
+ if (exemplarsBuilder_ == null) {
+ ensureExemplarsIsMutable();
+ exemplars_.add(builderForValue.build());
+ onChanged();
+ } else {
+ exemplarsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.Exemplar exemplars = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addExemplars(int index, Types.Exemplar.Builder builderForValue) {
+ if (exemplarsBuilder_ == null) {
+ ensureExemplarsIsMutable();
+ exemplars_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ exemplarsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.Exemplar exemplars = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addAllExemplars(Iterable extends Types.Exemplar> values) {
+ if (exemplarsBuilder_ == null) {
+ ensureExemplarsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, exemplars_);
+ onChanged();
+ } else {
+ exemplarsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.Exemplar exemplars = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder clearExemplars() {
+ if (exemplarsBuilder_ == null) {
+ exemplars_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ onChanged();
+ } else {
+ exemplarsBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.Exemplar exemplars = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder removeExemplars(int index) {
+ if (exemplarsBuilder_ == null) {
+ ensureExemplarsIsMutable();
+ exemplars_.remove(index);
+ onChanged();
+ } else {
+ exemplarsBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.Exemplar exemplars = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.Exemplar.Builder getExemplarsBuilder(int index) {
+ return getExemplarsFieldBuilder().getBuilder(index);
+ }
+
+ /**
+ * repeated .prometheus.Exemplar exemplars = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.ExemplarOrBuilder getExemplarsOrBuilder(int index) {
+ if (exemplarsBuilder_ == null) {
+ return exemplars_.get(index);
+ } else {
+ return exemplarsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /**
+ * repeated .prometheus.Exemplar exemplars = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public java.util.List extends Types.ExemplarOrBuilder> getExemplarsOrBuilderList() {
+ if (exemplarsBuilder_ != null) {
+ return exemplarsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(exemplars_);
+ }
+ }
+
+ /**
+ * repeated .prometheus.Exemplar exemplars = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.Exemplar.Builder addExemplarsBuilder() {
+ return getExemplarsFieldBuilder().addBuilder(Types.Exemplar.getDefaultInstance());
+ }
+
+ /**
+ * repeated .prometheus.Exemplar exemplars = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.Exemplar.Builder addExemplarsBuilder(int index) {
+ return getExemplarsFieldBuilder()
+ .addBuilder(index, Types.Exemplar.getDefaultInstance());
+ }
+
+ /**
+ * repeated .prometheus.Exemplar exemplars = 3 [(.gogoproto.nullable) = false];
+ *
+ */
+ public java.util.Listrepeated .prometheus.Histogram histograms = 4 [(.gogoproto.nullable) = false];
+ *
+ */
+ public java.util.Listrepeated .prometheus.Histogram histograms = 4 [(.gogoproto.nullable) = false];
+ *
+ */
+ public int getHistogramsCount() {
+ if (histogramsBuilder_ == null) {
+ return histograms_.size();
+ } else {
+ return histogramsBuilder_.getCount();
+ }
+ }
+
+ /**
+ * repeated .prometheus.Histogram histograms = 4 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.Histogram getHistograms(int index) {
+ if (histogramsBuilder_ == null) {
+ return histograms_.get(index);
+ } else {
+ return histogramsBuilder_.getMessage(index);
+ }
+ }
+
+ /**
+ * repeated .prometheus.Histogram histograms = 4 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder setHistograms(int index, Types.Histogram value) {
+ if (histogramsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureHistogramsIsMutable();
+ histograms_.set(index, value);
+ onChanged();
+ } else {
+ histogramsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.Histogram histograms = 4 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder setHistograms(int index, Types.Histogram.Builder builderForValue) {
+ if (histogramsBuilder_ == null) {
+ ensureHistogramsIsMutable();
+ histograms_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ histogramsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.Histogram histograms = 4 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addHistograms(Types.Histogram value) {
+ if (histogramsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureHistogramsIsMutable();
+ histograms_.add(value);
+ onChanged();
+ } else {
+ histogramsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.Histogram histograms = 4 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addHistograms(int index, Types.Histogram value) {
+ if (histogramsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureHistogramsIsMutable();
+ histograms_.add(index, value);
+ onChanged();
+ } else {
+ histogramsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.Histogram histograms = 4 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addHistograms(Types.Histogram.Builder builderForValue) {
+ if (histogramsBuilder_ == null) {
+ ensureHistogramsIsMutable();
+ histograms_.add(builderForValue.build());
+ onChanged();
+ } else {
+ histogramsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.Histogram histograms = 4 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addHistograms(int index, Types.Histogram.Builder builderForValue) {
+ if (histogramsBuilder_ == null) {
+ ensureHistogramsIsMutable();
+ histograms_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ histogramsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.Histogram histograms = 4 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder addAllHistograms(Iterable extends Types.Histogram> values) {
+ if (histogramsBuilder_ == null) {
+ ensureHistogramsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, histograms_);
+ onChanged();
+ } else {
+ histogramsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.Histogram histograms = 4 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder clearHistograms() {
+ if (histogramsBuilder_ == null) {
+ histograms_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000008);
+ onChanged();
+ } else {
+ histogramsBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.Histogram histograms = 4 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Builder removeHistograms(int index) {
+ if (histogramsBuilder_ == null) {
+ ensureHistogramsIsMutable();
+ histograms_.remove(index);
+ onChanged();
+ } else {
+ histogramsBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /**
+ * repeated .prometheus.Histogram histograms = 4 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.Histogram.Builder getHistogramsBuilder(int index) {
+ return getHistogramsFieldBuilder().getBuilder(index);
+ }
+
+ /**
+ * repeated .prometheus.Histogram histograms = 4 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.HistogramOrBuilder getHistogramsOrBuilder(int index) {
+ if (histogramsBuilder_ == null) {
+ return histograms_.get(index);
+ } else {
+ return histogramsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /**
+ * repeated .prometheus.Histogram histograms = 4 [(.gogoproto.nullable) = false];
+ *
+ */
+ public java.util.List extends Types.HistogramOrBuilder> getHistogramsOrBuilderList() {
+ if (histogramsBuilder_ != null) {
+ return histogramsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(histograms_);
+ }
+ }
+
+ /**
+ * repeated .prometheus.Histogram histograms = 4 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.Histogram.Builder addHistogramsBuilder() {
+ return getHistogramsFieldBuilder().addBuilder(Types.Histogram.getDefaultInstance());
+ }
+
+ /**
+ * repeated .prometheus.Histogram histograms = 4 [(.gogoproto.nullable) = false];
+ *
+ */
+ public Types.Histogram.Builder addHistogramsBuilder(int index) {
+ return getHistogramsFieldBuilder()
+ .addBuilder(index, Types.Histogram.getDefaultInstance());
+ }
+
+ /**
+ * repeated .prometheus.Histogram histograms = 4 [(.gogoproto.nullable) = false];
+ *
+ */
+ public java.util.Liststring name = 1;
+ *
+ * @return The name.
+ */
+ String getName();
+
+ /**
+ * string name = 1;
+ *
+ * @return The bytes for name.
+ */
+ com.google.protobuf.ByteString getNameBytes();
+
+ /**
+ * string value = 2;
+ *
+ * @return The value.
+ */
+ String getValue();
+
+ /**
+ * string value = 2;
+ *
+ * @return The bytes for value.
+ */
+ com.google.protobuf.ByteString getValueBytes();
+ }
+
+ /** Protobuf type {@code prometheus.Label} */
+ public static final class Label extends com.google.protobuf.GeneratedMessageV3
+ implements
+ // @@protoc_insertion_point(message_implements:prometheus.Label)
+ LabelOrBuilder {
+ private static final long serialVersionUID = 0L;
+
+ // Use Label.newBuilder() to construct.
+ private Label(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
+ super(builder);
+ }
+
+ private Label() {
+ name_ = "";
+ value_ = "";
+ }
+
+ @Override
+ @SuppressWarnings({"unused"})
+ protected Object newInstance(UnusedPrivateParameter unused) {
+ return new Label();
+ }
+
+ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
+ return Types.internal_static_prometheus_Label_descriptor;
+ }
+
+ @Override
+ protected FieldAccessorTable internalGetFieldAccessorTable() {
+ return Types.internal_static_prometheus_Label_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(Types.Label.class, Types.Label.Builder.class);
+ }
+
+ public static final int NAME_FIELD_NUMBER = 1;
+
+ @SuppressWarnings("serial")
+ private volatile Object name_ = "";
+
+ /**
+ * string name = 1;
+ *
+ * @return The name.
+ */
+ @Override
+ public String getName() {
+ Object ref = name_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * string name = 1;
+ *
+ * @return The bytes for name.
+ */
+ @Override
+ public com.google.protobuf.ByteString getNameBytes() {
+ Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int VALUE_FIELD_NUMBER = 2;
+
+ @SuppressWarnings("serial")
+ private volatile Object value_ = "";
+
+ /**
+ * string value = 2;
+ *
+ * @return The value.
+ */
+ @Override
+ public String getValue() {
+ Object ref = value_;
+ if (ref instanceof String) {
+ return (String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ value_ = s;
+ return s;
+ }
+ }
+
+ /**
+ * string value = 2;
+ *
+ * @return The bytes for value.
+ */
+ @Override
+ public com.google.protobuf.ByteString getValueBytes() {
+ Object ref = value_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((String) ref);
+ value_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) {
+ return true;
+ }
+ if (isInitialized == 0) {
+ return false;
+ }
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output)
+ throws java.io.IOException {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) {
+ return size;
+ }
+
+ size = 0;
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof Types.Label)) {
+ return super.equals(obj);
+ }
+ Types.Label other = (Types.Label) obj;
+
+ if (!getName().equals(other.getName())) {
+ return false;
+ }
+ if (!getValue().equals(other.getValue())) {
+ return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ hash = (37 * hash) + VALUE_FIELD_NUMBER;
+ hash = (53 * hash) + getValue().hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static Types.Label parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Types.Label parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Types.Label parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Types.Label parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Types.Label parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static Types.Label parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static Types.Label parseFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static Types.Label parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static Types.Label parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input);
+ }
+
+ public static Types.Label parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static Types.Label parseFrom(com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static Types.Label parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(Types.Label prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @Override
+ protected Builder newBuilderForType(BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /** Protobuf type {@code prometheus.Label} */
+ public static final class Builder
+ extends com.google.protobuf.GeneratedMessageV3.Builderstring name = 1;
+ *
+ * @return The name.
+ */
+ public String getName() {
+ Object ref = name_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * string name = 1;
+ *
+ * @return The bytes for name.
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * string name = 1;
+ *
+ * @param value The name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setName(String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ name_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * string name = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearName() {
+ name_ = getDefaultInstance().getName();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+
+ /**
+ * 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();
+ }
+ checkByteStringIsUtf8(value);
+ name_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ private Object value_ = "";
+
+ /**
+ * string value = 2;
+ *
+ * @return The value.
+ */
+ public String getValue() {
+ Object ref = value_;
+ if (!(ref instanceof String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ String s = bs.toStringUtf8();
+ value_ = s;
+ return s;
+ } else {
+ return (String) ref;
+ }
+ }
+
+ /**
+ * string value = 2;
+ *
+ * @return The bytes for value.
+ */
+ public com.google.protobuf.ByteString getValueBytes() {
+ Object ref = value_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((String) ref);
+ value_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ * string value = 2;
+ *
+ * @param value The value to set.
+ * @return This builder for chaining.
+ */
+ public Builder setValue(String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ value_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ * string value = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearValue() {
+ value_ = getDefaultInstance().getValue();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+
+ /**
+ * 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();
+ }
+ checkByteStringIsUtf8(value);
+ value_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ @Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:prometheus.Label)
+ }
+
+ // @@protoc_insertion_point(class_scope:prometheus.Label)
+ private static final Types.Label DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new Types.Label();
+ }
+
+ public static Types.Label getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser