Interface PubSubMessageOrBuilder (1.12.22)

public interface PubSubMessageOrBuilder extends MessageOrBuilder

Implements

MessageOrBuilder

Methods

containsAttributes(String key)

public abstract boolean containsAttributes(String key)

Optional attributes that can be used for message metadata/headers.

map<string, .google.cloud.pubsublite.v1.AttributeValues> attributes = 3;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getAttributes()

public abstract Map<String,AttributeValues> getAttributes()

Use #getAttributesMap() instead.

Returns
TypeDescription
Map<String,AttributeValues>

getAttributesCount()

public abstract int getAttributesCount()

Optional attributes that can be used for message metadata/headers.

map<string, .google.cloud.pubsublite.v1.AttributeValues> attributes = 3;

Returns
TypeDescription
int

getAttributesMap()

public abstract Map<String,AttributeValues> getAttributesMap()

Optional attributes that can be used for message metadata/headers.

map<string, .google.cloud.pubsublite.v1.AttributeValues> attributes = 3;

Returns
TypeDescription
Map<String,AttributeValues>

getAttributesOrDefault(String key, AttributeValues defaultValue)

public abstract AttributeValues getAttributesOrDefault(String key, AttributeValues defaultValue)

Optional attributes that can be used for message metadata/headers.

map<string, .google.cloud.pubsublite.v1.AttributeValues> attributes = 3;

Parameters
NameDescription
keyString
defaultValueAttributeValues
Returns
TypeDescription
AttributeValues

getAttributesOrThrow(String key)

public abstract AttributeValues getAttributesOrThrow(String key)

Optional attributes that can be used for message metadata/headers.

map<string, .google.cloud.pubsublite.v1.AttributeValues> attributes = 3;

Parameter
NameDescription
keyString
Returns
TypeDescription
AttributeValues

getData()

public abstract ByteString getData()

The payload of the message.

bytes data = 2;

Returns
TypeDescription
ByteString

The data.

getEventTime()

public abstract Timestamp getEventTime()

An optional, user-specified event time.

.google.protobuf.Timestamp event_time = 4;

Returns
TypeDescription
Timestamp

The eventTime.

getEventTimeOrBuilder()

public abstract TimestampOrBuilder getEventTimeOrBuilder()

An optional, user-specified event time.

.google.protobuf.Timestamp event_time = 4;

Returns
TypeDescription
TimestampOrBuilder

getKey()

public abstract ByteString getKey()

The key used for routing messages to partitions or for compaction (e.g., keep the last N messages per key). If the key is empty, the message is routed to an arbitrary partition.

bytes key = 1;

Returns
TypeDescription
ByteString

The key.

hasEventTime()

public abstract boolean hasEventTime()

An optional, user-specified event time.

.google.protobuf.Timestamp event_time = 4;

Returns
TypeDescription
boolean

Whether the eventTime field is set.