Class Distribution.Exemplar.Builder (2.9.0)

public static final class Distribution.Exemplar.Builder extends GeneratedMessageV3.Builder<Distribution.Exemplar.Builder> implements Distribution.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, such as a trace ID that was active when a value was added. They may contain further information, such as a example values and timestamps, origin, etc.

Protobuf type google.api.Distribution.Exemplar

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllAttachments(Iterable<? extends Any> values)

public Distribution.Exemplar.Builder addAllAttachments(Iterable<? extends Any> values)

Contextual information about the example value. Examples are: Trace: type.googleapis.com/google.monitoring.v3.SpanContext Literal string: type.googleapis.com/google.protobuf.StringValue Labels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabels There may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.

repeated .google.protobuf.Any attachments = 3;

Parameter
NameDescription
valuesIterable<? extends com.google.protobuf.Any>
Returns
TypeDescription
Distribution.Exemplar.Builder

addAttachments(Any value)

public Distribution.Exemplar.Builder addAttachments(Any value)

Contextual information about the example value. Examples are: Trace: type.googleapis.com/google.monitoring.v3.SpanContext Literal string: type.googleapis.com/google.protobuf.StringValue Labels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabels There may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.

repeated .google.protobuf.Any attachments = 3;

Parameter
NameDescription
valueAny
Returns
TypeDescription
Distribution.Exemplar.Builder

addAttachments(Any.Builder builderForValue)

public Distribution.Exemplar.Builder addAttachments(Any.Builder builderForValue)

Contextual information about the example value. Examples are: Trace: type.googleapis.com/google.monitoring.v3.SpanContext Literal string: type.googleapis.com/google.protobuf.StringValue Labels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabels There may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.

repeated .google.protobuf.Any attachments = 3;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Distribution.Exemplar.Builder

addAttachments(int index, Any value)

public Distribution.Exemplar.Builder addAttachments(int index, Any value)

Contextual information about the example value. Examples are: Trace: type.googleapis.com/google.monitoring.v3.SpanContext Literal string: type.googleapis.com/google.protobuf.StringValue Labels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabels There may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.

repeated .google.protobuf.Any attachments = 3;

Parameters
NameDescription
indexint
valueAny
Returns
TypeDescription
Distribution.Exemplar.Builder

addAttachments(int index, Any.Builder builderForValue)

public Distribution.Exemplar.Builder addAttachments(int index, Any.Builder builderForValue)

Contextual information about the example value. Examples are: Trace: type.googleapis.com/google.monitoring.v3.SpanContext Literal string: type.googleapis.com/google.protobuf.StringValue Labels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabels There may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.

repeated .google.protobuf.Any attachments = 3;

Parameters
NameDescription
indexint
builderForValueBuilder
Returns
TypeDescription
Distribution.Exemplar.Builder

addAttachmentsBuilder()

public Any.Builder addAttachmentsBuilder()

Contextual information about the example value. Examples are: Trace: type.googleapis.com/google.monitoring.v3.SpanContext Literal string: type.googleapis.com/google.protobuf.StringValue Labels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabels There may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.

repeated .google.protobuf.Any attachments = 3;

Returns
TypeDescription
Builder

addAttachmentsBuilder(int index)

public Any.Builder addAttachmentsBuilder(int index)

Contextual information about the example value. Examples are: Trace: type.googleapis.com/google.monitoring.v3.SpanContext Literal string: type.googleapis.com/google.protobuf.StringValue Labels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabels There may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.

repeated .google.protobuf.Any attachments = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Distribution.Exemplar.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Distribution.Exemplar.Builder
Overrides

build()

public Distribution.Exemplar build()
Returns
TypeDescription
Distribution.Exemplar

buildPartial()

public Distribution.Exemplar buildPartial()
Returns
TypeDescription
Distribution.Exemplar

clear()

public Distribution.Exemplar.Builder clear()
Returns
TypeDescription
Distribution.Exemplar.Builder
Overrides

clearAttachments()

public Distribution.Exemplar.Builder clearAttachments()

