Class PubsubMessage (0.16.0)

public final class PubsubMessage extends GeneratedMessageV3 implements PubsubMessageOrBuilder

A message published to a topic.

Protobuf type google.events.cloud.pubsub.v1.PubsubMessage

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

MESSAGE_ID_FIELD_NUMBER

public static final int MESSAGE_ID_FIELD_NUMBER
Field Value
Type Description
int

ORDERING_KEY_FIELD_NUMBER

public static final int ORDERING_KEY_FIELD_NUMBER
Field Value
Type Description
int

PUBLISH_TIME_FIELD_NUMBER

public static final int PUBLISH_TIME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static PubsubMessage getDefaultInstance()
Returns
Type Description
PubsubMessage

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static PubsubMessage.Builder newBuilder()
Returns
Type Description
PubsubMessage.Builder

newBuilder(PubsubMessage prototype)

public static PubsubMessage.Builder newBuilder(PubsubMessage prototype)
Parameter
Name Description
prototype PubsubMessage
Returns
Type Description
PubsubMessage.Builder

parseDelimitedFrom(InputStream input)

public static PubsubMessage parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
PubsubMessage
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static PubsubMessage parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PubsubMessage
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static PubsubMessage parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
PubsubMessage
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static PubsubMessage parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PubsubMessage
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static PubsubMessage parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
PubsubMessage
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static PubsubMessage parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PubsubMessage
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static PubsubMessage parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
PubsubMessage
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static PubsubMessage parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PubsubMessage
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static PubsubMessage parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
PubsubMessage
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static PubsubMessage parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PubsubMessage
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static PubsubMessage parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
PubsubMessage
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static PubsubMessage parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PubsubMessage
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<PubsubMessage> parser()
Returns
Type Description
Parser<PubsubMessage>

Methods

containsAttributes(String key)

public boolean containsAttributes(String key)

Attributes for this message.

map<string, string> attributes = 2;

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAttributes()

public Map<String,String> getAttributes()

Use #getAttributesMap() instead.

Returns
Type Description
Map<String,String>

getAttributesCount()

public int getAttributesCount()

Attributes for this message.

map<string, string> attributes = 2;

Returns
Type Description
int

getAttributesMap()

public Map<String,String> getAttributesMap()

Attributes for this message.

map<string, string> attributes = 2;

Returns
Type Description
Map<String,String>

getAttributesOrDefault(String key, String defaultValue)

public String getAttributesOrDefault(String key, String defaultValue)

Attributes for this message.

map<string, string> attributes = 2;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getAttributesOrThrow(String key)

public String getAttributesOrThrow(String key)

Attributes for this message.

map<string, string> attributes = 2;

Parameter
Name Description
key String
Returns
Type Description
String

getData()

public ByteString getData()

The binary data in the message.

bytes data = 1;

Returns
Type Description
ByteString

The data.

getDefaultInstanceForType()

public PubsubMessage getDefaultInstanceForType()
Returns
Type Description
PubsubMessage

getMessageId()

public String getMessageId()

ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic.

string message_id = 3;

Returns
Type Description
String

The messageId.

getMessageIdBytes()

public ByteString getMessageIdBytes()

ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic.

string message_id = 3;

Returns
Type Description
ByteString

The bytes for messageId.

getOrderingKey()

public String getOrderingKey()

If non-empty, identifies related messages for which publish order should be respected.

string ordering_key = 5;

Returns
Type Description
String

The orderingKey.

getOrderingKeyBytes()

public ByteString getOrderingKeyBytes()

If non-empty, identifies related messages for which publish order should be respected.

string ordering_key = 5;

Returns
Type Description
ByteString

The bytes for orderingKey.

getParserForType()

public Parser<PubsubMessage> getParserForType()
Returns
Type Description
Parser<PubsubMessage>
Overrides

getPublishTime()

public Timestamp getPublishTime()

The time at which the message was published, populated by the server when it receives the Publish call.

.google.protobuf.Timestamp publish_time = 4;

Returns
Type Description
Timestamp

The publishTime.

getPublishTimeOrBuilder()

public TimestampOrBuilder getPublishTimeOrBuilder()

The time at which the message was published, populated by the server when it receives the Publish call.

.google.protobuf.Timestamp publish_time = 4;

Returns
Type Description
TimestampOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
Type Description
UnknownFieldSet
Overrides

hasPublishTime()

public boolean hasPublishTime()

The time at which the message was published, populated by the server when it receives the Publish call.

.google.protobuf.Timestamp publish_time = 4;

Returns
Type Description
boolean

Whether the publishTime field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
Name Description
number int
Returns
Type Description
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public PubsubMessage.Builder newBuilderForType()
Returns
Type Description
PubsubMessage.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected PubsubMessage.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
PubsubMessage.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public PubsubMessage.Builder toBuilder()
Returns
Type Description
PubsubMessage.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException