Interface PubSubMessageOrBuilder (1.13.7)

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
Name Description
key String
Returns
Type Description
boolean

getAttributes() (deprecated)

public abstract Map<String,AttributeValues> getAttributes()

Use #getAttributesMap() instead.

Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
key String
defaultValue AttributeValues
Returns
Type Description
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
Name Description
key String
Returns
Type Description
AttributeValues

getData()

public abstract ByteString getData()

The payload of the message.

bytes data = 2;

Returns
Type Description
ByteString

The data.

getEventTime()

public abstract Timestamp getEventTime()

An optional, user-specified event time.

.google.protobuf.Timestamp event_time = 4;

Returns
Type Description
Timestamp

The eventTime.

getEventTimeOrBuilder()

public abstract TimestampOrBuilder getEventTimeOrBuilder()

An optional, user-specified event time.

.google.protobuf.Timestamp event_time = 4;

Returns
Type Description
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
Type Description
ByteString

The key.

hasEventTime()

public abstract boolean hasEventTime()

An optional, user-specified event time.

.google.protobuf.Timestamp event_time = 4;

Returns
Type Description
boolean

Whether the eventTime field is set.