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

io.opentelemetry.proto.metrics.v1.Metric Maven / Gradle / Ivy

There is a newer version: 1.0.46
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: opentelemetry/proto/metrics/v1/metrics.proto

package io.opentelemetry.proto.metrics.v1;

/**
 * 
 * Defines a Metric which has one or more timeseries.  The following is a
 * brief summary of the Metric data model.  For more details, see:
 *   https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md
 * The data model and relation between entities is shown in the
 * diagram below. Here, "DataPoint" is the term used to refer to any
 * one of the specific data point value types, and "points" is the term used
 * to refer to any one of the lists of points contained in the Metric.
 * - Metric is composed of a metadata and data.
 * - Metadata part contains a name, description, unit.
 * - Data is one of the possible types (Sum, Gauge, Histogram, Summary).
 * - DataPoint contains timestamps, attributes, and one of the possible value type
 *   fields.
 *     Metric
 *  +------------+
 *  |name        |
 *  |description |
 *  |unit        |     +------------------------------------+
 *  |data        |---> |Gauge, Sum, Histogram, Summary, ... |
 *  +------------+     +------------------------------------+
 *    Data [One of Gauge, Sum, Histogram, Summary, ...]
 *  +-----------+
 *  |...        |  // Metadata about the Data.
 *  |points     |--+
 *  +-----------+  |
 *                 |      +---------------------------+
 *                 |      |DataPoint 1                |
 *                 v      |+------+------+   +------+ |
 *              +-----+   ||label |label |...|label | |
 *              |  1  |-->||value1|value2|...|valueN| |
 *              +-----+   |+------+------+   +------+ |
 *              |  .  |   |+-----+                    |
 *              |  .  |   ||value|                    |
 *              |  .  |   |+-----+                    |
 *              |  .  |   +---------------------------+
 *              |  .  |                   .
 *              |  .  |                   .
 *              |  .  |                   .
 *              |  .  |   +---------------------------+
 *              |  .  |   |DataPoint M                |
 *              +-----+   |+------+------+   +------+ |
 *              |  M  |-->||label |label |...|label | |
 *              +-----+   ||value1|value2|...|valueN| |
 *                        |+------+------+   +------+ |
 *                        |+-----+                    |
 *                        ||value|                    |
 *                        |+-----+                    |
 *                        +---------------------------+
 * Each distinct type of DataPoint represents the output of a specific
 * aggregation function, the result of applying the DataPoint's
 * associated function of to one or more measurements.
 * All DataPoint types have three common fields:
 * - Attributes includes key-value pairs associated with the data point
 * - TimeUnixNano is required, set to the end time of the aggregation
 * - StartTimeUnixNano is optional, but strongly encouraged for DataPoints
 *   having an AggregationTemporality field, as discussed below.
 * Both TimeUnixNano and StartTimeUnixNano values are expressed as
 * UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
 * # TimeUnixNano
 * This field is required, having consistent interpretation across
 * DataPoint types.  TimeUnixNano is the moment corresponding to when
 * the data point's aggregate value was captured.
 * Data points with the 0 value for TimeUnixNano SHOULD be rejected
 * by consumers.
 * # StartTimeUnixNano
 * StartTimeUnixNano in general allows detecting when a sequence of
 * observations is unbroken.  This field indicates to consumers the
 * start time for points with cumulative and delta
 * AggregationTemporality, and it should be included whenever possible
 * to support correct rate calculation.  Although it may be omitted
 * when the start time is truly unknown, setting StartTimeUnixNano is
 * strongly encouraged.
 * 
* * Protobuf type {@code opentelemetry.proto.metrics.v1.Metric} */ public final class Metric extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:opentelemetry.proto.metrics.v1.Metric) MetricOrBuilder { private static final long serialVersionUID = 0L; // Use Metric.newBuilder() to construct. private Metric(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Metric() { name_ = ""; description_ = ""; unit_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Metric(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private Metric( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); name_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); description_ = s; break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); unit_ = s; break; } case 42: { io.opentelemetry.proto.metrics.v1.Gauge.Builder subBuilder = null; if (dataCase_ == 5) { subBuilder = ((io.opentelemetry.proto.metrics.v1.Gauge) data_).toBuilder(); } data_ = input.readMessage(io.opentelemetry.proto.metrics.v1.Gauge.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((io.opentelemetry.proto.metrics.v1.Gauge) data_); data_ = subBuilder.buildPartial(); } dataCase_ = 5; break; } case 58: { io.opentelemetry.proto.metrics.v1.Sum.Builder subBuilder = null; if (dataCase_ == 7) { subBuilder = ((io.opentelemetry.proto.metrics.v1.Sum) data_).toBuilder(); } data_ = input.readMessage(io.opentelemetry.proto.metrics.v1.Sum.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((io.opentelemetry.proto.metrics.v1.Sum) data_); data_ = subBuilder.buildPartial(); } dataCase_ = 7; break; } case 74: { io.opentelemetry.proto.metrics.v1.Histogram.Builder subBuilder = null; if (dataCase_ == 9) { subBuilder = ((io.opentelemetry.proto.metrics.v1.Histogram) data_).toBuilder(); } data_ = input.readMessage(io.opentelemetry.proto.metrics.v1.Histogram.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((io.opentelemetry.proto.metrics.v1.Histogram) data_); data_ = subBuilder.buildPartial(); } dataCase_ = 9; break; } case 82: { io.opentelemetry.proto.metrics.v1.ExponentialHistogram.Builder subBuilder = null; if (dataCase_ == 10) { subBuilder = ((io.opentelemetry.proto.metrics.v1.ExponentialHistogram) data_).toBuilder(); } data_ = input.readMessage(io.opentelemetry.proto.metrics.v1.ExponentialHistogram.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((io.opentelemetry.proto.metrics.v1.ExponentialHistogram) data_); data_ = subBuilder.buildPartial(); } dataCase_ = 10; break; } case 90: { io.opentelemetry.proto.metrics.v1.Summary.Builder subBuilder = null; if (dataCase_ == 11) { subBuilder = ((io.opentelemetry.proto.metrics.v1.Summary) data_).toBuilder(); } data_ = input.readMessage(io.opentelemetry.proto.metrics.v1.Summary.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom((io.opentelemetry.proto.metrics.v1.Summary) data_); data_ = subBuilder.buildPartial(); } dataCase_ = 11; break; } default: { if (!parseUnknownField( input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.opentelemetry.proto.metrics.v1.MetricsProto.internal_static_opentelemetry_proto_metrics_v1_Metric_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.opentelemetry.proto.metrics.v1.MetricsProto.internal_static_opentelemetry_proto_metrics_v1_Metric_fieldAccessorTable .ensureFieldAccessorsInitialized( io.opentelemetry.proto.metrics.v1.Metric.class, io.opentelemetry.proto.metrics.v1.Metric.Builder.class); } private int dataCase_ = 0; private java.lang.Object data_; public enum DataCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { GAUGE(5), SUM(7), HISTOGRAM(9), EXPONENTIAL_HISTOGRAM(10), SUMMARY(11), DATA_NOT_SET(0); private final int value; private DataCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static DataCase valueOf(int value) { return forNumber(value); } public static DataCase forNumber(int value) { switch (value) { case 5: return GAUGE; case 7: return SUM; case 9: return HISTOGRAM; case 10: return EXPONENTIAL_HISTOGRAM; case 11: return SUMMARY; case 0: return DATA_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public DataCase getDataCase() { return DataCase.forNumber( dataCase_); } public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** *
   * name of the metric, including its DNS name prefix. It must be unique.
   * 
* * string name = 1; * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** *
   * name of the metric, including its DNS name prefix. It must be unique.
   * 
* * string name = 1; * @return The bytes for name. */ @java.lang.Override public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DESCRIPTION_FIELD_NUMBER = 2; private volatile java.lang.Object description_; /** *
   * description of the metric, which can be used in documentation.
   * 
* * string description = 2; * @return The description. */ @java.lang.Override public java.lang.String getDescription() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; } } /** *
   * description of the metric, which can be used in documentation.
   * 
* * string description = 2; * @return The bytes for description. */ @java.lang.Override public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int UNIT_FIELD_NUMBER = 3; private volatile java.lang.Object unit_; /** *
   * unit in which the metric value is reported. Follows the format
   * described by http://unitsofmeasure.org/ucum.html.
   * 
* * string unit = 3; * @return The unit. */ @java.lang.Override public java.lang.String getUnit() { java.lang.Object ref = unit_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); unit_ = s; return s; } } /** *
   * unit in which the metric value is reported. Follows the format
   * described by http://unitsofmeasure.org/ucum.html.
   * 
* * string unit = 3; * @return The bytes for unit. */ @java.lang.Override public com.google.protobuf.ByteString getUnitBytes() { java.lang.Object ref = unit_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); unit_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int GAUGE_FIELD_NUMBER = 5; /** * .opentelemetry.proto.metrics.v1.Gauge gauge = 5; * @return Whether the gauge field is set. */ @java.lang.Override public boolean hasGauge() { return dataCase_ == 5; } /** * .opentelemetry.proto.metrics.v1.Gauge gauge = 5; * @return The gauge. */ @java.lang.Override public io.opentelemetry.proto.metrics.v1.Gauge getGauge() { if (dataCase_ == 5) { return (io.opentelemetry.proto.metrics.v1.Gauge) data_; } return io.opentelemetry.proto.metrics.v1.Gauge.getDefaultInstance(); } /** * .opentelemetry.proto.metrics.v1.Gauge gauge = 5; */ @java.lang.Override public io.opentelemetry.proto.metrics.v1.GaugeOrBuilder getGaugeOrBuilder() { if (dataCase_ == 5) { return (io.opentelemetry.proto.metrics.v1.Gauge) data_; } return io.opentelemetry.proto.metrics.v1.Gauge.getDefaultInstance(); } public static final int SUM_FIELD_NUMBER = 7; /** * .opentelemetry.proto.metrics.v1.Sum sum = 7; * @return Whether the sum field is set. */ @java.lang.Override public boolean hasSum() { return dataCase_ == 7; } /** * .opentelemetry.proto.metrics.v1.Sum sum = 7; * @return The sum. */ @java.lang.Override public io.opentelemetry.proto.metrics.v1.Sum getSum() { if (dataCase_ == 7) { return (io.opentelemetry.proto.metrics.v1.Sum) data_; } return io.opentelemetry.proto.metrics.v1.Sum.getDefaultInstance(); } /** * .opentelemetry.proto.metrics.v1.Sum sum = 7; */ @java.lang.Override public io.opentelemetry.proto.metrics.v1.SumOrBuilder getSumOrBuilder() { if (dataCase_ == 7) { return (io.opentelemetry.proto.metrics.v1.Sum) data_; } return io.opentelemetry.proto.metrics.v1.Sum.getDefaultInstance(); } public static final int HISTOGRAM_FIELD_NUMBER = 9; /** * .opentelemetry.proto.metrics.v1.Histogram histogram = 9; * @return Whether the histogram field is set. */ @java.lang.Override public boolean hasHistogram() { return dataCase_ == 9; } /** * .opentelemetry.proto.metrics.v1.Histogram histogram = 9; * @return The histogram. */ @java.lang.Override public io.opentelemetry.proto.metrics.v1.Histogram getHistogram() { if (dataCase_ == 9) { return (io.opentelemetry.proto.metrics.v1.Histogram) data_; } return io.opentelemetry.proto.metrics.v1.Histogram.getDefaultInstance(); } /** * .opentelemetry.proto.metrics.v1.Histogram histogram = 9; */ @java.lang.Override public io.opentelemetry.proto.metrics.v1.HistogramOrBuilder getHistogramOrBuilder() { if (dataCase_ == 9) { return (io.opentelemetry.proto.metrics.v1.Histogram) data_; } return io.opentelemetry.proto.metrics.v1.Histogram.getDefaultInstance(); } public static final int EXPONENTIAL_HISTOGRAM_FIELD_NUMBER = 10; /** * .opentelemetry.proto.metrics.v1.ExponentialHistogram exponential_histogram = 10; * @return Whether the exponentialHistogram field is set. */ @java.lang.Override public boolean hasExponentialHistogram() { return dataCase_ == 10; } /** * .opentelemetry.proto.metrics.v1.ExponentialHistogram exponential_histogram = 10; * @return The exponentialHistogram. */ @java.lang.Override public io.opentelemetry.proto.metrics.v1.ExponentialHistogram getExponentialHistogram() { if (dataCase_ == 10) { return (io.opentelemetry.proto.metrics.v1.ExponentialHistogram) data_; } return io.opentelemetry.proto.metrics.v1.ExponentialHistogram.getDefaultInstance(); } /** * .opentelemetry.proto.metrics.v1.ExponentialHistogram exponential_histogram = 10; */ @java.lang.Override public io.opentelemetry.proto.metrics.v1.ExponentialHistogramOrBuilder getExponentialHistogramOrBuilder() { if (dataCase_ == 10) { return (io.opentelemetry.proto.metrics.v1.ExponentialHistogram) data_; } return io.opentelemetry.proto.metrics.v1.ExponentialHistogram.getDefaultInstance(); } public static final int SUMMARY_FIELD_NUMBER = 11; /** * .opentelemetry.proto.metrics.v1.Summary summary = 11; * @return Whether the summary field is set. */ @java.lang.Override public boolean hasSummary() { return dataCase_ == 11; } /** * .opentelemetry.proto.metrics.v1.Summary summary = 11; * @return The summary. */ @java.lang.Override public io.opentelemetry.proto.metrics.v1.Summary getSummary() { if (dataCase_ == 11) { return (io.opentelemetry.proto.metrics.v1.Summary) data_; } return io.opentelemetry.proto.metrics.v1.Summary.getDefaultInstance(); } /** * .opentelemetry.proto.metrics.v1.Summary summary = 11; */ @java.lang.Override public io.opentelemetry.proto.metrics.v1.SummaryOrBuilder getSummaryOrBuilder() { if (dataCase_ == 11) { return (io.opentelemetry.proto.metrics.v1.Summary) data_; } return io.opentelemetry.proto.metrics.v1.Summary.getDefaultInstance(); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(unit_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unit_); } if (dataCase_ == 5) { output.writeMessage(5, (io.opentelemetry.proto.metrics.v1.Gauge) data_); } if (dataCase_ == 7) { output.writeMessage(7, (io.opentelemetry.proto.metrics.v1.Sum) data_); } if (dataCase_ == 9) { output.writeMessage(9, (io.opentelemetry.proto.metrics.v1.Histogram) data_); } if (dataCase_ == 10) { output.writeMessage(10, (io.opentelemetry.proto.metrics.v1.ExponentialHistogram) data_); } if (dataCase_ == 11) { output.writeMessage(11, (io.opentelemetry.proto.metrics.v1.Summary) data_); } unknownFields.writeTo(output); } @java.lang.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(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(unit_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, unit_); } if (dataCase_ == 5) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, (io.opentelemetry.proto.metrics.v1.Gauge) data_); } if (dataCase_ == 7) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(7, (io.opentelemetry.proto.metrics.v1.Sum) data_); } if (dataCase_ == 9) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(9, (io.opentelemetry.proto.metrics.v1.Histogram) data_); } if (dataCase_ == 10) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(10, (io.opentelemetry.proto.metrics.v1.ExponentialHistogram) data_); } if (dataCase_ == 11) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(11, (io.opentelemetry.proto.metrics.v1.Summary) data_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof io.opentelemetry.proto.metrics.v1.Metric)) { return super.equals(obj); } io.opentelemetry.proto.metrics.v1.Metric other = (io.opentelemetry.proto.metrics.v1.Metric) obj; if (!getName() .equals(other.getName())) return false; if (!getDescription() .equals(other.getDescription())) return false; if (!getUnit() .equals(other.getUnit())) return false; if (!getDataCase().equals(other.getDataCase())) return false; switch (dataCase_) { case 5: if (!getGauge() .equals(other.getGauge())) return false; break; case 7: if (!getSum() .equals(other.getSum())) return false; break; case 9: if (!getHistogram() .equals(other.getHistogram())) return false; break; case 10: if (!getExponentialHistogram() .equals(other.getExponentialHistogram())) return false; break; case 11: if (!getSummary() .equals(other.getSummary())) return false; break; case 0: default: } if (!unknownFields.equals(other.unknownFields)) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); hash = (37 * hash) + UNIT_FIELD_NUMBER; hash = (53 * hash) + getUnit().hashCode(); switch (dataCase_) { case 5: hash = (37 * hash) + GAUGE_FIELD_NUMBER; hash = (53 * hash) + getGauge().hashCode(); break; case 7: hash = (37 * hash) + SUM_FIELD_NUMBER; hash = (53 * hash) + getSum().hashCode(); break; case 9: hash = (37 * hash) + HISTOGRAM_FIELD_NUMBER; hash = (53 * hash) + getHistogram().hashCode(); break; case 10: hash = (37 * hash) + EXPONENTIAL_HISTOGRAM_FIELD_NUMBER; hash = (53 * hash) + getExponentialHistogram().hashCode(); break; case 11: hash = (37 * hash) + SUMMARY_FIELD_NUMBER; hash = (53 * hash) + getSummary().hashCode(); break; case 0: default: } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static io.opentelemetry.proto.metrics.v1.Metric parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opentelemetry.proto.metrics.v1.Metric parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opentelemetry.proto.metrics.v1.Metric parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opentelemetry.proto.metrics.v1.Metric parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opentelemetry.proto.metrics.v1.Metric parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static io.opentelemetry.proto.metrics.v1.Metric parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static io.opentelemetry.proto.metrics.v1.Metric parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.opentelemetry.proto.metrics.v1.Metric parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } public static io.opentelemetry.proto.metrics.v1.Metric parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static io.opentelemetry.proto.metrics.v1.Metric parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } public static io.opentelemetry.proto.metrics.v1.Metric parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static io.opentelemetry.proto.metrics.v1.Metric parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(io.opentelemetry.proto.metrics.v1.Metric prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** *
   * Defines a Metric which has one or more timeseries.  The following is a
   * brief summary of the Metric data model.  For more details, see:
   *   https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md
   * The data model and relation between entities is shown in the
   * diagram below. Here, "DataPoint" is the term used to refer to any
   * one of the specific data point value types, and "points" is the term used
   * to refer to any one of the lists of points contained in the Metric.
   * - Metric is composed of a metadata and data.
   * - Metadata part contains a name, description, unit.
   * - Data is one of the possible types (Sum, Gauge, Histogram, Summary).
   * - DataPoint contains timestamps, attributes, and one of the possible value type
   *   fields.
   *     Metric
   *  +------------+
   *  |name        |
   *  |description |
   *  |unit        |     +------------------------------------+
   *  |data        |---> |Gauge, Sum, Histogram, Summary, ... |
   *  +------------+     +------------------------------------+
   *    Data [One of Gauge, Sum, Histogram, Summary, ...]
   *  +-----------+
   *  |...        |  // Metadata about the Data.
   *  |points     |--+
   *  +-----------+  |
   *                 |      +---------------------------+
   *                 |      |DataPoint 1                |
   *                 v      |+------+------+   +------+ |
   *              +-----+   ||label |label |...|label | |
   *              |  1  |-->||value1|value2|...|valueN| |
   *              +-----+   |+------+------+   +------+ |
   *              |  .  |   |+-----+                    |
   *              |  .  |   ||value|                    |
   *              |  .  |   |+-----+                    |
   *              |  .  |   +---------------------------+
   *              |  .  |                   .
   *              |  .  |                   .
   *              |  .  |                   .
   *              |  .  |   +---------------------------+
   *              |  .  |   |DataPoint M                |
   *              +-----+   |+------+------+   +------+ |
   *              |  M  |-->||label |label |...|label | |
   *              +-----+   ||value1|value2|...|valueN| |
   *                        |+------+------+   +------+ |
   *                        |+-----+                    |
   *                        ||value|                    |
   *                        |+-----+                    |
   *                        +---------------------------+
   * Each distinct type of DataPoint represents the output of a specific
   * aggregation function, the result of applying the DataPoint's
   * associated function of to one or more measurements.
   * All DataPoint types have three common fields:
   * - Attributes includes key-value pairs associated with the data point
   * - TimeUnixNano is required, set to the end time of the aggregation
   * - StartTimeUnixNano is optional, but strongly encouraged for DataPoints
   *   having an AggregationTemporality field, as discussed below.
   * Both TimeUnixNano and StartTimeUnixNano values are expressed as
   * UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
   * # TimeUnixNano
   * This field is required, having consistent interpretation across
   * DataPoint types.  TimeUnixNano is the moment corresponding to when
   * the data point's aggregate value was captured.
   * Data points with the 0 value for TimeUnixNano SHOULD be rejected
   * by consumers.
   * # StartTimeUnixNano
   * StartTimeUnixNano in general allows detecting when a sequence of
   * observations is unbroken.  This field indicates to consumers the
   * start time for points with cumulative and delta
   * AggregationTemporality, and it should be included whenever possible
   * to support correct rate calculation.  Although it may be omitted
   * when the start time is truly unknown, setting StartTimeUnixNano is
   * strongly encouraged.
   * 
* * Protobuf type {@code opentelemetry.proto.metrics.v1.Metric} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:opentelemetry.proto.metrics.v1.Metric) io.opentelemetry.proto.metrics.v1.MetricOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.opentelemetry.proto.metrics.v1.MetricsProto.internal_static_opentelemetry_proto_metrics_v1_Metric_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return io.opentelemetry.proto.metrics.v1.MetricsProto.internal_static_opentelemetry_proto_metrics_v1_Metric_fieldAccessorTable .ensureFieldAccessorsInitialized( io.opentelemetry.proto.metrics.v1.Metric.class, io.opentelemetry.proto.metrics.v1.Metric.Builder.class); } // Construct using io.opentelemetry.proto.metrics.v1.Metric.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { } } @java.lang.Override public Builder clear() { super.clear(); name_ = ""; description_ = ""; unit_ = ""; dataCase_ = 0; data_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return io.opentelemetry.proto.metrics.v1.MetricsProto.internal_static_opentelemetry_proto_metrics_v1_Metric_descriptor; } @java.lang.Override public io.opentelemetry.proto.metrics.v1.Metric getDefaultInstanceForType() { return io.opentelemetry.proto.metrics.v1.Metric.getDefaultInstance(); } @java.lang.Override public io.opentelemetry.proto.metrics.v1.Metric build() { io.opentelemetry.proto.metrics.v1.Metric result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public io.opentelemetry.proto.metrics.v1.Metric buildPartial() { io.opentelemetry.proto.metrics.v1.Metric result = new io.opentelemetry.proto.metrics.v1.Metric(this); result.name_ = name_; result.description_ = description_; result.unit_ = unit_; if (dataCase_ == 5) { if (gaugeBuilder_ == null) { result.data_ = data_; } else { result.data_ = gaugeBuilder_.build(); } } if (dataCase_ == 7) { if (sumBuilder_ == null) { result.data_ = data_; } else { result.data_ = sumBuilder_.build(); } } if (dataCase_ == 9) { if (histogramBuilder_ == null) { result.data_ = data_; } else { result.data_ = histogramBuilder_.build(); } } if (dataCase_ == 10) { if (exponentialHistogramBuilder_ == null) { result.data_ = data_; } else { result.data_ = exponentialHistogramBuilder_.build(); } } if (dataCase_ == 11) { if (summaryBuilder_ == null) { result.data_ = data_; } else { result.data_ = summaryBuilder_.build(); } } result.dataCase_ = dataCase_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField( com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof( com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof io.opentelemetry.proto.metrics.v1.Metric) { return mergeFrom((io.opentelemetry.proto.metrics.v1.Metric)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(io.opentelemetry.proto.metrics.v1.Metric other) { if (other == io.opentelemetry.proto.metrics.v1.Metric.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (!other.getDescription().isEmpty()) { description_ = other.description_; onChanged(); } if (!other.getUnit().isEmpty()) { unit_ = other.unit_; onChanged(); } switch (other.getDataCase()) { case GAUGE: { mergeGauge(other.getGauge()); break; } case SUM: { mergeSum(other.getSum()); break; } case HISTOGRAM: { mergeHistogram(other.getHistogram()); break; } case EXPONENTIAL_HISTOGRAM: { mergeExponentialHistogram(other.getExponentialHistogram()); break; } case SUMMARY: { mergeSummary(other.getSummary()); break; } case DATA_NOT_SET: { break; } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { io.opentelemetry.proto.metrics.v1.Metric parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (io.opentelemetry.proto.metrics.v1.Metric) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int dataCase_ = 0; private java.lang.Object data_; public DataCase getDataCase() { return DataCase.forNumber( dataCase_); } public Builder clearData() { dataCase_ = 0; data_ = null; onChanged(); return this; } private java.lang.Object name_ = ""; /** *
     * name of the metric, including its DNS name prefix. It must be unique.
     * 
