Class Sample.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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 Summary
Modifier and TypeMethodDescriptionaddAllAttributeIndices(Iterable<? extends Integer> values) References to attributes in Profile.attribute_table.addAllTimestampsUnixNano(Iterable<? extends Long> values) Timestamps associated with Sample represented in nanoseconds.addAllValue(Iterable<? extends Long> values) The type and unit of each value is defined by the corresponding entry in Profile.sample_type.addAttributeIndices(int value) References to attributes in Profile.attribute_table.addTimestampsUnixNano(long value) Timestamps associated with Sample represented in nanoseconds.addValue(long value) The type and unit of each value is defined by the corresponding entry in Profile.sample_type.build()clear()References to attributes in Profile.attribute_table.Reference to link in Profile.link_table.locations_length along with locations_start_index refers to a slice of locations in Profile.location_indices.locations_start_index along with locations_length refers to to a slice of locations in Profile.location_indices.Timestamps associated with Sample represented in nanoseconds.The type and unit of each value is defined by the corresponding entry in Profile.sample_type.intgetAttributeIndices(int index) References to attributes in Profile.attribute_table.intReferences to attributes in Profile.attribute_table.References to attributes in Profile.attribute_table.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorintReference to link in Profile.link_table.intlocations_length along with locations_start_index refers to a slice of locations in Profile.location_indices.intlocations_start_index along with locations_length refers to to a slice of locations in Profile.location_indices.longgetTimestampsUnixNano(int index) Timestamps associated with Sample represented in nanoseconds.intTimestamps associated with Sample represented in nanoseconds.Timestamps associated with Sample represented in nanoseconds.longgetValue(int index) The type and unit of each value is defined by the corresponding entry in Profile.sample_type.intThe type and unit of each value is defined by the corresponding entry in Profile.sample_type.The type and unit of each value is defined by the corresponding entry in Profile.sample_type.booleanReference to link in Profile.link_table.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) setAttributeIndices(int index, int value) References to attributes in Profile.attribute_table.setLinkIndex(int value) Reference to link in Profile.link_table.setLocationsLength(int value) locations_length along with locations_start_index refers to a slice of locations in Profile.location_indices.setLocationsStartIndex(int value) locations_start_index along with locations_length refers to to a slice of locations in Profile.location_indices.setTimestampsUnixNano(int index, long value) Timestamps associated with Sample represented in nanoseconds.setValue(int index, long value) The type and unit of each value is defined by the corresponding entry in Profile.sample_type.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<Sample.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Sample.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Sample.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Sample.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Sample.Builder>
-
mergeFrom
public Sample.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.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:
getLocationsStartIndexin interfaceSampleOrBuilder- Returns:
- The locationsStartIndex.
-
setLocationsStartIndex
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
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:
getLocationsLengthin interfaceSampleOrBuilder- Returns:
- The locationsLength.
-
setLocationsLength
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
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
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:
getValueListin interfaceSampleOrBuilder- 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:
getValueCountin interfaceSampleOrBuilder- 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:
getValuein interfaceSampleOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The value at the given index.
-
setValue
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
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
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
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
References to attributes in Profile.attribute_table. [optional]
repeated int32 attribute_indices = 4;- Specified by:
getAttributeIndicesListin interfaceSampleOrBuilder- 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:
getAttributeIndicesCountin interfaceSampleOrBuilder- 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:
getAttributeIndicesin interfaceSampleOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The attributeIndices at the given index.
-
setAttributeIndices
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
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
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
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:
hasLinkIndexin interfaceSampleOrBuilder- 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:
getLinkIndexin interfaceSampleOrBuilder- Returns:
- The linkIndex.
-
setLinkIndex
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
Reference to link in Profile.link_table. [optional]
optional int32 link_index = 5;- Returns:
- This builder for chaining.
-
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:
getTimestampsUnixNanoListin interfaceSampleOrBuilder- 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:
getTimestampsUnixNanoCountin interfaceSampleOrBuilder- 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:
getTimestampsUnixNanoin interfaceSampleOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The timestampsUnixNano at the given index.
-
setTimestampsUnixNano
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
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
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
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.
-