Contextual information about the example value. Examples are: Trace: type.googleapis.com/google.monitoring.v3.SpanContext Literal string: type.googleapis.com/google.protobuf.StringValue Labels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabels There may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.

repeated .google.protobuf.Any attachments = 3;

Returns
TypeDescription
Distribution.Exemplar.Builder

clearField(Descriptors.FieldDescriptor field)

public Distribution.Exemplar.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Distribution.Exemplar.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public Distribution.Exemplar.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Distribution.Exemplar.Builder
Overrides

clearTimestamp()

public Distribution.Exemplar.Builder clearTimestamp()

The observation (sampling) time of the above value.

.google.protobuf.Timestamp timestamp = 2;

Returns
TypeDescription
Distribution.Exemplar.Builder

clearValue()

public Distribution.Exemplar.Builder clearValue()

Value of the exemplar point. This value determines to which bucket the exemplar belongs.

double value = 1;

Returns
TypeDescription
Distribution.Exemplar.Builder

This builder for chaining.

clone()

public Distribution.Exemplar.Builder clone()
Returns
TypeDescription
Distribution.Exemplar.Builder
Overrides

getAttachments(int index)

public Any getAttachments(int index)

Contextual information about the example value. Examples are: Trace: type.googleapis.com/google.monitoring.v3.SpanContext Literal string: type.googleapis.com/google.protobuf.StringValue Labels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabels There may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.

repeated .google.protobuf.Any attachments = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
Any

getAttachmentsBuilder(int index)

public Any.Builder getAttachmentsBuilder(int index)

Contextual information about the example value. Examples are: Trace: type.googleapis.com/google.monitoring.v3.SpanContext Literal string: type.googleapis.com/google.protobuf.StringValue Labels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabels There may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.

repeated .google.protobuf.Any attachments = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
Builder

getAttachmentsBuilderList()

public List<Any.Builder> getAttachmentsBuilderList()

Contextual information about the example value. Examples are: Trace: type.googleapis.com/google.monitoring.v3.SpanContext Literal string: type.googleapis.com/google.protobuf.StringValue Labels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabels There may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.

repeated .google.protobuf.Any attachments = 3;

Returns
TypeDescription
List<Builder>

getAttachmentsCount()

public int getAttachmentsCount()

Contextual information about the example value. Examples are: Trace: type.googleapis.com/google.monitoring.v3.SpanContext Literal string: type.googleapis.com/google.protobuf.StringValue Labels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabels There may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.

repeated .google.protobuf.Any attachments = 3;

Returns
TypeDescription
int

getAttachmentsList()

public List<Any> getAttachmentsList()

Contextual information about the example value. Examples are: Trace: type.googleapis.com/google.monitoring.v3.SpanContext Literal string: type.googleapis.com/google.protobuf.StringValue Labels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabels There may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.

repeated .google.protobuf.Any attachments = 3;

Returns
TypeDescription
List<Any>

getAttachmentsOrBuilder(int index)

public AnyOrBuilder getAttachmentsOrBuilder(int index)

Contextual information about the example value. Examples are: Trace: type.googleapis.com/google.monitoring.v3.SpanContext Literal string: type.googleapis.com/google.protobuf.StringValue Labels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabels There may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.

repeated .google.protobuf.Any attachments = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
AnyOrBuilder

getAttachmentsOrBuilderList()

public List<? extends AnyOrBuilder> getAttachmentsOrBuilderList()

Contextual information about the example value. Examples are: Trace: type.googleapis.com/google.monitoring.v3.SpanContext Literal string: type.googleapis.com/google.protobuf.StringValue Labels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabels There may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.

repeated .google.protobuf.Any attachments = 3;

Returns
TypeDescription
List<? extends com.google.protobuf.AnyOrBuilder>

getDefaultInstanceForType()

public Distribution.Exemplar getDefaultInstanceForType()
Returns
TypeDescription
Distribution.Exemplar

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getTimestamp()

public Timestamp getTimestamp()

The observation (sampling) time of the above value.

.google.protobuf.Timestamp timestamp = 2;

Returns
TypeDescription
Timestamp

