Class Sample.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<Sample.Builder>
io.opentelemetry.proto.profiles.v1development.Sample.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, SampleOrBuilder, Cloneable
Enclosing class:
Sample

public static final class Sample.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Sample.Builder> implements SampleOrBuilder
 Each Sample records values encountered in some program
 context. The program context is typically a stack trace, perhaps
 augmented with auxiliary information like the thread-id, some
 indicator of a higher level request being handled etc.
 
Protobuf type opentelemetry.proto.profiles.v1development.Sample
  • Method Details

    • 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<Sample.Builder>
    • clear

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

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

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

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

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

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

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

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

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

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

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

      public Sample.Builder mergeFrom(Sample other)
    • isInitialized

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

      public Sample.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<Sample.Builder>
      Throws:
      IOException
    • getLocationsStartIndex

      public int getLocationsStartIndex()
       locations_start_index along with locations_length refers to to a slice of locations in Profile.location_indices.
       
      int32 locations_start_index = 1;
      Specified by:
      getLocationsStartIndex in interface SampleOrBuilder
      Returns:
      The locationsStartIndex.
    • setLocationsStartIndex

      public Sample.Builder setLocationsStartIndex(int value)
       locations_start_index along with locations_length refers to to a slice of locations in Profile.location_indices.
       
      int32 locations_start_index = 1;
      Parameters:
      value - The locationsStartIndex to set.
      Returns:
      This builder for chaining.
    • clearLocationsStartIndex

      public Sample.Builder clearLocationsStartIndex()
       locations_start_index along with locations_length refers to to a slice of locations in Profile.location_indices.
       
      int32 locations_start_index = 1;
      Returns:
      This builder for chaining.
    • getLocationsLength

      public int getLocationsLength()
       locations_length along with locations_start_index refers to a slice of locations in Profile.location_indices.
       Supersedes location_index.
       
      int32 locations_length = 2;
      Specified by:
      getLocationsLength in interface SampleOrBuilder
      Returns:
      The locationsLength.
    • setLocationsLength

      public Sample.Builder setLocationsLength(int value)
       locations_length along with locations_start_index refers to a slice of locations in Profile.location_indices.
       Supersedes location_index.
       
      int32 locations_length = 2;
      Parameters:
      value - The locationsLength to set.
      Returns:
      This builder for chaining.
    • clearLocationsLength

      public Sample.Builder clearLocationsLength()
       locations_length along with locations_start_index refers to a slice of locations in Profile.location_indices.
       Supersedes location_index.
       
      int32 locations_length = 2;
      Returns:
      This builder for chaining.
    • getValueList

      public List<Long> getValueList()
       The type and unit of each value is defined by the corresponding
       entry in Profile.sample_type. All samples must have the same
       number of values, the same as the length of Profile.sample_type.
       When aggregating multiple samples into a single sample, the
       result has a list of values that is the element-wise sum of the
       lists of the originals.
       
      repeated int64 value = 3;
      Specified by:
      getValueList in interface SampleOrBuilder
      Returns:
      A list containing the value.
    • getValueCount

      public int getValueCount()
       The type and unit of each value is defined by the corresponding
       entry in Profile.sample_type. All samples must have the same
       number of values, the same as the length of Profile.sample_type.
       When aggregating multiple samples into a single sample, the
       result has a list of values that is the element-wise sum of the
       lists of the originals.
       
      repeated int64 value = 3;
      Specified by:
      getValueCount in interface SampleOrBuilder
      Returns:
      The count of value.
    • getValue

      public long getValue(int index)
       The type and unit of each value is defined by the corresponding
       entry in Profile.sample_type. All samples must have the same
       number of values, the same as the length of Profile.sample_type.
       When aggregating multiple samples into a single sample, the
       result has a list of values that is the element-wise sum of the
       lists of the originals.
       
      repeated int64 value = 3;
      Specified by:
      getValue in interface SampleOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The value at the given index.
    • setValue

      public Sample.Builder setValue(int index, long value)
       The type and unit of each value is defined by the corresponding
       entry in Profile.sample_type. All samples must have the same
       number of values, the same as the length of Profile.sample_type.
       When aggregating multiple samples into a single sample, the
       result has a list of values that is the element-wise sum of the
       lists of the originals.
       
      repeated int64 value = 3;
      Parameters:
      index - The index to set the value at.
      value - The value to set.
      Returns:
      This builder for chaining.
    • addValue

      public Sample.Builder addValue(long value)
       The type and unit of each value is defined by the corresponding
       entry in Profile.sample_type. All samples must have the same
       number of values, the same as the length of Profile.sample_type.
       When aggregating multiple samples into a single sample, the
       result has a list of values that is the element-wise sum of the
       lists of the originals.
       
      repeated int64 value = 3;
      Parameters:
      value - The value to add.
      Returns:
      This builder for chaining.
    • addAllValue

      public Sample.Builder addAllValue(Iterable<? extends Long> values)
       The type and unit of each value is defined by the corresponding
       entry in Profile.sample_type. All samples must have the same
       number of values, the same as the length of Profile.sample_type.
       When aggregating multiple samples into a single sample, the
       result has a list of values that is the element-wise sum of the
       lists of the originals.
       
      repeated int64 value = 3;
      Parameters:
      values - The value to add.
      Returns:
      This builder for chaining.
    • clearValue

      public Sample.Builder clearValue()
       The type and unit of each value is defined by the corresponding
       entry in Profile.sample_type. All samples must have the same
       number of values, the same as the length of Profile.sample_type.
       When aggregating multiple samples into a single sample, the
       result has a list of values that is the element-wise sum of the
       lists of the originals.
       
      repeated int64 value = 3;
      Returns:
      This builder for chaining.
    • getAttributeIndicesList

      public List<Integer> getAttributeIndicesList()
       References to attributes in Profile.attribute_table. [optional]
       
      repeated int32 attribute_indices = 4;
      Specified by:
      getAttributeIndicesList in interface SampleOrBuilder
      Returns:
      A list containing the attributeIndices.
    • getAttributeIndicesCount

      public int getAttributeIndicesCount()
       References to attributes in Profile.attribute_table. [optional]
       
      repeated int32 attribute_indices = 4;
      Specified by:
      getAttributeIndicesCount in interface SampleOrBuilder
      Returns:
      The count of attributeIndices.
    • getAttributeIndices

      public int getAttributeIndices(int index)
       References to attributes in Profile.attribute_table. [optional]
       
      repeated int32 attribute_indices = 4;
      Specified by:
      getAttributeIndices in interface SampleOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The attributeIndices at the given index.
    • setAttributeIndices

      public Sample.Builder setAttributeIndices(int index, int value)
       References to attributes in Profile.attribute_table. [optional]
       
      repeated int32 attribute_indices = 4;
      Parameters:
      index - The index to set the value at.
      value - The attributeIndices to set.
      Returns:
      This builder for chaining.
    • addAttributeIndices

      public Sample.Builder addAttributeIndices(int value)
       References to attributes in Profile.attribute_table. [optional]
       
      repeated int32 attribute_indices = 4;
      Parameters:
      value - The attributeIndices to add.
      Returns:
      This builder for chaining.
    • addAllAttributeIndices

      public Sample.Builder addAllAttributeIndices(Iterable<? extends Integer> values)
       References to attributes in Profile.attribute_table. [optional]
       
      repeated int32 attribute_indices = 4;
      Parameters:
      values - The attributeIndices to add.
      Returns:
      This builder for chaining.
    • clearAttributeIndices

      public Sample.Builder clearAttributeIndices()
       References to attributes in Profile.attribute_table. [optional]
       
      repeated int32 attribute_indices = 4;
      Returns:
      This builder for chaining.
    • hasLinkIndex

      public boolean hasLinkIndex()
       Reference to link in Profile.link_table. [optional]
       
      optional int32 link_index = 5;
      Specified by:
      hasLinkIndex in interface SampleOrBuilder
      Returns:
      Whether the linkIndex field is set.
    • getLinkIndex

      public int getLinkIndex()
       Reference to link in Profile.link_table. [optional]
       
      optional int32 link_index = 5;
      Specified by:
      getLinkIndex in interface SampleOrBuilder
      Returns:
      The linkIndex.
    • setLinkIndex

      public Sample.Builder setLinkIndex(int value)
       Reference to link in Profile.link_table. [optional]
       
      optional int32 link_index = 5;
      Parameters:
      value - The linkIndex to set.
      Returns:
      This builder for chaining.
    • clearLinkIndex

      public Sample.Builder clearLinkIndex()
       Reference to link in Profile.link_table. [optional]
       
      optional int32 link_index = 5;
      Returns:
      This builder for chaining.
    • getTimestampsUnixNanoList

      public List<Long> getTimestampsUnixNanoList()
       Timestamps associated with Sample represented in nanoseconds. These timestamps are expected
       to fall within the Profile's time range. [optional]
       
      repeated uint64 timestamps_unix_nano = 6;
      Specified by:
      getTimestampsUnixNanoList in interface SampleOrBuilder
      Returns:
      A list containing the timestampsUnixNano.
    • getTimestampsUnixNanoCount

      public int getTimestampsUnixNanoCount()
       Timestamps associated with Sample represented in nanoseconds. These timestamps are expected
       to fall within the Profile's time range. [optional]
       
      repeated uint64 timestamps_unix_nano = 6;
      Specified by:
      getTimestampsUnixNanoCount in interface SampleOrBuilder
      Returns:
      The count of timestampsUnixNano.
    • getTimestampsUnixNano

      public long getTimestampsUnixNano(int index)
       Timestamps associated with Sample represented in nanoseconds. These timestamps are expected
       to fall within the Profile's time range. [optional]
       
      repeated uint64 timestamps_unix_nano = 6;
      Specified by:
      getTimestampsUnixNano in interface SampleOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The timestampsUnixNano at the given index.
    • setTimestampsUnixNano

      public Sample.Builder setTimestampsUnixNano(int index, long value)
       Timestamps associated with Sample represented in nanoseconds. These timestamps are expected
       to fall within the Profile's time range. [optional]
       
      repeated uint64 timestamps_unix_nano = 6;
      Parameters:
      index - The index to set the value at.
      value - The timestampsUnixNano to set.
      Returns:
      This builder for chaining.
    • addTimestampsUnixNano

      public Sample.Builder addTimestampsUnixNano(long value)
       Timestamps associated with Sample represented in nanoseconds. These timestamps are expected
       to fall within the Profile's time range. [optional]
       
      repeated uint64 timestamps_unix_nano = 6;
      Parameters:
      value - The timestampsUnixNano to add.
      Returns:
      This builder for chaining.
    • addAllTimestampsUnixNano

      public Sample.Builder addAllTimestampsUnixNano(Iterable<? extends Long> values)
       Timestamps associated with Sample represented in nanoseconds. These timestamps are expected
       to fall within the Profile's time range. [optional]
       
      repeated uint64 timestamps_unix_nano = 6;
      Parameters:
      values - The timestampsUnixNano to add.
      Returns:
      This builder for chaining.
    • clearTimestampsUnixNano

      public Sample.Builder clearTimestampsUnixNano()
       Timestamps associated with Sample represented in nanoseconds. These timestamps are expected
       to fall within the Profile's time range. [optional]
       
      repeated uint64 timestamps_unix_nano = 6;
      Returns:
      This builder for chaining.
    • setUnknownFields

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

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