Class NumberDataPoint.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<NumberDataPoint.Builder>
io.opentelemetry.proto.metrics.v1.NumberDataPoint.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, NumberDataPointOrBuilder, Cloneable
Enclosing class:
NumberDataPoint

public static final class NumberDataPoint.Builder extends com.google.protobuf.GeneratedMessage.Builder<NumberDataPoint.Builder> implements NumberDataPointOrBuilder
 NumberDataPoint is a single data point in a timeseries that describes the
 time-varying scalar value of a metric.
 
Protobuf type opentelemetry.proto.metrics.v1.NumberDataPoint
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<NumberDataPoint.Builder>
    • clear

      public NumberDataPoint.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<NumberDataPoint.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<NumberDataPoint.Builder>
    • getDefaultInstanceForType

      public NumberDataPoint getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public NumberDataPoint build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public NumberDataPoint buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public NumberDataPoint.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<NumberDataPoint.Builder>
    • mergeFrom

      public NumberDataPoint.Builder mergeFrom(NumberDataPoint other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<NumberDataPoint.Builder>
    • mergeFrom

      public NumberDataPoint.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<NumberDataPoint.Builder>
      Throws:
      IOException
    • getValueCase

      public NumberDataPoint.ValueCase getValueCase()
      Specified by:
      getValueCase in interface NumberDataPointOrBuilder
    • clearValue

      public NumberDataPoint.Builder clearValue()
    • getAttributesList

      public List<KeyValue> getAttributesList()
       The set of key/value pairs that uniquely identify the timeseries from
       where this point belongs. The list may be empty (may contain 0 elements).
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;
      Specified by:
      getAttributesList in interface NumberDataPointOrBuilder
    • getAttributesCount

      public int getAttributesCount()
       The set of key/value pairs that uniquely identify the timeseries from
       where this point belongs. The list may be empty (may contain 0 elements).
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;
      Specified by:
      getAttributesCount in interface NumberDataPointOrBuilder
    • getAttributes

      public KeyValue getAttributes(int index)
       The set of key/value pairs that uniquely identify the timeseries from
       where this point belongs. The list may be empty (may contain 0 elements).
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;
      Specified by:
      getAttributes in interface NumberDataPointOrBuilder
    • setAttributes

      public NumberDataPoint.Builder setAttributes(int index, KeyValue value)
       The set of key/value pairs that uniquely identify the timeseries from
       where this point belongs. The list may be empty (may contain 0 elements).
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;
    • setAttributes

      public NumberDataPoint.Builder setAttributes(int index, KeyValue.Builder builderForValue)
       The set of key/value pairs that uniquely identify the timeseries from
       where this point belongs. The list may be empty (may contain 0 elements).
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;
    • addAttributes

      public NumberDataPoint.Builder addAttributes(KeyValue value)
       The set of key/value pairs that uniquely identify the timeseries from
       where this point belongs. The list may be empty (may contain 0 elements).
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;
    • addAttributes

      public NumberDataPoint.Builder addAttributes(int index, KeyValue value)
       The set of key/value pairs that uniquely identify the timeseries from
       where this point belongs. The list may be empty (may contain 0 elements).
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;
    • addAttributes

      public NumberDataPoint.Builder addAttributes(KeyValue.Builder builderForValue)
       The set of key/value pairs that uniquely identify the timeseries from
       where this point belongs. The list may be empty (may contain 0 elements).
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;
    • addAttributes

      public NumberDataPoint.Builder addAttributes(int index, KeyValue.Builder builderForValue)
       The set of key/value pairs that uniquely identify the timeseries from
       where this point belongs. The list may be empty (may contain 0 elements).
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;
    • addAllAttributes

      public NumberDataPoint.Builder addAllAttributes(Iterable<? extends KeyValue> values)
       The set of key/value pairs that uniquely identify the timeseries from
       where this point belongs. The list may be empty (may contain 0 elements).
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;
    • clearAttributes

      public NumberDataPoint.Builder clearAttributes()
       The set of key/value pairs that uniquely identify the timeseries from
       where this point belongs. The list may be empty (may contain 0 elements).
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;
    • removeAttributes

      public NumberDataPoint.Builder removeAttributes(int index)
       The set of key/value pairs that uniquely identify the timeseries from
       where this point belongs. The list may be empty (may contain 0 elements).
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;
    • getAttributesBuilder

      public KeyValue.Builder getAttributesBuilder(int index)
       The set of key/value pairs that uniquely identify the timeseries from
       where this point belongs. The list may be empty (may contain 0 elements).
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;
    • getAttributesOrBuilder

      public KeyValueOrBuilder getAttributesOrBuilder(int index)
       The set of key/value pairs that uniquely identify the timeseries from
       where this point belongs. The list may be empty (may contain 0 elements).
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;
      Specified by:
      getAttributesOrBuilder in interface NumberDataPointOrBuilder
    • getAttributesOrBuilderList

      public List<? extends KeyValueOrBuilder> getAttributesOrBuilderList()
       The set of key/value pairs that uniquely identify the timeseries from
       where this point belongs. The list may be empty (may contain 0 elements).
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;
      Specified by:
      getAttributesOrBuilderList in interface NumberDataPointOrBuilder
    • addAttributesBuilder

      public KeyValue.Builder addAttributesBuilder()
       The set of key/value pairs that uniquely identify the timeseries from
       where this point belongs. The list may be empty (may contain 0 elements).
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;
    • addAttributesBuilder

      public KeyValue.Builder addAttributesBuilder(int index)
       The set of key/value pairs that uniquely identify the timeseries from
       where this point belongs. The list may be empty (may contain 0 elements).
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;
    • getAttributesBuilderList

      public List<KeyValue.Builder> getAttributesBuilderList()
       The set of key/value pairs that uniquely identify the timeseries from
       where this point belongs. The list may be empty (may contain 0 elements).
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 7;
    • getStartTimeUnixNano

      public long getStartTimeUnixNano()
       StartTimeUnixNano is optional but strongly encouraged, see the
       the detailed comments above Metric.
      
       Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
       1970.
       
      fixed64 start_time_unix_nano = 2;
      Specified by:
      getStartTimeUnixNano in interface NumberDataPointOrBuilder
      Returns:
      The startTimeUnixNano.
    • setStartTimeUnixNano

      public NumberDataPoint.Builder setStartTimeUnixNano(long value)
       StartTimeUnixNano is optional but strongly encouraged, see the
       the detailed comments above Metric.
      
       Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
       1970.
       
      fixed64 start_time_unix_nano = 2;
      Parameters:
      value - The startTimeUnixNano to set.
      Returns:
      This builder for chaining.
    • clearStartTimeUnixNano

      public NumberDataPoint.Builder clearStartTimeUnixNano()
       StartTimeUnixNano is optional but strongly encouraged, see the
       the detailed comments above Metric.
      
       Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
       1970.
       
      fixed64 start_time_unix_nano = 2;
      Returns:
      This builder for chaining.
    • getTimeUnixNano

      public long getTimeUnixNano()
       TimeUnixNano is required, see the detailed comments above Metric.
      
       Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
       1970.
       
      fixed64 time_unix_nano = 3;
      Specified by:
      getTimeUnixNano in interface NumberDataPointOrBuilder
      Returns:
      The timeUnixNano.
    • setTimeUnixNano

      public NumberDataPoint.Builder setTimeUnixNano(long value)
       TimeUnixNano is required, see the detailed comments above Metric.
      
       Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
       1970.
       
      fixed64 time_unix_nano = 3;
      Parameters:
      value - The timeUnixNano to set.
      Returns:
      This builder for chaining.
    • clearTimeUnixNano

      public NumberDataPoint.Builder clearTimeUnixNano()
       TimeUnixNano is required, see the detailed comments above Metric.
      
       Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
       1970.
       
      fixed64 time_unix_nano = 3;
      Returns:
      This builder for chaining.
    • hasAsDouble

      public boolean hasAsDouble()
      double as_double = 4;
      Specified by:
      hasAsDouble in interface NumberDataPointOrBuilder
      Returns:
      Whether the asDouble field is set.
    • getAsDouble

      public double getAsDouble()
      double as_double = 4;
      Specified by:
      getAsDouble in interface NumberDataPointOrBuilder
      Returns:
      The asDouble.
    • setAsDouble

      public NumberDataPoint.Builder setAsDouble(double value)
      double as_double = 4;
      Parameters:
      value - The asDouble to set.
      Returns:
      This builder for chaining.
    • clearAsDouble

      public NumberDataPoint.Builder clearAsDouble()
      double as_double = 4;
      Returns:
      This builder for chaining.
    • hasAsInt

      public boolean hasAsInt()
      sfixed64 as_int = 6;
      Specified by:
      hasAsInt in interface NumberDataPointOrBuilder
      Returns:
      Whether the asInt field is set.
    • getAsInt

      public long getAsInt()
      sfixed64 as_int = 6;
      Specified by:
      getAsInt in interface NumberDataPointOrBuilder
      Returns:
      The asInt.
    • setAsInt

      public NumberDataPoint.Builder setAsInt(long value)
      sfixed64 as_int = 6;
      Parameters:
      value - The asInt to set.
      Returns:
      This builder for chaining.
    • clearAsInt

      public NumberDataPoint.Builder clearAsInt()
      sfixed64 as_int = 6;
      Returns:
      This builder for chaining.
    • getExemplarsList

      public List<Exemplar> getExemplarsList()
       (Optional) List of exemplars collected from
       measurements that were used to form the data point
       
      repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;
      Specified by:
      getExemplarsList in interface NumberDataPointOrBuilder
    • getExemplarsCount

      public int getExemplarsCount()
       (Optional) List of exemplars collected from
       measurements that were used to form the data point
       
      repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;
      Specified by:
      getExemplarsCount in interface NumberDataPointOrBuilder
    • getExemplars

      public Exemplar getExemplars(int index)
       (Optional) List of exemplars collected from
       measurements that were used to form the data point
       
      repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;
      Specified by:
      getExemplars in interface NumberDataPointOrBuilder
    • setExemplars

      public NumberDataPoint.Builder setExemplars(int index, Exemplar value)
       (Optional) List of exemplars collected from
       measurements that were used to form the data point
       
      repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;
    • setExemplars

      public NumberDataPoint.Builder setExemplars(int index, Exemplar.Builder builderForValue)
       (Optional) List of exemplars collected from
       measurements that were used to form the data point
       
      repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;
    • addExemplars

      public NumberDataPoint.Builder addExemplars(Exemplar value)
       (Optional) List of exemplars collected from
       measurements that were used to form the data point
       
      repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;
    • addExemplars

      public NumberDataPoint.Builder addExemplars(int index, Exemplar value)
       (Optional) List of exemplars collected from
       measurements that were used to form the data point
       
      repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;
    • addExemplars

      public NumberDataPoint.Builder addExemplars(Exemplar.Builder builderForValue)
       (Optional) List of exemplars collected from
       measurements that were used to form the data point
       
      repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;
    • addExemplars

      public NumberDataPoint.Builder addExemplars(int index, Exemplar.Builder builderForValue)
       (Optional) List of exemplars collected from
       measurements that were used to form the data point
       
      repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;
    • addAllExemplars

      public NumberDataPoint.Builder addAllExemplars(Iterable<? extends Exemplar> values)
       (Optional) List of exemplars collected from
       measurements that were used to form the data point
       
      repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;
    • clearExemplars

      public NumberDataPoint.Builder clearExemplars()
       (Optional) List of exemplars collected from
       measurements that were used to form the data point
       
      repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;
    • removeExemplars

      public NumberDataPoint.Builder removeExemplars(int index)
       (Optional) List of exemplars collected from
       measurements that were used to form the data point
       
      repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;
    • getExemplarsBuilder

      public Exemplar.Builder getExemplarsBuilder(int index)
       (Optional) List of exemplars collected from
       measurements that were used to form the data point
       
      repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;
    • getExemplarsOrBuilder

      public ExemplarOrBuilder getExemplarsOrBuilder(int index)
       (Optional) List of exemplars collected from
       measurements that were used to form the data point
       
      repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;
      Specified by:
      getExemplarsOrBuilder in interface NumberDataPointOrBuilder
    • getExemplarsOrBuilderList

      public List<? extends ExemplarOrBuilder> getExemplarsOrBuilderList()
       (Optional) List of exemplars collected from
       measurements that were used to form the data point
       
      repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;
      Specified by:
      getExemplarsOrBuilderList in interface NumberDataPointOrBuilder
    • addExemplarsBuilder

      public Exemplar.Builder addExemplarsBuilder()
       (Optional) List of exemplars collected from
       measurements that were used to form the data point
       
      repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;
    • addExemplarsBuilder

      public Exemplar.Builder addExemplarsBuilder(int index)
       (Optional) List of exemplars collected from
       measurements that were used to form the data point
       
      repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;
    • getExemplarsBuilderList

      public List<Exemplar.Builder> getExemplarsBuilderList()
       (Optional) List of exemplars collected from
       measurements that were used to form the data point
       
      repeated .opentelemetry.proto.metrics.v1.Exemplar exemplars = 5;
    • getFlags

      public int getFlags()
       Flags that apply to this specific data point.  See DataPointFlags
       for the available flags and their meaning.
       
      uint32 flags = 8;
      Specified by:
      getFlags in interface NumberDataPointOrBuilder
      Returns:
      The flags.
    • setFlags

      public NumberDataPoint.Builder setFlags(int value)
       Flags that apply to this specific data point.  See DataPointFlags
       for the available flags and their meaning.
       
      uint32 flags = 8;
      Parameters:
      value - The flags to set.
      Returns:
      This builder for chaining.
    • clearFlags

      public NumberDataPoint.Builder clearFlags()
       Flags that apply to this specific data point.  See DataPointFlags
       for the available flags and their meaning.
       
      uint32 flags = 8;
      Returns:
      This builder for chaining.