Class MessagePublishRequest.Builder (1.14.4)

public static final class MessagePublishRequest.Builder extends GeneratedMessageV3.Builder<MessagePublishRequest.Builder> implements MessagePublishRequestOrBuilder

Request to publish messages to the topic.

Protobuf type google.cloud.pubsublite.v1.MessagePublishRequest

Static Methods

getDescriptor()

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

Methods

addAllMessages(Iterable<? extends PubSubMessage> values)

public MessagePublishRequest.Builder addAllMessages(Iterable<? extends PubSubMessage> values)

The messages to publish.

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

Parameter
Name Description
values Iterable<? extends com.google.cloud.pubsublite.proto.PubSubMessage>
Returns
Type Description
MessagePublishRequest.Builder

addMessages(PubSubMessage value)

public MessagePublishRequest.Builder addMessages(PubSubMessage value)

The messages to publish.

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

Parameter
Name Description
value PubSubMessage
Returns
Type Description
MessagePublishRequest.Builder

addMessages(PubSubMessage.Builder builderForValue)

public MessagePublishRequest.Builder addMessages(PubSubMessage.Builder builderForValue)

The messages to publish.

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

Parameter
Name Description
builderForValue PubSubMessage.Builder
Returns
Type Description
MessagePublishRequest.Builder

addMessages(int index, PubSubMessage value)

public MessagePublishRequest.Builder addMessages(int index, PubSubMessage value)

The messages to publish.

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

Parameters
Name Description
index int
value PubSubMessage
Returns
Type Description
MessagePublishRequest.Builder

addMessages(int index, PubSubMessage.Builder builderForValue)

public MessagePublishRequest.Builder addMessages(int index, PubSubMessage.Builder builderForValue)

The messages to publish.

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

Parameters
Name Description
index int
builderForValue PubSubMessage.Builder
Returns
Type Description
MessagePublishRequest.Builder

addMessagesBuilder()

public PubSubMessage.Builder addMessagesBuilder()

The messages to publish.

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

Returns
Type Description
PubSubMessage.Builder

addMessagesBuilder(int index)

public PubSubMessage.Builder addMessagesBuilder(int index)

The messages to publish.

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

Parameter
Name Description
index int
Returns
Type Description
PubSubMessage.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public MessagePublishRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
MessagePublishRequest.Builder
Overrides

build()

public MessagePublishRequest build()
Returns
Type Description
MessagePublishRequest

buildPartial()

public MessagePublishRequest buildPartial()
Returns
Type Description
MessagePublishRequest

clear()

public MessagePublishRequest.Builder clear()
Returns
Type Description
MessagePublishRequest.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public MessagePublishRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
MessagePublishRequest.Builder
Overrides

clearFirstSequenceNumber()

public MessagePublishRequest.Builder clearFirstSequenceNumber()

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
MessagePublishRequest.Builder

This builder for chaining.

clearMessages()

public MessagePublishRequest.Builder clearMessages()

The messages to publish.

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

Returns
Type Description
MessagePublishRequest.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public MessagePublishRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
MessagePublishRequest.Builder
Overrides

clone()

public MessagePublishRequest.Builder clone()
Returns
Type Description
MessagePublishRequest.Builder
Overrides

getDefaultInstanceForType()

public MessagePublishRequest getDefaultInstanceForType()
Returns
Type Description
MessagePublishRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

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

getMessagesBuilder(int index)

public PubSubMessage.Builder getMessagesBuilder(int index)

The messages to publish.

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

Parameter
Name Description
index int
Returns
Type Description
PubSubMessage.Builder

getMessagesBuilderList()

public List<PubSubMessage.Builder> getMessagesBuilderList()

The messages to publish.

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

Returns
Type Description
List<Builder>

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>

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(MessagePublishRequest other)

public MessagePublishRequest.Builder mergeFrom(MessagePublishRequest other)
Parameter
Name Description
other MessagePublishRequest
Returns
Type Description
MessagePublishRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public MessagePublishRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
MessagePublishRequest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public MessagePublishRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
MessagePublishRequest.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final MessagePublishRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
MessagePublishRequest.Builder
Overrides

removeMessages(int index)

public MessagePublishRequest.Builder removeMessages(int index)

The messages to publish.

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

Parameter
Name Description
index int
Returns
Type Description
MessagePublishRequest.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public MessagePublishRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
MessagePublishRequest.Builder
Overrides

setFirstSequenceNumber(long value)

public MessagePublishRequest.Builder setFirstSequenceNumber(long value)

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;

Parameter
Name Description
value long

The firstSequenceNumber to set.

Returns
Type Description
MessagePublishRequest.Builder

This builder for chaining.

setMessages(int index, PubSubMessage value)

public MessagePublishRequest.Builder setMessages(int index, PubSubMessage value)

The messages to publish.

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

Parameters
Name Description
index int
value PubSubMessage
Returns
Type Description
MessagePublishRequest.Builder

setMessages(int index, PubSubMessage.Builder builderForValue)

public MessagePublishRequest.Builder setMessages(int index, PubSubMessage.Builder builderForValue)

The messages to publish.

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

Parameters
Name Description
index int
builderForValue PubSubMessage.Builder
Returns
Type Description
MessagePublishRequest.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public MessagePublishRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
MessagePublishRequest.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final MessagePublishRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
MessagePublishRequest.Builder
Overrides