Package com.google.pubsub.v1
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
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description booleancontainsAttributes(String key)Attributes for this message.Map<String,String>getAttributes()Deprecated.intgetAttributesCount()Attributes for this message.Map<String,String>getAttributesMap()Attributes for this message.StringgetAttributesOrDefault(String key, String defaultValue)Attributes for this message.StringgetAttributesOrThrow(String key)Attributes for this message.com.google.protobuf.ByteStringgetData()The message data field.StringgetMessageId()ID of this message, assigned by the server when the message is published.com.google.protobuf.ByteStringgetMessageIdBytes()ID of this message, assigned by the server when the message is published.StringgetOrderingKey()If non-empty, identifies related messages for which publish order should be respected.com.google.protobuf.ByteStringgetOrderingKeyBytes()If non-empty, identifies related messages for which publish order should be respected.com.google.protobuf.TimestampgetPublishTime()The time at which the message was published, populated by the server when it receives the `Publish` call.com.google.protobuf.TimestampOrBuildergetPublishTimeOrBuilder()The time at which the message was published, populated by the server when it receives the `Publish` call.booleanhasPublishTime()The time at which the message was published, populated by the server when it receives the `Publish` call.-
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
-
-
-
Method Detail
-
getData
com.google.protobuf.ByteString getData()
The message data field. If this field is empty, the message must contain at least one attribute.
bytes data = 1;- Returns:
- The data.
-
getAttributesCount
int getAttributesCount()
Attributes for this message. If this field is empty, the message must contain non-empty data. This can be used to filter messages on the subscription.
map<string, string> attributes = 2;
-
containsAttributes
boolean containsAttributes(String key)
Attributes for this message. If this field is empty, the message must contain non-empty data. This can be used to filter messages on the subscription.
map<string, string> attributes = 2;
-
getAttributes
@Deprecated Map<String,String> getAttributes()
Deprecated.UsegetAttributesMap()instead.
-
getAttributesMap
Map<String,String> getAttributesMap()
Attributes for this message. If this field is empty, the message must contain non-empty data. This can be used to filter messages on the subscription.
map<string, string> attributes = 2;
-
getAttributesOrDefault
String getAttributesOrDefault(String key, String defaultValue)
Attributes for this message. If this field is empty, the message must contain non-empty data. This can be used to filter messages on the subscription.
map<string, string> attributes = 2;
-
getAttributesOrThrow
String getAttributesOrThrow(String key)
Attributes for this message. If this field is empty, the message must contain non-empty data. This can be used to filter messages on the subscription.
map<string, string> attributes = 2;
-
getMessageId
String getMessageId()
ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a `PubsubMessage` via a `Pull` call or a push delivery. It must not be populated by the publisher in a `Publish` call.
string message_id = 3;- Returns:
- The messageId.
-
getMessageIdBytes
com.google.protobuf.ByteString getMessageIdBytes()
ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a `PubsubMessage` via a `Pull` call or a push delivery. It must not be populated by the publisher in a `Publish` call.
string message_id = 3;- Returns:
- The bytes for messageId.
-
hasPublishTime
boolean hasPublishTime()
The time at which the message was published, populated by the server when it receives the `Publish` call. It must not be populated by the publisher in a `Publish` call.
.google.protobuf.Timestamp publish_time = 4;- Returns:
- Whether the publishTime field is set.
-
getPublishTime
com.google.protobuf.Timestamp getPublishTime()
The time at which the message was published, populated by the server when it receives the `Publish` call. It must not be populated by the publisher in a `Publish` call.
.google.protobuf.Timestamp publish_time = 4;- Returns:
- The publishTime.
-
getPublishTimeOrBuilder
com.google.protobuf.TimestampOrBuilder getPublishTimeOrBuilder()
The time at which the message was published, populated by the server when it receives the `Publish` call. It must not be populated by the publisher in a `Publish` call.
.google.protobuf.Timestamp publish_time = 4;
-
getOrderingKey
String getOrderingKey()
If non-empty, identifies related messages for which publish order should be respected. If a `Subscription` has `enable_message_ordering` set to `true`, messages published with the same non-empty `ordering_key` value will be delivered to subscribers in the order in which they are received by the Pub/Sub system. All `PubsubMessage`s published in a given `PublishRequest` must specify the same `ordering_key` value. For more information, see [ordering messages](https://cloud.google.com/pubsub/docs/ordering).
string ordering_key = 5;- Returns:
- The orderingKey.
-
getOrderingKeyBytes
com.google.protobuf.ByteString getOrderingKeyBytes()
If non-empty, identifies related messages for which publish order should be respected. If a `Subscription` has `enable_message_ordering` set to `true`, messages published with the same non-empty `ordering_key` value will be delivered to subscribers in the order in which they are received by the Pub/Sub system. All `PubsubMessage`s published in a given `PublishRequest` must specify the same `ordering_key` value. For more information, see [ordering messages](https://cloud.google.com/pubsub/docs/ordering).
string ordering_key = 5;- Returns:
- The bytes for orderingKey.
-
-