public final class PubSubMessage extends GeneratedMessageV3 implements PubSubMessageOrBuilder
A message that is published by publishers and delivered to subscribers.
Protobuf type google.cloud.pubsublite.v1.PubSubMessage
Inheritance
Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > PubSubMessageImplements
PubSubMessageOrBuilderStatic Fields
ATTRIBUTES_FIELD_NUMBER
public static final int ATTRIBUTES_FIELD_NUMBER
Type | Description |
int |
DATA_FIELD_NUMBER
public static final int DATA_FIELD_NUMBER
Type | Description |
int |
EVENT_TIME_FIELD_NUMBER
public static final int EVENT_TIME_FIELD_NUMBER
Type | Description |
int |
KEY_FIELD_NUMBER
public static final int KEY_FIELD_NUMBER
Type | Description |
int |
Static Methods
getDefaultInstance()
public static PubSubMessage getDefaultInstance()
Type | Description |
PubSubMessage |
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
newBuilder()
public static PubSubMessage.Builder newBuilder()
Type | Description |
PubSubMessage.Builder |
newBuilder(PubSubMessage prototype)
public static PubSubMessage.Builder newBuilder(PubSubMessage prototype)
Name | Description |
prototype | PubSubMessage |
Type | Description |
PubSubMessage.Builder |
parseDelimitedFrom(InputStream input)
public static PubSubMessage parseDelimitedFrom(InputStream input)
Name | Description |
input | InputStream |
Type | Description |
PubSubMessage |
Type | Description |
IOException |
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static PubSubMessage parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | InputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
PubSubMessage |
Type | Description |
IOException |
parseFrom(byte[] data)
public static PubSubMessage parseFrom(byte[] data)
Name | Description |
data | byte[] |
Type | Description |
PubSubMessage |
Type | Description |
InvalidProtocolBufferException |
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static PubSubMessage parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Name | Description |
data | byte[] |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
PubSubMessage |
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data)
public static PubSubMessage parseFrom(ByteString data)
Name | Description |
data | ByteString |
Type | Description |
PubSubMessage |
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static PubSubMessage parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Name | Description |
data | ByteString |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
PubSubMessage |
Type | Description |
InvalidProtocolBufferException |
parseFrom(CodedInputStream input)
public static PubSubMessage parseFrom(CodedInputStream input)
Name | Description |
input | CodedInputStream |
Type | Description |
PubSubMessage |
Type | Description |
IOException |
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static PubSubMessage parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
PubSubMessage |
Type | Description |
IOException |
parseFrom(InputStream input)
public static PubSubMessage parseFrom(InputStream input)
Name | Description |
input | InputStream |
Type | Description |
PubSubMessage |
Type | Description |
IOException |
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static PubSubMessage parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | InputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
PubSubMessage |
Type | Description |
IOException |
parseFrom(ByteBuffer data)
public static PubSubMessage parseFrom(ByteBuffer data)
Name | Description |
data | ByteBuffer |
Type | Description |
PubSubMessage |
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static PubSubMessage parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Name | Description |
data | ByteBuffer |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
PubSubMessage |
Type | Description |
InvalidProtocolBufferException |
parser()
public static Parser<PubSubMessage> parser()
Type | Description |
Parser<PubSubMessage> |
Methods
containsAttributes(String key)
public boolean containsAttributes(String key)
Optional attributes that can be used for message metadata/headers.
map<string, .google.cloud.pubsublite.v1.AttributeValues> attributes = 3;
Name | Description |
key | String |
Type | Description |
boolean |
equals(Object obj)
public boolean equals(Object obj)
Name | Description |
obj | Object |
Type | Description |
boolean |
getAttributes()
public Map<String,AttributeValues> getAttributes()
Use #getAttributesMap() instead.
Type | Description |
Map<String,AttributeValues> |
getAttributesCount()
public int getAttributesCount()
Optional attributes that can be used for message metadata/headers.
map<string, .google.cloud.pubsublite.v1.AttributeValues> attributes = 3;
Type | Description |
int |
getAttributesMap()
public Map<String,AttributeValues> getAttributesMap()
Optional attributes that can be used for message metadata/headers.
map<string, .google.cloud.pubsublite.v1.AttributeValues> attributes = 3;
Type | Description |
Map<String,AttributeValues> |
getAttributesOrDefault(String key, AttributeValues defaultValue)
public 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;
Name | Description |
key | String |
defaultValue | AttributeValues |
Type | Description |
AttributeValues |
getAttributesOrThrow(String key)
public AttributeValues getAttributesOrThrow(String key)
Optional attributes that can be used for message metadata/headers.
map<string, .google.cloud.pubsublite.v1.AttributeValues> attributes = 3;
Name | Description |
key | String |
Type | Description |
AttributeValues |
getData()
public ByteString getData()
The payload of the message.
bytes data = 2;
Type | Description |
ByteString | The data. |
getDefaultInstanceForType()
public PubSubMessage getDefaultInstanceForType()
Type | Description |
PubSubMessage |
getEventTime()
public Timestamp getEventTime()
An optional, user-specified event time.
.google.protobuf.Timestamp event_time = 4;
Type | Description |
Timestamp | The eventTime. |
getEventTimeOrBuilder()
public TimestampOrBuilder getEventTimeOrBuilder()
An optional, user-specified event time.
.google.protobuf.Timestamp event_time = 4;
Type | Description |
TimestampOrBuilder |
getKey()
public 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;
Type | Description |
ByteString | The key. |
getParserForType()
public Parser<PubSubMessage> getParserForType()
Type | Description |
Parser<PubSubMessage> |
getSerializedSize()
public int getSerializedSize()
Type | Description |
int |
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Type | Description |
UnknownFieldSet |
hasEventTime()
public boolean hasEventTime()
An optional, user-specified event time.
.google.protobuf.Timestamp event_time = 4;
Type | Description |
boolean | Whether the eventTime field is set. |
hashCode()
public int hashCode()
Type | Description |
int |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Name | Description |
number | int |
Type | Description |
MapField |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
newBuilderForType()
public PubSubMessage.Builder newBuilderForType()
Type | Description |
PubSubMessage.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected PubSubMessage.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Name | Description |
parent | BuilderParent |
Type | Description |
PubSubMessage.Builder |
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Name | Description |
unused | UnusedPrivateParameter |
Type | Description |
Object |
toBuilder()
public PubSubMessage.Builder toBuilder()
Type | Description |
PubSubMessage.Builder |
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Name | Description |
output | CodedOutputStream |
Type | Description |
IOException |