Class DistributionValue.Exemplar.Builder

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

    public static final class DistributionValue.Exemplar.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<DistributionValue.Exemplar.Builder>
    implements DistributionValue.ExemplarOrBuilder
     Exemplars are example points that may be used to annotate aggregated
     Distribution values. They are metadata that gives information about a
     particular value added to a Distribution bucket.
     
    Protobuf type opencensus.proto.metrics.v1.DistributionValue.Exemplar
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<DistributionValue.Exemplar.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<DistributionValue.Exemplar.Builder>
      • internalGetFieldAccessorTable

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

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

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

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

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

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

        public DistributionValue.Exemplar.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                     throws java.io.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<DistributionValue.Exemplar.Builder>
        Throws:
        java.io.IOException
      • getValue

        public double getValue()
         Value of the exemplar point. It determines which bucket the exemplar
         belongs to.
         
        double value = 1;
        Specified by:
        getValue in interface DistributionValue.ExemplarOrBuilder
        Returns:
        The value.
      • setValue

        public DistributionValue.Exemplar.Builder setValue​(double value)
         Value of the exemplar point. It determines which bucket the exemplar
         belongs to.
         
        double value = 1;
        Parameters:
        value - The value to set.
        Returns:
        This builder for chaining.
      • clearValue

        public DistributionValue.Exemplar.Builder clearValue()
         Value of the exemplar point. It determines which bucket the exemplar
         belongs to.
         
        double value = 1;
        Returns:
        This builder for chaining.
      • hasTimestamp

        public boolean hasTimestamp()
         The observation (sampling) time of the above value.
         
        .google.protobuf.Timestamp timestamp = 2;
        Specified by:
        hasTimestamp in interface DistributionValue.ExemplarOrBuilder
        Returns:
        Whether the timestamp field is set.
      • getTimestamp

        public com.google.protobuf.Timestamp getTimestamp()
         The observation (sampling) time of the above value.
         
        .google.protobuf.Timestamp timestamp = 2;
        Specified by:
        getTimestamp in interface DistributionValue.ExemplarOrBuilder
        Returns:
        The timestamp.
      • setTimestamp

        public DistributionValue.Exemplar.Builder setTimestamp​(com.google.protobuf.Timestamp value)
         The observation (sampling) time of the above value.
         
        .google.protobuf.Timestamp timestamp = 2;
      • setTimestamp

        public DistributionValue.Exemplar.Builder setTimestamp​(com.google.protobuf.Timestamp.Builder builderForValue)
         The observation (sampling) time of the above value.
         
        .google.protobuf.Timestamp timestamp = 2;
      • mergeTimestamp

        public DistributionValue.Exemplar.Builder mergeTimestamp​(com.google.protobuf.Timestamp value)
         The observation (sampling) time of the above value.
         
        .google.protobuf.Timestamp timestamp = 2;
      • clearTimestamp

        public DistributionValue.Exemplar.Builder clearTimestamp()
         The observation (sampling) time of the above value.
         
        .google.protobuf.Timestamp timestamp = 2;
      • getTimestampBuilder

        public com.google.protobuf.Timestamp.Builder getTimestampBuilder()
         The observation (sampling) time of the above value.
         
        .google.protobuf.Timestamp timestamp = 2;
      • getAttachmentsMap

        public java.util.Map<java.lang.String,​java.lang.String> getAttachmentsMap()
         Contextual information about the example value.
         
        map<string, string> attachments = 3;
        Specified by:
        getAttachmentsMap in interface DistributionValue.ExemplarOrBuilder
      • getAttachmentsOrDefault

        public java.lang.String getAttachmentsOrDefault​(java.lang.String key,
                                                        java.lang.String defaultValue)
         Contextual information about the example value.
         
        map<string, string> attachments = 3;
        Specified by:
        getAttachmentsOrDefault in interface DistributionValue.ExemplarOrBuilder
      • removeAttachments

        public DistributionValue.Exemplar.Builder removeAttachments​(java.lang.String key)
         Contextual information about the example value.
         
        map<string, string> attachments = 3;
      • getMutableAttachments

        @Deprecated
        public java.util.Map<java.lang.String,​java.lang.String> getMutableAttachments()
        Deprecated.
        Use alternate mutation accessors instead.
      • putAttachments

        public DistributionValue.Exemplar.Builder putAttachments​(java.lang.String key,
                                                                 java.lang.String value)
         Contextual information about the example value.
         
        map<string, string> attachments = 3;
      • putAllAttachments

        public DistributionValue.Exemplar.Builder putAllAttachments​(java.util.Map<java.lang.String,​java.lang.String> values)
         Contextual information about the example value.
         
        map<string, string> attachments = 3;
      • setUnknownFields

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

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