Class 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.GeneratedMessageV3.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 Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

        public NumberDataPoint.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<NumberDataPoint.Builder>
      • setField

        public NumberDataPoint.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<NumberDataPoint.Builder>
      • clearField

        public NumberDataPoint.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<NumberDataPoint.Builder>
      • clearOneof

        public NumberDataPoint.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<NumberDataPoint.Builder>
      • setRepeatedField

        public NumberDataPoint.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                        int index,
                                                        Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<NumberDataPoint.Builder>
      • addRepeatedField

        public NumberDataPoint.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                        Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<NumberDataPoint.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>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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
      • 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.
      • 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.
      • 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
      • 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.
      • setUnknownFields

        public final NumberDataPoint.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<NumberDataPoint.Builder>
      • mergeUnknownFields

        public final NumberDataPoint.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<NumberDataPoint.Builder>