Class MessageResponse.Builder (1.9.4)

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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.pubsublite.proto.SequencedMessage>
Returns
TypeDescription
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
NameDescription
valueSequencedMessage
Returns
TypeDescription
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
NameDescription
builderForValueSequencedMessage.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueSequencedMessage
Returns
TypeDescription
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
NameDescription
indexint
builderForValueSequencedMessage.Builder
Returns
TypeDescription
MessageResponse.Builder

addMessagesBuilder()

public SequencedMessage.Builder addMessagesBuilder()

Messages from the topic partition.

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

Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
SequencedMessage.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public MessageResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
MessageResponse.Builder
Overrides

build()

public MessageResponse build()
Returns
TypeDescription
MessageResponse

buildPartial()

public MessageResponse buildPartial()
Returns
TypeDescription
MessageResponse

clear()

public MessageResponse.Builder clear()
Returns
TypeDescription
MessageResponse.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public MessageResponse.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
MessageResponse.Builder
Overrides

clearMessages()

public MessageResponse.Builder clearMessages()

Messages from the topic partition.

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

Returns
TypeDescription
MessageResponse.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public MessageResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
MessageResponse.Builder
Overrides

clone()

public MessageResponse.Builder clone()
Returns
TypeDescription
MessageResponse.Builder
Overrides

getDefaultInstanceForType()

public MessageResponse getDefaultInstanceForType()
Returns
TypeDescription
MessageResponse

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMessages(int index)

public SequencedMessage getMessages(int index)

Messages from the topic partition.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
SequencedMessage

getMessagesBuilder(int index)

public SequencedMessage.Builder getMessagesBuilder(int index)

Messages from the topic partition.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
SequencedMessage.Builder

getMessagesBuilderList()

public List<SequencedMessage.Builder> getMessagesBuilderList()

Messages from the topic partition.

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

Returns
TypeDescription
List<Builder>

getMessagesCount()

public int getMessagesCount()

Messages from the topic partition.

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

Returns
TypeDescription
int

getMessagesList()

public List<SequencedMessage> getMessagesList()

Messages from the topic partition.

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

Returns
TypeDescription
List<SequencedMessage>

getMessagesOrBuilder(int index)

public SequencedMessageOrBuilder getMessagesOrBuilder(int index)

Messages from the topic partition.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
SequencedMessageOrBuilder

getMessagesOrBuilderList()

public List<? extends SequencedMessageOrBuilder> getMessagesOrBuilderList()

Messages from the topic partition.

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

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

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(MessageResponse other)

public MessageResponse.Builder mergeFrom(MessageResponse other)
Parameter
NameDescription
otherMessageResponse
Returns
TypeDescription
MessageResponse.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public MessageResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
MessageResponse.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public MessageResponse.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
MessageResponse.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final MessageResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
MessageResponse.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public MessageResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
indexint
valueSequencedMessage
Returns
TypeDescription
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
NameDescription
indexint
builderForValueSequencedMessage.Builder
Returns
TypeDescription
MessageResponse.Builder

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

public MessageResponse.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
MessageResponse.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final MessageResponse.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
MessageResponse.Builder
Overrides