* * string name = 1; * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * name of the metric, including its DNS name prefix. It must be unique.
     * 
* * string name = 1; * @return The bytes for name. */ public com.google.protobuf.ByteString getNameBytes() { java.lang.Object ref = name_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); name_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * name of the metric, including its DNS name prefix. It must be unique.
     * 
* * string name = 1; * @param value The name to set. * @return This builder for chaining. */ public Builder setName( java.lang.String value) { if (value == null) { throw new NullPointerException(); } name_ = value; onChanged(); return this; } /** *
     * name of the metric, including its DNS name prefix. It must be unique.
     * 
* * string name = 1; * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /** *
     * name of the metric, including its DNS name prefix. It must be unique.
     * 
* * 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; onChanged(); return this; } private java.lang.Object description_ = ""; /** *
     * description of the metric, which can be used in documentation.
     * 
* * string description = 2; * @return The description. */ public java.lang.String getDescription() { java.lang.Object ref = description_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * description of the metric, which can be used in documentation.
     * 
* * string description = 2; * @return The bytes for description. */ public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * description of the metric, which can be used in documentation.
     * 
* * string description = 2; * @param value The description to set. * @return This builder for chaining. */ public Builder setDescription( java.lang.String value) { if (value == null) { throw new NullPointerException(); } description_ = value; onChanged(); return this; } /** *
     * description of the metric, which can be used in documentation.
     * 
* * string description = 2; * @return This builder for chaining. */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); onChanged(); return this; } /** *
     * description of the metric, which can be used in documentation.
     * 
* * string description = 2; * @param value The bytes for description to set. * @return This builder for chaining. */ public Builder setDescriptionBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); description_ = value; onChanged(); return this; } private java.lang.Object unit_ = ""; /** *
     * unit in which the metric value is reported. Follows the format
     * described by http://unitsofmeasure.org/ucum.html.
     * 
* * string unit = 3; * @return The unit. */ public java.lang.String getUnit() { java.lang.Object ref = unit_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); unit_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * unit in which the metric value is reported. Follows the format
     * described by http://unitsofmeasure.org/ucum.html.
     * 
