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
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)
Static Fields
ATTRIBUTES_FIELD_NUMBER
public static final int ATTRIBUTES_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
DATA_FIELD_NUMBER
public static final int DATA_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
EVENT_TIME_FIELD_NUMBER
public static final int EVENT_TIME_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
KEY_FIELD_NUMBER
public static final int KEY_FIELD_NUMBER
Field Value |
---|
Type | Description |
int | |
Static Methods
getDefaultInstance()
public static PubSubMessage getDefaultInstance()
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
newBuilder()
public static PubSubMessage.Builder newBuilder()
newBuilder(PubSubMessage prototype)
public static PubSubMessage.Builder newBuilder(PubSubMessage prototype)
public static PubSubMessage parseDelimitedFrom(InputStream input)
public static PubSubMessage parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(byte[] data)
public static PubSubMessage parseFrom(byte[] data)
Parameter |
---|
Name | Description |
data | byte[]
|
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static PubSubMessage parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteString data)
public static PubSubMessage parseFrom(ByteString data)
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static PubSubMessage parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static PubSubMessage parseFrom(CodedInputStream input)
public static PubSubMessage parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static PubSubMessage parseFrom(InputStream input)
public static PubSubMessage parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
parseFrom(ByteBuffer data)
public static PubSubMessage parseFrom(ByteBuffer data)
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static PubSubMessage parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
parser()
public static Parser<PubSubMessage> parser()
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;
Parameter |
---|
Name | Description |
key | String
|
equals(Object obj)
public boolean equals(Object obj)
Parameter |
---|
Name | Description |
obj | Object
|
Overrides
getAttributes()
public Map<String,AttributeValues> getAttributes()
getAttributesCount()
public 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 Map<String,AttributeValues> getAttributesMap()
Optional attributes that can be used for message metadata/headers.
map<string, .google.cloud.pubsublite.v1.AttributeValues> attributes = 3;
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;
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;
Parameter |
---|
Name | Description |
key | String
|
getData()
public ByteString getData()
The payload of the message.
bytes data = 2;
getDefaultInstanceForType()
public PubSubMessage getDefaultInstanceForType()
getEventTime()
public Timestamp getEventTime()
An optional, user-specified event time.
.google.protobuf.Timestamp event_time = 4;
Returns |
---|
Type | Description |
Timestamp | The eventTime.
|
getEventTimeOrBuilder()
public TimestampOrBuilder getEventTimeOrBuilder()
An optional, user-specified event time.
.google.protobuf.Timestamp event_time = 4;
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;
getParserForType()
public Parser<PubSubMessage> getParserForType()
Overrides
getSerializedSize()
public int getSerializedSize()
Returns |
---|
Type | Description |
int | |
Overrides
hasEventTime()
public boolean hasEventTime()
An optional, user-specified event time.
.google.protobuf.Timestamp event_time = 4;
Returns |
---|
Type | Description |
boolean | Whether the eventTime field is set.
|
hashCode()
Returns |
---|
Type | Description |
int | |
Overrides
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter |
---|
Name | Description |
number | int
|
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
newBuilderForType()
public PubSubMessage.Builder newBuilderForType()
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected PubSubMessage.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Overrides
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Overrides
toBuilder()
public PubSubMessage.Builder toBuilder()
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Overrides