Class MessagePublishRequest (1.14.2)

public final class MessagePublishRequest extends GeneratedMessageV3 implements MessagePublishRequestOrBuilder

Request to publish messages to the topic.

Protobuf type google.cloud.pubsublite.v1.MessagePublishRequest

Static Fields

FIRST_SEQUENCE_NUMBER_FIELD_NUMBER

public static final int FIRST_SEQUENCE_NUMBER_FIELD_NUMBER
Field Value
Type Description
int

MESSAGES_FIELD_NUMBER

public static final int MESSAGES_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static MessagePublishRequest getDefaultInstance()
Returns
Type Description
MessagePublishRequest

getDescriptor()

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

newBuilder()

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

newBuilder(MessagePublishRequest prototype)

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

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public MessagePublishRequest getDefaultInstanceForType()
Returns
Type Description
MessagePublishRequest

getFirstSequenceNumber()

public long getFirstSequenceNumber()

The sequence number corresponding to the first message in messages. Messages within a batch are ordered and the sequence numbers of all subsequent messages in the batch are assumed to be incremental.

Sequence numbers are assigned at the message level and the first message published in a publisher client session must have a sequence number of 0. All messages must have contiguous sequence numbers, which uniquely identify the messages accepted by the publisher client. Since messages are ordered, the client only needs to specify the sequence number of the first message in a published batch. The server deduplicates messages with the same sequence number from the same publisher client_id.

int64 first_sequence_number = 2;

Returns
Type Description
long

The firstSequenceNumber.

getMessages(int index)

public PubSubMessage getMessages(int index)

The messages to publish.

repeated .google.cloud.pubsublite.v1.PubSubMessage messages = 1;

Parameter
Name Description
index int
Returns
Type Description
PubSubMessage

getMessagesCount()

public int getMessagesCount()

The messages to publish.

repeated .google.cloud.pubsublite.v1.PubSubMessage messages = 1;

Returns
Type Description
int

getMessagesList()

public List<PubSubMessage> getMessagesList()

The messages to publish.

repeated .google.cloud.pubsublite.v1.PubSubMessage messages = 1;

Returns
Type Description
List<PubSubMessage>

getMessagesOrBuilder(int index)

public PubSubMessageOrBuilder getMessagesOrBuilder(int index)

The messages to publish.

repeated .google.cloud.pubsublite.v1.PubSubMessage messages = 1;

Parameter
Name Description
index int
Returns
Type Description
PubSubMessageOrBuilder

getMessagesOrBuilderList()

public List<? extends PubSubMessageOrBuilder> getMessagesOrBuilderList()

The messages to publish.

repeated .google.cloud.pubsublite.v1.PubSubMessage messages = 1;

Returns
Type Description
List<? extends com.google.cloud.pubsublite.proto.PubSubMessageOrBuilder>

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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