* * string unit = 3; * @return The bytes for unit. */ public com.google.protobuf.ByteString getUnitBytes() { java.lang.Object ref = unit_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); unit_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * unit in which the metric value is reported. Follows the format
     * described by http://unitsofmeasure.org/ucum.html.
     * 
* * string unit = 3; * @param value The unit to set. * @return This builder for chaining. */ public Builder setUnit( java.lang.String value) { if (value == null) { throw new NullPointerException(); } unit_ = value; onChanged(); return this; } /** *
     * unit in which the metric value is reported. Follows the format
     * described by http://unitsofmeasure.org/ucum.html.
     * 
* * string unit = 3; * @return This builder for chaining. */ public Builder clearUnit() { unit_ = getDefaultInstance().getUnit(); onChanged(); return this; } /** *
     * unit in which the metric value is reported. Follows the format
     * described by http://unitsofmeasure.org/ucum.html.
     * 
* * string unit = 3; * @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; onChanged(); return this; } private com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.metrics.v1.Gauge, io.opentelemetry.proto.metrics.v1.Gauge.Builder, io.opentelemetry.proto.metrics.v1.GaugeOrBuilder> gaugeBuilder_; /** * .opentelemetry.proto.metrics.v1.Gauge gauge = 5; * @return Whether the gauge field is set. */ @java.lang.Override public boolean hasGauge() { return dataCase_ == 5; } /** * .opentelemetry.proto.metrics.v1.Gauge gauge = 5; * @return The gauge. */ @java.lang.Override public io.opentelemetry.proto.metrics.v1.Gauge getGauge() { if (gaugeBuilder_ == null) { if (dataCase_ == 5) { return (io.opentelemetry.proto.metrics.v1.Gauge) data_; } return io.opentelemetry.proto.metrics.v1.Gauge.getDefaultInstance(); } else { if (dataCase_ == 5) { return gaugeBuilder_.getMessage(); } return io.opentelemetry.proto.metrics.v1.Gauge.getDefaultInstance(); } } /** * .opentelemetry.proto.metrics.v1.Gauge gauge = 5; */ public Builder setGauge(io.opentelemetry.proto.metrics.v1.Gauge value) { if (gaugeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } data_ = value; onChanged(); } else { gaugeBuilder_.setMessage(value); } dataCase_ = 5; return this; } /** * .opentelemetry.proto.metrics.v1.Gauge gauge = 5; */ public Builder setGauge( io.opentelemetry.proto.metrics.v1.Gauge.Builder builderForValue) { if (gaugeBuilder_ == null) { data_ = builderForValue.build(); onChanged(); } else { gaugeBuilder_.setMessage(builderForValue.build()); } dataCase_ = 5; return this; } /** * .opentelemetry.proto.metrics.v1.Gauge gauge = 5; */ public Builder mergeGauge(io.opentelemetry.proto.metrics.v1.Gauge value) { if (gaugeBuilder_ == null) { if (dataCase_ == 5 && data_ != io.opentelemetry.proto.metrics.v1.Gauge.getDefaultInstance()) { data_ = io.opentelemetry.proto.metrics.v1.Gauge.newBuilder((io.opentelemetry.proto.metrics.v1.Gauge) data_) .mergeFrom(value).buildPartial(); } else { data_ = value; } onChanged(); } else { if (dataCase_ == 5) { gaugeBuilder_.mergeFrom(value); } else { gaugeBuilder_.setMessage(value); } } dataCase_ = 5; return this; } /** * .opentelemetry.proto.metrics.v1.Gauge gauge = 5; */ public Builder clearGauge() { if (gaugeBuilder_ == null) { if (dataCase_ == 5) { dataCase_ = 0; data_ = null; onChanged(); } } else { if (dataCase_ == 5) { dataCase_ = 0; data_ = null; } gaugeBuilder_.clear(); } return this; } /** * .opentelemetry.proto.metrics.v1.Gauge gauge = 5; */ public io.opentelemetry.proto.metrics.v1.Gauge.Builder getGaugeBuilder() { return getGaugeFieldBuilder().getBuilder(); } /** * .opentelemetry.proto.metrics.v1.Gauge gauge = 5; */ @java.lang.Override public io.opentelemetry.proto.metrics.v1.GaugeOrBuilder getGaugeOrBuilder() { if ((dataCase_ == 5) && (gaugeBuilder_ != null)) { return gaugeBuilder_.getMessageOrBuilder(); } else { if (dataCase_ == 5) { return (io.opentelemetry.proto.metrics.v1.Gauge) data_; } return io.opentelemetry.proto.metrics.v1.Gauge.getDefaultInstance(); } } /** * .opentelemetry.proto.metrics.v1.Gauge gauge = 5; */ private com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.metrics.v1.Gauge, io.opentelemetry.proto.metrics.v1.Gauge.Builder, io.opentelemetry.proto.metrics.v1.GaugeOrBuilder> getGaugeFieldBuilder() { if (gaugeBuilder_ == null) { if (!(dataCase_ == 5)) { data_ = io.opentelemetry.proto.metrics.v1.Gauge.getDefaultInstance(); } gaugeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.metrics.v1.Gauge, io.opentelemetry.proto.metrics.v1.Gauge.Builder, io.opentelemetry.proto.metrics.v1.GaugeOrBuilder>( (io.opentelemetry.proto.metrics.v1.Gauge) data_, getParentForChildren(), isClean()); data_ = null; } dataCase_ = 5; onChanged();; return gaugeBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.metrics.v1.Sum, io.opentelemetry.proto.metrics.v1.Sum.Builder, io.opentelemetry.proto.metrics.v1.SumOrBuilder> sumBuilder_; /** * .opentelemetry.proto.metrics.v1.Sum sum = 7; * @return Whether the sum field is set. */ @java.lang.Override public boolean hasSum() { return dataCase_ == 7; } /** * .opentelemetry.proto.metrics.v1.Sum sum = 7; * @return The sum. */ @java.lang.Override public io.opentelemetry.proto.metrics.v1.Sum getSum() { if (sumBuilder_ == null) { if (dataCase_ == 7) { return (io.opentelemetry.proto.metrics.v1.Sum) data_; } return io.opentelemetry.proto.metrics.v1.Sum.getDefaultInstance(); } else { if (dataCase_ == 7) { return sumBuilder_.getMessage(); } return io.opentelemetry.proto.metrics.v1.Sum.getDefaultInstance(); } } /** * .opentelemetry.proto.metrics.v1.Sum sum = 7; */ public Builder setSum(io.opentelemetry.proto.metrics.v1.Sum value) { if (sumBuilder_ == null) { if (value == null) { throw new NullPointerException(); } data_ = value; onChanged(); } else { sumBuilder_.setMessage(value); } dataCase_ = 7; return this; } /** * .opentelemetry.proto.metrics.v1.Sum sum = 7; */ public Builder setSum( io.opentelemetry.proto.metrics.v1.Sum.Builder builderForValue) { if (sumBuilder_ == null) { data_ = builderForValue.build(); onChanged(); } else { sumBuilder_.setMessage(builderForValue.build()); } dataCase_ = 7; return this; } /** * .opentelemetry.proto.metrics.v1.Sum sum = 7; */ public Builder mergeSum(io.opentelemetry.proto.metrics.v1.Sum value) { if (sumBuilder_ == null) { if (dataCase_ == 7 && data_ != io.opentelemetry.proto.metrics.v1.Sum.getDefaultInstance()) { data_ = io.opentelemetry.proto.metrics.v1.Sum.newBuilder((io.opentelemetry.proto.metrics.v1.Sum) data_) .mergeFrom(value).buildPartial(); } else { data_ = value; } onChanged(); } else { if (dataCase_ == 7) { sumBuilder_.mergeFrom(value); } else { sumBuilder_.setMessage(value); } } dataCase_ = 7; return this; } /** * .opentelemetry.proto.metrics.v1.Sum sum = 7; */ public Builder clearSum() { if (sumBuilder_ == null) { if (dataCase_ == 7) { dataCase_ = 0; data_ = null; onChanged(); } } else { if (dataCase_ == 7) { dataCase_ = 0; data_ = null; } sumBuilder_.clear(); } return this; } /** * .opentelemetry.proto.metrics.v1.Sum sum = 7; */ public io.opentelemetry.proto.metrics.v1.Sum.Builder getSumBuilder() { return getSumFieldBuilder().getBuilder(); } /** * .opentelemetry.proto.metrics.v1.Sum sum = 7; */ @java.lang.Override public io.opentelemetry.proto.metrics.v1.SumOrBuilder getSumOrBuilder() { if ((dataCase_ == 7) && (sumBuilder_ != null)) { return sumBuilder_.getMessageOrBuilder(); } else { if (dataCase_ == 7) { return (io.opentelemetry.proto.metrics.v1.Sum) data_; } return io.opentelemetry.proto.metrics.v1.Sum.getDefaultInstance(); } } /** * .opentelemetry.proto.metrics.v1.Sum sum = 7; */ private com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.metrics.v1.Sum, io.opentelemetry.proto.metrics.v1.Sum.Builder, io.opentelemetry.proto.metrics.v1.SumOrBuilder> getSumFieldBuilder() { if (sumBuilder_ == null) { if (!(dataCase_ == 7)) { data_ = io.opentelemetry.proto.metrics.v1.Sum.getDefaultInstance(); } sumBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.metrics.v1.Sum, io.opentelemetry.proto.metrics.v1.Sum.Builder, io.opentelemetry.proto.metrics.v1.SumOrBuilder>( (io.opentelemetry.proto.metrics.v1.Sum) data_, getParentForChildren(), isClean()); data_ = null; } dataCase_ = 7; onChanged();; return sumBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.metrics.v1.Histogram, io.opentelemetry.proto.metrics.v1.Histogram.Builder, io.opentelemetry.proto.metrics.v1.HistogramOrBuilder> histogramBuilder_; /** * .opentelemetry.proto.metrics.v1.Histogram histogram = 9; * @return Whether the histogram field is set. */ @java.lang.Override public boolean hasHistogram() { return dataCase_ == 9; } /** * .opentelemetry.proto.metrics.v1.Histogram histogram = 9; * @return The histogram. */ @java.lang.Override public io.opentelemetry.proto.metrics.v1.Histogram getHistogram() { if (histogramBuilder_ == null) { if (dataCase_ == 9) { return (io.opentelemetry.proto.metrics.v1.Histogram) data_; } return io.opentelemetry.proto.metrics.v1.Histogram.getDefaultInstance(); } else { if (dataCase_ == 9) { return histogramBuilder_.getMessage(); } return io.opentelemetry.proto.metrics.v1.Histogram.getDefaultInstance(); } } /** * .opentelemetry.proto.metrics.v1.Histogram histogram = 9; */ public Builder setHistogram(io.opentelemetry.proto.metrics.v1.Histogram value) { if (histogramBuilder_ == null) { if (value == null) { throw new NullPointerException(); } data_ = value; onChanged(); } else { histogramBuilder_.setMessage(value); } dataCase_ = 9; return this; } /** * .opentelemetry.proto.metrics.v1.Histogram histogram = 9; */ public Builder setHistogram( io.opentelemetry.proto.metrics.v1.Histogram.Builder builderForValue) { if (histogramBuilder_ == null) { data_ = builderForValue.build(); onChanged(); } else { histogramBuilder_.setMessage(builderForValue.build()); } dataCase_ = 9; return this; } /** * .opentelemetry.proto.metrics.v1.Histogram histogram = 9; */ public Builder mergeHistogram(io.opentelemetry.proto.metrics.v1.Histogram value) { if (histogramBuilder_ == null) { if (dataCase_ == 9 && data_ != io.opentelemetry.proto.metrics.v1.Histogram.getDefaultInstance()) { data_ = io.opentelemetry.proto.metrics.v1.Histogram.newBuilder((io.opentelemetry.proto.metrics.v1.Histogram) data_) .mergeFrom(value).buildPartial(); } else { data_ = value; } onChanged(); } else { if (dataCase_ == 9) { histogramBuilder_.mergeFrom(value); } else { histogramBuilder_.setMessage(value); } } dataCase_ = 9; return this; } /** * .opentelemetry.proto.metrics.v1.Histogram histogram = 9; */ public Builder clearHistogram() { if (histogramBuilder_ == null) { if (dataCase_ == 9) { dataCase_ = 0; data_ = null; onChanged(); } } else { if (dataCase_ == 9) { dataCase_ = 0; data_ = null; } histogramBuilder_.clear(); } return this; } /** * .opentelemetry.proto.metrics.v1.Histogram histogram = 9; */ public io.opentelemetry.proto.metrics.v1.Histogram.Builder getHistogramBuilder() { return getHistogramFieldBuilder().getBuilder(); } /** * .opentelemetry.proto.metrics.v1.Histogram histogram = 9; */ @java.lang.Override public io.opentelemetry.proto.metrics.v1.HistogramOrBuilder getHistogramOrBuilder() { if ((dataCase_ == 9) && (histogramBuilder_ != null)) { return histogramBuilder_.getMessageOrBuilder(); } else { if (dataCase_ == 9) { return (io.opentelemetry.proto.metrics.v1.Histogram) data_; } return io.opentelemetry.proto.metrics.v1.Histogram.getDefaultInstance(); } } /** * .opentelemetry.proto.metrics.v1.Histogram histogram = 9; */ private com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.metrics.v1.Histogram, io.opentelemetry.proto.metrics.v1.Histogram.Builder, io.opentelemetry.proto.metrics.v1.HistogramOrBuilder> getHistogramFieldBuilder() { if (histogramBuilder_ == null) { if (!(dataCase_ == 9)) { data_ = io.opentelemetry.proto.metrics.v1.Histogram.getDefaultInstance(); } histogramBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.metrics.v1.Histogram, io.opentelemetry.proto.metrics.v1.Histogram.Builder, io.opentelemetry.proto.metrics.v1.HistogramOrBuilder>( (io.opentelemetry.proto.metrics.v1.Histogram) data_, getParentForChildren(), isClean()); data_ = null; } dataCase_ = 9; onChanged();; return histogramBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.metrics.v1.ExponentialHistogram, io.opentelemetry.proto.metrics.v1.ExponentialHistogram.Builder, io.opentelemetry.proto.metrics.v1.ExponentialHistogramOrBuilder> exponentialHistogramBuilder_; /** * .opentelemetry.proto.metrics.v1.ExponentialHistogram exponential_histogram = 10; * @return Whether the exponentialHistogram field is set. */ @java.lang.Override public boolean hasExponentialHistogram() { return dataCase_ == 10; } /** * .opentelemetry.proto.metrics.v1.ExponentialHistogram exponential_histogram = 10; * @return The exponentialHistogram. */ @java.lang.Override public io.opentelemetry.proto.metrics.v1.ExponentialHistogram getExponentialHistogram() { if (exponentialHistogramBuilder_ == null) { if (dataCase_ == 10) { return (io.opentelemetry.proto.metrics.v1.ExponentialHistogram) data_; } return io.opentelemetry.proto.metrics.v1.ExponentialHistogram.getDefaultInstance(); } else { if (dataCase_ == 10) { return exponentialHistogramBuilder_.getMessage(); } return io.opentelemetry.proto.metrics.v1.ExponentialHistogram.getDefaultInstance(); } } /** * .opentelemetry.proto.metrics.v1.ExponentialHistogram exponential_histogram = 10; */ public Builder setExponentialHistogram(io.opentelemetry.proto.metrics.v1.ExponentialHistogram value) { if (exponentialHistogramBuilder_ == null) { if (value == null) { throw new NullPointerException(); } data_ = value; onChanged(); } else { exponentialHistogramBuilder_.setMessage(value); } dataCase_ = 10; return this; } /** * .opentelemetry.proto.metrics.v1.ExponentialHistogram exponential_histogram = 10; */ public Builder setExponentialHistogram( io.opentelemetry.proto.metrics.v1.ExponentialHistogram.Builder builderForValue) { if (exponentialHistogramBuilder_ == null) { data_ = builderForValue.build(); onChanged(); } else { exponentialHistogramBuilder_.setMessage(builderForValue.build()); } dataCase_ = 10; return this; } /** * .opentelemetry.proto.metrics.v1.ExponentialHistogram exponential_histogram = 10; */ public Builder mergeExponentialHistogram(io.opentelemetry.proto.metrics.v1.ExponentialHistogram value) { if (exponentialHistogramBuilder_ == null) { if (dataCase_ == 10 && data_ != io.opentelemetry.proto.metrics.v1.ExponentialHistogram.getDefaultInstance()) { data_ = io.opentelemetry.proto.metrics.v1.ExponentialHistogram.newBuilder((io.opentelemetry.proto.metrics.v1.ExponentialHistogram) data_) .mergeFrom(value).buildPartial(); } else { data_ = value; } onChanged(); } else { if (dataCase_ == 10) { exponentialHistogramBuilder_.mergeFrom(value); } else { exponentialHistogramBuilder_.setMessage(value); } } dataCase_ = 10; return this; } /** * .opentelemetry.proto.metrics.v1.ExponentialHistogram exponential_histogram = 10; */ public Builder clearExponentialHistogram() { if (exponentialHistogramBuilder_ == null) { if (dataCase_ == 10) { dataCase_ = 0; data_ = null; onChanged(); } } else { if (dataCase_ == 10) { dataCase_ = 0; data_ = null; } exponentialHistogramBuilder_.clear(); } return this; } /** * .opentelemetry.proto.metrics.v1.ExponentialHistogram exponential_histogram = 10; */ public io.opentelemetry.proto.metrics.v1.ExponentialHistogram.Builder getExponentialHistogramBuilder() { return getExponentialHistogramFieldBuilder().getBuilder(); } /** * .opentelemetry.proto.metrics.v1.ExponentialHistogram exponential_histogram = 10; */ @java.lang.Override public io.opentelemetry.proto.metrics.v1.ExponentialHistogramOrBuilder getExponentialHistogramOrBuilder() { if ((dataCase_ == 10) && (exponentialHistogramBuilder_ != null)) { return exponentialHistogramBuilder_.getMessageOrBuilder(); } else { if (dataCase_ == 10) { return (io.opentelemetry.proto.metrics.v1.ExponentialHistogram) data_; } return io.opentelemetry.proto.metrics.v1.ExponentialHistogram.getDefaultInstance(); } } /** * .opentelemetry.proto.metrics.v1.ExponentialHistogram exponential_histogram = 10; */ private com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.metrics.v1.ExponentialHistogram, io.opentelemetry.proto.metrics.v1.ExponentialHistogram.Builder, io.opentelemetry.proto.metrics.v1.ExponentialHistogramOrBuilder> getExponentialHistogramFieldBuilder() { if (exponentialHistogramBuilder_ == null) { if (!(dataCase_ == 10)) { data_ = io.opentelemetry.proto.metrics.v1.ExponentialHistogram.getDefaultInstance(); } exponentialHistogramBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.metrics.v1.ExponentialHistogram, io.opentelemetry.proto.metrics.v1.ExponentialHistogram.Builder, io.opentelemetry.proto.metrics.v1.ExponentialHistogramOrBuilder>( (io.opentelemetry.proto.metrics.v1.ExponentialHistogram) data_, getParentForChildren(), isClean()); data_ = null; } dataCase_ = 10; onChanged();; return exponentialHistogramBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.metrics.v1.Summary, io.opentelemetry.proto.metrics.v1.Summary.Builder, io.opentelemetry.proto.metrics.v1.SummaryOrBuilder> summaryBuilder_; /** * .opentelemetry.proto.metrics.v1.Summary summary = 11; * @return Whether the summary field is set. */ @java.lang.Override public boolean hasSummary() { return dataCase_ == 11; } /** * .opentelemetry.proto.metrics.v1.Summary summary = 11; * @return The summary. */ @java.lang.Override public io.opentelemetry.proto.metrics.v1.Summary getSummary() { if (summaryBuilder_ == null) { if (dataCase_ == 11) { return (io.opentelemetry.proto.metrics.v1.Summary) data_; } return io.opentelemetry.proto.metrics.v1.Summary.getDefaultInstance(); } else { if (dataCase_ == 11) { return summaryBuilder_.getMessage(); } return io.opentelemetry.proto.metrics.v1.Summary.getDefaultInstance(); } } /** * .opentelemetry.proto.metrics.v1.Summary summary = 11; */ public Builder setSummary(io.opentelemetry.proto.metrics.v1.Summary value) { if (summaryBuilder_ == null) { if (value == null) { throw new NullPointerException(); } data_ = value; onChanged(); } else { summaryBuilder_.setMessage(value); } dataCase_ = 11; return this; } /** * .opentelemetry.proto.metrics.v1.Summary summary = 11; */ public Builder setSummary( io.opentelemetry.proto.metrics.v1.Summary.Builder builderForValue) { if (summaryBuilder_ == null) { data_ = builderForValue.build(); onChanged(); } else { summaryBuilder_.setMessage(builderForValue.build()); } dataCase_ = 11; return this; } /** * .opentelemetry.proto.metrics.v1.Summary summary = 11; */ public Builder mergeSummary(io.opentelemetry.proto.metrics.v1.Summary value) { if (summaryBuilder_ == null) { if (dataCase_ == 11 && data_ != io.opentelemetry.proto.metrics.v1.Summary.getDefaultInstance()) { data_ = io.opentelemetry.proto.metrics.v1.Summary.newBuilder((io.opentelemetry.proto.metrics.v1.Summary) data_) .mergeFrom(value).buildPartial(); } else { data_ = value; } onChanged(); } else { if (dataCase_ == 11) { summaryBuilder_.mergeFrom(value); } else { summaryBuilder_.setMessage(value); } } dataCase_ = 11; return this; } /** * .opentelemetry.proto.metrics.v1.Summary summary = 11; */ public Builder clearSummary() { if (summaryBuilder_ == null) { if (dataCase_ == 11) { dataCase_ = 0; data_ = null; onChanged(); } } else { if (dataCase_ == 11) { dataCase_ = 0; data_ = null; } summaryBuilder_.clear(); } return this; } /** * .opentelemetry.proto.metrics.v1.Summary summary = 11; */ public io.opentelemetry.proto.metrics.v1.Summary.Builder getSummaryBuilder() { return getSummaryFieldBuilder().getBuilder(); } /** * .opentelemetry.proto.metrics.v1.Summary summary = 11; */ @java.lang.Override public io.opentelemetry.proto.metrics.v1.SummaryOrBuilder getSummaryOrBuilder() { if ((dataCase_ == 11) && (summaryBuilder_ != null)) { return summaryBuilder_.getMessageOrBuilder(); } else { if (dataCase_ == 11) { return (io.opentelemetry.proto.metrics.v1.Summary) data_; } return io.opentelemetry.proto.metrics.v1.Summary.getDefaultInstance(); } } /** * .opentelemetry.proto.metrics.v1.Summary summary = 11; */ private com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.metrics.v1.Summary, io.opentelemetry.proto.metrics.v1.Summary.Builder, io.opentelemetry.proto.metrics.v1.SummaryOrBuilder> getSummaryFieldBuilder() { if (summaryBuilder_ == null) { if (!(dataCase_ == 11)) { data_ = io.opentelemetry.proto.metrics.v1.Summary.getDefaultInstance(); } summaryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< io.opentelemetry.proto.metrics.v1.Summary, io.opentelemetry.proto.metrics.v1.Summary.Builder, io.opentelemetry.proto.metrics.v1.SummaryOrBuilder>( (io.opentelemetry.proto.metrics.v1.Summary) data_, getParentForChildren(), isClean()); data_ = null; } dataCase_ = 11; onChanged();; return summaryBuilder_; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:opentelemetry.proto.metrics.v1.Metric) } // @@protoc_insertion_point(class_scope:opentelemetry.proto.metrics.v1.Metric) private static final io.opentelemetry.proto.metrics.v1.Metric DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new io.opentelemetry.proto.metrics.v1.Metric(); } public static io.opentelemetry.proto.metrics.v1.Metric getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Metric parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new Metric(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public io.opentelemetry.proto.metrics.v1.Metric getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy