Class MessageResponse.Builder (1.13.6)

public static final class MessageResponse.Builder extends GeneratedMessageV3.Builder<MessageResponse.Builder> implements MessageResponseOrBuilder

Response containing a list of messages. Upon delivering a MessageResponse to the client, the server:

  • Updates the stream's delivery cursor to one greater than the cursor of the last message in the list.
  • Subtracts the total number of bytes and messages from the tokens available to the server.

Protobuf type google.cloud.pubsublite.v1.MessageResponse

Static Methods

getDescriptor()

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

Methods

addAllMessages(Iterable<? extends SequencedMessage> values)

public MessageResponse.Builder addAllMessages(Iterable<? extends SequencedMessage> values)

Messages from the topic partition.

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

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

addMessages(SequencedMessage value)

public MessageResponse.Builder addMessages(SequencedMessage value)

Messages from the topic partition.

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

Parameter
Name Description
value SequencedMessage
Returns
Type Description
MessageResponse.Builder

addMessages(SequencedMessage.Builder builderForValue)

public MessageResponse.Builder addMessages(SequencedMessage.Builder builderForValue)

Messages from the topic partition.

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

Parameter
Name Description
builderForValue SequencedMessage.Builder
Returns
Type Description
MessageResponse.Builder

addMessages(int index, SequencedMessage value)

public MessageResponse.Builder addMessages(int index, SequencedMessage value)

Messages from the topic partition.

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

Parameters
Name Description
index int
value SequencedMessage
Returns
Type Description
MessageResponse.Builder

addMessages(int index, SequencedMessage.Builder builderForValue)

public MessageResponse.Builder addMessages(int index, SequencedMessage.Builder builderForValue)

Messages from the topic partition.

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

Parameters
Name Description
index int
builderForValue SequencedMessage.Builder
Returns
Type Description
MessageResponse.Builder

addMessagesBuilder()

public SequencedMessage.Builder addMessagesBuilder()

Messages from the topic partition.

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

Returns
Type Description
SequencedMessage.Builder

addMessagesBuilder(int index)

public SequencedMessage.Builder addMessagesBuilder(int index)

Messages from the topic partition.

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

Parameter
Name Description
index int
Returns
Type Description
SequencedMessage.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public MessageResponse build()
Returns
Type Description
MessageResponse

buildPartial()

public MessageResponse buildPartial()
Returns
Type Description
MessageResponse

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearMessages()

public MessageResponse.Builder clearMessages()

Messages from the topic partition.

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

Returns
Type Description
MessageResponse.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getDefaultInstanceForType()

public MessageResponse getDefaultInstanceForType()
Returns
Type Description
MessageResponse

getDescriptorForType()

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

getMessages(int index)

public SequencedMessage getMessages(int index)

Messages from the topic partition.

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

Parameter
Name Description
index int
Returns
Type Description
SequencedMessage

getMessagesBuilder(int index)

public SequencedMessage.Builder getMessagesBuilder(int index)

Messages from the topic partition.

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

Parameter
Name Description
index int
Returns
Type Description
SequencedMessage.Builder

getMessagesBuilderList()

public List<SequencedMessage.Builder> getMessagesBuilderList()

Messages from the topic partition.

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

Returns
Type Description
List<Builder>

getMessagesCount()

public int getMessagesCount()

Messages from the topic partition.

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

Returns
Type Description
int

getMessagesList()

public List<SequencedMessage> getMessagesList()

Messages from the topic partition.

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

Returns
Type Description
List<SequencedMessage>

getMessagesOrBuilder(int index)

public SequencedMessageOrBuilder getMessagesOrBuilder(int index)

Messages from the topic partition.

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

Parameter
Name Description
index int
Returns
Type Description
SequencedMessageOrBuilder

getMessagesOrBuilderList()

public List<? extends SequencedMessageOrBuilder> getMessagesOrBuilderList()

Messages from the topic partition.

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

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

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(MessageResponse other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeMessages(int index)

public MessageResponse.Builder removeMessages(int index)

Messages from the topic partition.

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

Parameter
Name Description
index int
Returns
Type Description
MessageResponse.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setMessages(int index, SequencedMessage value)

public MessageResponse.Builder setMessages(int index, SequencedMessage value)

Messages from the topic partition.

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

Parameters
Name Description
index int
value SequencedMessage
Returns
Type Description
MessageResponse.Builder

setMessages(int index, SequencedMessage.Builder builderForValue)

public MessageResponse.Builder setMessages(int index, SequencedMessage.Builder builderForValue)

Messages from the topic partition.

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

Parameters
Name Description
index int
builderForValue SequencedMessage.Builder
Returns
Type Description
MessageResponse.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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