Class Span.Link.Builder (2.44.0)

public static final class Span.Link.Builder extends GeneratedMessageV3.Builder<Span.Link.Builder> implements Span.LinkOrBuilder

A pointer from the current span to another span in the same trace or in a different trace. For example, this can be used in batching operations, where a single batch handler processes multiple requests from different traces or when the handler receives a request from a different project.

Protobuf type google.devtools.cloudtrace.v2.Span.Link

Implements

Span.LinkOrBuilder

Static Methods

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

public Span.Link.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Span.Link.Builder
Overrides
public Span.Link build()
Returns
Type Description
Span.Link
public Span.Link buildPartial()
Returns
Type Description
Span.Link
public Span.Link.Builder clear()
Returns
Type Description
Span.Link.Builder
Overrides
public Span.Link.Builder clearAttributes()

A set of attributes on the link. Up to 32 attributes can be specified per link.

.google.devtools.cloudtrace.v2.Span.Attributes attributes = 4;

Returns
Type Description
Span.Link.Builder
public Span.Link.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Span.Link.Builder
Overrides
public Span.Link.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Span.Link.Builder
Overrides
public Span.Link.Builder clearSpanId()

The [SPAN_ID] for a span within a trace.

string span_id = 2;

Returns
Type Description
Span.Link.Builder

This builder for chaining.

public Span.Link.Builder clearTraceId()

The [TRACE_ID] for a trace within a project.

string trace_id = 1;

Returns
Type Description
Span.Link.Builder

This builder for chaining.

public Span.Link.Builder clearType()

The relationship of the current span relative to the linked span.

.google.devtools.cloudtrace.v2.Span.Link.Type type = 3;

Returns
Type Description
Span.Link.Builder

This builder for chaining.

public Span.Link.Builder clone()
Returns
Type Description
Span.Link.Builder
Overrides
public Span.Attributes getAttributes()

A set of attributes on the link. Up to 32 attributes can be specified per link.

.google.devtools.cloudtrace.v2.Span.Attributes attributes = 4;

Returns
Type Description
Span.Attributes

The attributes.

public Span.Attributes.Builder getAttributesBuilder()

A set of attributes on the link. Up to 32 attributes can be specified per link.

.google.devtools.cloudtrace.v2.Span.Attributes attributes = 4;

Returns
Type Description
Span.Attributes.Builder
public Span.AttributesOrBuilder getAttributesOrBuilder()

A set of attributes on the link. Up to 32 attributes can be specified per link.

.google.devtools.cloudtrace.v2.Span.Attributes attributes = 4;

Returns
Type Description
Span.AttributesOrBuilder
public Span.Link getDefaultInstanceForType()
Returns
Type Description
Span.Link
public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides
public String getSpanId()

The [SPAN_ID] for a span within a trace.

string span_id = 2;

Returns
Type Description
String

The spanId.

public ByteString getSpanIdBytes()

The [SPAN_ID] for a span within a trace.

string span_id = 2;

Returns
Type Description
ByteString

The bytes for spanId.

public String getTraceId()

The [TRACE_ID] for a trace within a project.

string trace_id = 1;

Returns
Type Description
String

The traceId.

public ByteString getTraceIdBytes()

The [TRACE_ID] for a trace within a project.

string trace_id = 1;

Returns
Type Description
ByteString

The bytes for traceId.

public Span.Link.Type getType()

The relationship of the current span relative to the linked span.

.google.devtools.cloudtrace.v2.Span.Link.Type type = 3;

Returns
Type Description
Span.Link.Type

The type.

public int getTypeValue()

The relationship of the current span relative to the linked span.

.google.devtools.cloudtrace.v2.Span.Link.Type type = 3;

Returns
Type Description
int

The enum numeric value on the wire for type.

public boolean hasAttributes()

A set of attributes on the link. Up to 32 attributes can be specified per link.

.google.devtools.cloudtrace.v2.Span.Attributes attributes = 4;

Returns
Type Description
boolean

Whether the attributes field is set.

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides
public final boolean isInitialized()
Returns
Type Description
boolean
Overrides
public Span.Link.Builder mergeAttributes(Span.Attributes value)

A set of attributes on the link. Up to 32 attributes can be specified per link.

.google.devtools.cloudtrace.v2.Span.Attributes attributes = 4;

Parameter
Name Description
value Span.Attributes
Returns
Type Description
Span.Link.Builder
public Span.Link.Builder mergeFrom(Span.Link other)
Parameter
Name Description
other Span.Link
Returns
Type Description
Span.Link.Builder
public Span.Link.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Span.Link.Builder
Overrides
Exceptions
Type Description
IOException
public Span.Link.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Span.Link.Builder
Overrides
public final Span.Link.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Span.Link.Builder
Overrides
public Span.Link.Builder setAttributes(Span.Attributes value)

A set of attributes on the link. Up to 32 attributes can be specified per link.

.google.devtools.cloudtrace.v2.Span.Attributes attributes = 4;

Parameter
Name Description
value Span.Attributes
Returns
Type Description
Span.Link.Builder
public Span.Link.Builder setAttributes(Span.Attributes.Builder builderForValue)

A set of attributes on the link. Up to 32 attributes can be specified per link.

.google.devtools.cloudtrace.v2.Span.Attributes attributes = 4;

Parameter
Name Description
builderForValue Span.Attributes.Builder
Returns
Type Description
Span.Link.Builder
public Span.Link.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Span.Link.Builder
Overrides
public Span.Link.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Span.Link.Builder
Overrides
public Span.Link.Builder setSpanId(String value)

The [SPAN_ID] for a span within a trace.

string span_id = 2;

Parameter
Name Description
value String

The spanId to set.

Returns
Type Description
Span.Link.Builder

This builder for chaining.

public Span.Link.Builder setSpanIdBytes(ByteString value)

The [SPAN_ID] for a span within a trace.

string span_id = 2;

Parameter
Name Description
value ByteString

The bytes for spanId to set.

Returns
Type Description
Span.Link.Builder

This builder for chaining.

public Span.Link.Builder setTraceId(String value)

The [TRACE_ID] for a trace within a project.

string trace_id = 1;

Parameter
Name Description
value String

The traceId to set.

Returns
Type Description
Span.Link.Builder

This builder for chaining.

public Span.Link.Builder setTraceIdBytes(ByteString value)

The [TRACE_ID] for a trace within a project.

string trace_id = 1;

Parameter
Name Description
value ByteString

The bytes for traceId to set.

Returns
Type Description
Span.Link.Builder

This builder for chaining.

public Span.Link.Builder setType(Span.Link.Type value)

The relationship of the current span relative to the linked span.

.google.devtools.cloudtrace.v2.Span.Link.Type type = 3;

Parameter
Name Description
value Span.Link.Type

The type to set.

Returns
Type Description
Span.Link.Builder

This builder for chaining.

public Span.Link.Builder setTypeValue(int value)

The relationship of the current span relative to the linked span.

.google.devtools.cloudtrace.v2.Span.Link.Type type = 3;

Parameter
Name Description
value int

The enum numeric value on the wire for type to set.

Returns
Type Description
Span.Link.Builder

This builder for chaining.

public final Span.Link.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Span.Link.Builder
Overrides