Interface PubSubMessageOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
PubSubMessage,PubSubMessage.Builder
public interface PubSubMessageOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsAttributes(String key) Optional attributes that can be used for message metadata/headers.Deprecated.intOptional attributes that can be used for message metadata/headers.Optional attributes that can be used for message metadata/headers.getAttributesOrDefault(String key, AttributeValues defaultValue) Optional attributes that can be used for message metadata/headers.Optional attributes that can be used for message metadata/headers.com.google.protobuf.ByteStringgetData()The payload of the message.com.google.protobuf.TimestampAn optional, user-specified event time.com.google.protobuf.TimestampOrBuilderAn optional, user-specified event time.com.google.protobuf.ByteStringgetKey()The key used for routing messages to partitions or for compaction (e.g., keep the last N messages per key).booleanAn optional, user-specified event time.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitializedMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getKey
com.google.protobuf.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:
- The key.
-
getData
com.google.protobuf.ByteString getData()The payload of the message.
bytes data = 2;- Returns:
- The data.
-
getAttributesCount
int getAttributesCount()Optional attributes that can be used for message metadata/headers.
map<string, .google.cloud.pubsublite.v1.AttributeValues> attributes = 3; -
containsAttributes
Optional attributes that can be used for message metadata/headers.
map<string, .google.cloud.pubsublite.v1.AttributeValues> attributes = 3; -
getAttributes
Deprecated.UsegetAttributesMap()instead. -
getAttributesMap
Map<String,AttributeValues> getAttributesMap()Optional attributes that can be used for message metadata/headers.
map<string, .google.cloud.pubsublite.v1.AttributeValues> attributes = 3; -
getAttributesOrDefault
Optional attributes that can be used for message metadata/headers.
map<string, .google.cloud.pubsublite.v1.AttributeValues> attributes = 3; -
getAttributesOrThrow
Optional attributes that can be used for message metadata/headers.
map<string, .google.cloud.pubsublite.v1.AttributeValues> attributes = 3; -
hasEventTime
boolean hasEventTime()An optional, user-specified event time.
.google.protobuf.Timestamp event_time = 4;- Returns:
- Whether the eventTime field is set.
-
getEventTime
com.google.protobuf.Timestamp getEventTime()An optional, user-specified event time.
.google.protobuf.Timestamp event_time = 4;- Returns:
- The eventTime.
-
getEventTimeOrBuilder
com.google.protobuf.TimestampOrBuilder getEventTimeOrBuilder()An optional, user-specified event time.
.google.protobuf.Timestamp event_time = 4;
-