Send feedback
Class PubSubMessage (1.12.22)
Stay organized with collections
Save and categorize content based on your preferences.
Version 1.12.22 keyboard_arrow_down
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
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-04 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?
{"lastModified": "Last updated 2024-10-04 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-04 UTC."]]