Class Exemplar.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, ExemplarOrBuilder, Cloneable
    Enclosing class:
    Exemplar

    public static final class Exemplar.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Exemplar.Builder>
    implements ExemplarOrBuilder
     A representation of an exemplar, which is a sample input measurement.
     Exemplars also hold information about the environment when the measurement
     was recorded, for example the span and trace ID of the active span when the
     exemplar was recorded.
     
    Protobuf type opentelemetry.proto.metrics.v1.Exemplar
    • 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<Exemplar.Builder>
      • clear

        public Exemplar.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<Exemplar.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<Exemplar.Builder>
      • getDefaultInstanceForType

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

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

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

        public Exemplar.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<Exemplar.Builder>
      • setField

        public Exemplar.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<Exemplar.Builder>
      • clearField

        public Exemplar.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<Exemplar.Builder>
      • clearOneof

        public Exemplar.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<Exemplar.Builder>
      • setRepeatedField

        public Exemplar.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<Exemplar.Builder>
      • addRepeatedField

        public Exemplar.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<Exemplar.Builder>
      • mergeFrom

        public Exemplar.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<Exemplar.Builder>
      • isInitialized

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

        public Exemplar.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<Exemplar.Builder>
        Throws:
        IOException
      • getFilteredAttributesList

        public List<KeyValue> getFilteredAttributesList()
         The set of key/value pairs that were filtered out by the aggregator, but
         recorded alongside the original measurement. Only key/value pairs that were
         filtered out by the aggregator should be included
         
        repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
        Specified by:
        getFilteredAttributesList in interface ExemplarOrBuilder
      • getFilteredAttributesCount

        public int getFilteredAttributesCount()
         The set of key/value pairs that were filtered out by the aggregator, but
         recorded alongside the original measurement. Only key/value pairs that were
         filtered out by the aggregator should be included
         
        repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
        Specified by:
        getFilteredAttributesCount in interface ExemplarOrBuilder
      • getFilteredAttributes

        public KeyValue getFilteredAttributes​(int index)
         The set of key/value pairs that were filtered out by the aggregator, but
         recorded alongside the original measurement. Only key/value pairs that were
         filtered out by the aggregator should be included
         
        repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
        Specified by:
        getFilteredAttributes in interface ExemplarOrBuilder
      • setFilteredAttributes

        public Exemplar.Builder setFilteredAttributes​(int index,
                                                      KeyValue value)
         The set of key/value pairs that were filtered out by the aggregator, but
         recorded alongside the original measurement. Only key/value pairs that were
         filtered out by the aggregator should be included
         
        repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
      • setFilteredAttributes

        public Exemplar.Builder setFilteredAttributes​(int index,
                                                      KeyValue.Builder builderForValue)
         The set of key/value pairs that were filtered out by the aggregator, but
         recorded alongside the original measurement. Only key/value pairs that were
         filtered out by the aggregator should be included
         
        repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
      • addFilteredAttributes

        public Exemplar.Builder addFilteredAttributes​(KeyValue value)
         The set of key/value pairs that were filtered out by the aggregator, but
         recorded alongside the original measurement. Only key/value pairs that were
         filtered out by the aggregator should be included
         
        repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
      • addFilteredAttributes

        public Exemplar.Builder addFilteredAttributes​(int index,
                                                      KeyValue value)
         The set of key/value pairs that were filtered out by the aggregator, but
         recorded alongside the original measurement. Only key/value pairs that were
         filtered out by the aggregator should be included
         
        repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
      • addFilteredAttributes

        public Exemplar.Builder addFilteredAttributes​(KeyValue.Builder builderForValue)
         The set of key/value pairs that were filtered out by the aggregator, but
         recorded alongside the original measurement. Only key/value pairs that were
         filtered out by the aggregator should be included
         
        repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
      • addFilteredAttributes

        public Exemplar.Builder addFilteredAttributes​(int index,
                                                      KeyValue.Builder builderForValue)
         The set of key/value pairs that were filtered out by the aggregator, but
         recorded alongside the original measurement. Only key/value pairs that were
         filtered out by the aggregator should be included
         
        repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
      • addAllFilteredAttributes

        public Exemplar.Builder addAllFilteredAttributes​(Iterable<? extends KeyValue> values)
         The set of key/value pairs that were filtered out by the aggregator, but
         recorded alongside the original measurement. Only key/value pairs that were
         filtered out by the aggregator should be included
         
        repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
      • clearFilteredAttributes

        public Exemplar.Builder clearFilteredAttributes()
         The set of key/value pairs that were filtered out by the aggregator, but
         recorded alongside the original measurement. Only key/value pairs that were
         filtered out by the aggregator should be included
         
        repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
      • removeFilteredAttributes

        public Exemplar.Builder removeFilteredAttributes​(int index)
         The set of key/value pairs that were filtered out by the aggregator, but
         recorded alongside the original measurement. Only key/value pairs that were
         filtered out by the aggregator should be included
         
        repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
      • getFilteredAttributesBuilder

        public KeyValue.Builder getFilteredAttributesBuilder​(int index)
         The set of key/value pairs that were filtered out by the aggregator, but
         recorded alongside the original measurement. Only key/value pairs that were
         filtered out by the aggregator should be included
         
        repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
      • getFilteredAttributesOrBuilder

        public KeyValueOrBuilder getFilteredAttributesOrBuilder​(int index)
         The set of key/value pairs that were filtered out by the aggregator, but
         recorded alongside the original measurement. Only key/value pairs that were
         filtered out by the aggregator should be included
         
        repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
        Specified by:
        getFilteredAttributesOrBuilder in interface ExemplarOrBuilder
      • getFilteredAttributesOrBuilderList

        public List<? extends KeyValueOrBuilder> getFilteredAttributesOrBuilderList()
         The set of key/value pairs that were filtered out by the aggregator, but
         recorded alongside the original measurement. Only key/value pairs that were
         filtered out by the aggregator should be included
         
        repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
        Specified by:
        getFilteredAttributesOrBuilderList in interface ExemplarOrBuilder
      • addFilteredAttributesBuilder

        public KeyValue.Builder addFilteredAttributesBuilder()
         The set of key/value pairs that were filtered out by the aggregator, but
         recorded alongside the original measurement. Only key/value pairs that were
         filtered out by the aggregator should be included
         
        repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
      • addFilteredAttributesBuilder

        public KeyValue.Builder addFilteredAttributesBuilder​(int index)
         The set of key/value pairs that were filtered out by the aggregator, but
         recorded alongside the original measurement. Only key/value pairs that were
         filtered out by the aggregator should be included
         
        repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
      • getFilteredAttributesBuilderList

        public List<KeyValue.Builder> getFilteredAttributesBuilderList()
         The set of key/value pairs that were filtered out by the aggregator, but
         recorded alongside the original measurement. Only key/value pairs that were
         filtered out by the aggregator should be included
         
        repeated .opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;
      • getTimeUnixNano

        public long getTimeUnixNano()
         time_unix_nano is the exact time when this exemplar was recorded
         Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
         1970.
         
        fixed64 time_unix_nano = 2;
        Specified by:
        getTimeUnixNano in interface ExemplarOrBuilder
        Returns:
        The timeUnixNano.
      • setTimeUnixNano

        public Exemplar.Builder setTimeUnixNano​(long value)
         time_unix_nano is the exact time when this exemplar was recorded
         Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
         1970.
         
        fixed64 time_unix_nano = 2;
        Parameters:
        value - The timeUnixNano to set.
        Returns:
        This builder for chaining.
      • clearTimeUnixNano

        public Exemplar.Builder clearTimeUnixNano()
         time_unix_nano is the exact time when this exemplar was recorded
         Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
         1970.
         
        fixed64 time_unix_nano = 2;
        Returns:
        This builder for chaining.
      • hasAsDouble

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

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

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

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

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

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

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

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

        public com.google.protobuf.ByteString getSpanId()
         (Optional) Span ID of the exemplar trace.
         span_id may be missing if the measurement is not recorded inside a trace
         or if the trace is not sampled.
         
        bytes span_id = 4;
        Specified by:
        getSpanId in interface ExemplarOrBuilder
        Returns:
        The spanId.
      • setSpanId

        public Exemplar.Builder setSpanId​(com.google.protobuf.ByteString value)
         (Optional) Span ID of the exemplar trace.
         span_id may be missing if the measurement is not recorded inside a trace
         or if the trace is not sampled.
         
        bytes span_id = 4;
        Parameters:
        value - The spanId to set.
        Returns:
        This builder for chaining.
      • clearSpanId

        public Exemplar.Builder clearSpanId()
         (Optional) Span ID of the exemplar trace.
         span_id may be missing if the measurement is not recorded inside a trace
         or if the trace is not sampled.
         
        bytes span_id = 4;
        Returns:
        This builder for chaining.
      • getTraceId

        public com.google.protobuf.ByteString getTraceId()
         (Optional) Trace ID of the exemplar trace.
         trace_id may be missing if the measurement is not recorded inside a trace
         or if the trace is not sampled.
         
        bytes trace_id = 5;
        Specified by:
        getTraceId in interface ExemplarOrBuilder
        Returns:
        The traceId.
      • setTraceId

        public Exemplar.Builder setTraceId​(com.google.protobuf.ByteString value)
         (Optional) Trace ID of the exemplar trace.
         trace_id may be missing if the measurement is not recorded inside a trace
         or if the trace is not sampled.
         
        bytes trace_id = 5;
        Parameters:
        value - The traceId to set.
        Returns:
        This builder for chaining.
      • clearTraceId

        public Exemplar.Builder clearTraceId()
         (Optional) Trace ID of the exemplar trace.
         trace_id may be missing if the measurement is not recorded inside a trace
         or if the trace is not sampled.
         
        bytes trace_id = 5;
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final Exemplar.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<Exemplar.Builder>
      • mergeUnknownFields

        public final Exemplar.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<Exemplar.Builder>