The timestamp.

getTimestampBuilder()

public Timestamp.Builder getTimestampBuilder()

The observation (sampling) time of the above value.

.google.protobuf.Timestamp timestamp = 2;

Returns
TypeDescription
Builder

getTimestampOrBuilder()

public TimestampOrBuilder getTimestampOrBuilder()

The observation (sampling) time of the above value.

.google.protobuf.Timestamp timestamp = 2;

Returns
TypeDescription
TimestampOrBuilder

getValue()

public double getValue()

Value of the exemplar point. This value determines to which bucket the exemplar belongs.

double value = 1;

Returns
TypeDescription
double

The value.

hasTimestamp()

public boolean hasTimestamp()

The observation (sampling) time of the above value.

.google.protobuf.Timestamp timestamp = 2;

Returns
TypeDescription
boolean

Whether the timestamp field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Distribution.Exemplar other)

public Distribution.Exemplar.Builder mergeFrom(Distribution.Exemplar other)
Parameter
NameDescription
otherDistribution.Exemplar
Returns
TypeDescription
Distribution.Exemplar.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Distribution.Exemplar.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Distribution.Exemplar.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Distribution.Exemplar.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Distribution.Exemplar.Builder
Overrides

mergeTimestamp(Timestamp value)

public Distribution.Exemplar.Builder mergeTimestamp(Timestamp value)

The observation (sampling) time of the above value.

.google.protobuf.Timestamp timestamp = 2;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Distribution.Exemplar.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Distribution.Exemplar.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Distribution.Exemplar.Builder
Overrides

removeAttachments(int index)

public Distribution.Exemplar.Builder removeAttachments(int index)

Contextual information about the example value. Examples are: Trace: type.googleapis.com/google.monitoring.v3.SpanContext Literal string: type.googleapis.com/google.protobuf.StringValue Labels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabels There may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.

repeated .google.protobuf.Any attachments = 3;

Parameter
NameDescription
indexint
Returns
TypeDescription
Distribution.Exemplar.Builder

setAttachments(int index, Any value)

public Distribution.Exemplar.Builder setAttachments(int index, Any value)

Contextual information about the example value. Examples are: Trace: type.googleapis.com/google.monitoring.v3.SpanContext Literal string: type.googleapis.com/google.protobuf.StringValue Labels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabels There may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.

repeated .google.protobuf.Any attachments = 3;

Parameters
NameDescription
indexint
valueAny
Returns
TypeDescription
Distribution.Exemplar.Builder

setAttachments(int index, Any.Builder builderForValue)

public Distribution.Exemplar.Builder setAttachments(int index, Any.Builder builderForValue)

Contextual information about the example value. Examples are: Trace: type.googleapis.com/google.monitoring.v3.SpanContext Literal string: type.googleapis.com/google.protobuf.StringValue Labels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabels There may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.

repeated .google.protobuf.Any attachments = 3;

Parameters
NameDescription
indexint
builderForValueBuilder
Returns
TypeDescription
Distribution.Exemplar.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Distribution.Exemplar.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Distribution.Exemplar.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Distribution.Exemplar.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Distribution.Exemplar.Builder
Overrides

setTimestamp(Timestamp value)

public Distribution.Exemplar.Builder setTimestamp(Timestamp value)

The observation (sampling) time of the above value.

.google.protobuf.Timestamp timestamp = 2;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
Distribution.Exemplar.Builder

setTimestamp(Timestamp.Builder builderForValue)

public Distribution.Exemplar.Builder setTimestamp(Timestamp.Builder builderForValue)

The observation (sampling) time of the above value.

.google.protobuf.Timestamp timestamp = 2;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
Distribution.Exemplar.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final Distribution.Exemplar.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Distribution.Exemplar.Builder
Overrides

setValue(double value)

public Distribution.Exemplar.Builder setValue(double value)

Value of the exemplar point. This value determines to which bucket the exemplar belongs.

double value = 1;

Parameter
NameDescription
valuedouble

The value to set.

Returns
TypeDescription
Distribution.Exemplar.Builder

This builder for chaining.