Class PullResponse.Builder (1.135.0)

public static final class PullResponse.Builder extends GeneratedMessageV3.Builder<PullResponse.Builder> implements PullResponseOrBuilder

Response for the Pull method.

Protobuf type google.pubsub.v1.PullResponse

Static Methods

getDescriptor()

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

Methods

addAllReceivedMessages(Iterable<? extends ReceivedMessage> values)

public PullResponse.Builder addAllReceivedMessages(Iterable<? extends ReceivedMessage> values)

Optional. Received Pub/Sub messages. The list will be empty if there are no more messages available in the backlog, or if no messages could be returned before the request timeout. For JSON, the response can be entirely empty. The Pub/Sub system may return fewer than the maxMessages requested even if there are more messages available in the backlog.

repeated .google.pubsub.v1.ReceivedMessage received_messages = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends com.google.pubsub.v1.ReceivedMessage>
Returns
Type Description
PullResponse.Builder

addReceivedMessages(ReceivedMessage value)

public PullResponse.Builder addReceivedMessages(ReceivedMessage value)

Optional. Received Pub/Sub messages. The list will be empty if there are no more messages available in the backlog, or if no messages could be returned before the request timeout. For JSON, the response can be entirely empty. The Pub/Sub system may return fewer than the maxMessages requested even if there are more messages available in the backlog.

repeated .google.pubsub.v1.ReceivedMessage received_messages = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ReceivedMessage
Returns
Type Description
PullResponse.Builder

addReceivedMessages(ReceivedMessage.Builder builderForValue)

public PullResponse.Builder addReceivedMessages(ReceivedMessage.Builder builderForValue)

Optional. Received Pub/Sub messages. The list will be empty if there are no more messages available in the backlog, or if no messages could be returned before the request timeout. For JSON, the response can be entirely empty. The Pub/Sub system may return fewer than the maxMessages requested even if there are more messages available in the backlog.

repeated .google.pubsub.v1.ReceivedMessage received_messages = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue ReceivedMessage.Builder
Returns
Type Description
PullResponse.Builder

addReceivedMessages(int index, ReceivedMessage value)

public PullResponse.Builder addReceivedMessages(int index, ReceivedMessage value)

Optional. Received Pub/Sub messages. The list will be empty if there are no more messages available in the backlog, or if no messages could be returned before the request timeout. For JSON, the response can be entirely empty. The Pub/Sub system may return fewer than the maxMessages requested even if there are more messages available in the backlog.

repeated .google.pubsub.v1.ReceivedMessage received_messages = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value ReceivedMessage
Returns
Type Description
PullResponse.Builder

addReceivedMessages(int index, ReceivedMessage.Builder builderForValue)

public PullResponse.Builder addReceivedMessages(int index, ReceivedMessage.Builder builderForValue)

Optional. Received Pub/Sub messages. The list will be empty if there are no more messages available in the backlog, or if no messages could be returned before the request timeout. For JSON, the response can be entirely empty. The Pub/Sub system may return fewer than the maxMessages requested even if there are more messages available in the backlog.

repeated .google.pubsub.v1.ReceivedMessage received_messages = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue ReceivedMessage.Builder
Returns
Type Description
PullResponse.Builder

addReceivedMessagesBuilder()

public ReceivedMessage.Builder addReceivedMessagesBuilder()

Optional. Received Pub/Sub messages. The list will be empty if there are no more messages available in the backlog, or if no messages could be returned before the request timeout. For JSON, the response can be entirely empty. The Pub/Sub system may return fewer than the maxMessages requested even if there are more messages available in the backlog.

repeated .google.pubsub.v1.ReceivedMessage received_messages = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ReceivedMessage.Builder

addReceivedMessagesBuilder(int index)

public ReceivedMessage.Builder addReceivedMessagesBuilder(int index)

Optional. Received Pub/Sub messages. The list will be empty if there are no more messages available in the backlog, or if no messages could be returned before the request timeout. For JSON, the response can be entirely empty. The Pub/Sub system may return fewer than the maxMessages requested even if there are more messages available in the backlog.

repeated .google.pubsub.v1.ReceivedMessage received_messages = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
ReceivedMessage.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public PullResponse build()
Returns
Type Description
PullResponse

buildPartial()

public PullResponse buildPartial()
Returns
Type Description
PullResponse

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearReceivedMessages()

public PullResponse.Builder clearReceivedMessages()

Optional. Received Pub/Sub messages. The list will be empty if there are no more messages available in the backlog, or if no messages could be returned before the request timeout. For JSON, the response can be entirely empty. The Pub/Sub system may return fewer than the maxMessages requested even if there are more messages available in the backlog.

repeated .google.pubsub.v1.ReceivedMessage received_messages = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
PullResponse.Builder

clone()

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

getDefaultInstanceForType()

public PullResponse getDefaultInstanceForType()
Returns
Type Description
PullResponse

getDescriptorForType()

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

getReceivedMessages(int index)

public ReceivedMessage getReceivedMessages(int index)

Optional. Received Pub/Sub messages. The list will be empty if there are no more messages available in the backlog, or if no messages could be returned before the request timeout. For JSON, the response can be entirely empty. The Pub/Sub system may return fewer than the maxMessages requested even if there are more messages available in the backlog.

repeated .google.pubsub.v1.ReceivedMessage received_messages = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
ReceivedMessage

getReceivedMessagesBuilder(int index)

public ReceivedMessage.Builder getReceivedMessagesBuilder(int index)

Optional. Received Pub/Sub messages. The list will be empty if there are no more messages available in the backlog, or if no messages could be returned before the request timeout. For JSON, the response can be entirely empty. The Pub/Sub system may return fewer than the maxMessages requested even if there are more messages available in the backlog.

repeated .google.pubsub.v1.ReceivedMessage received_messages = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
ReceivedMessage.Builder

getReceivedMessagesBuilderList()

public List<ReceivedMessage.Builder> getReceivedMessagesBuilderList()

Optional. Received Pub/Sub messages. The list will be empty if there are no more messages available in the backlog, or if no messages could be returned before the request timeout. For JSON, the response can be entirely empty. The Pub/Sub system may return fewer than the maxMessages requested even if there are more messages available in the backlog.

repeated .google.pubsub.v1.ReceivedMessage received_messages = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Builder>

getReceivedMessagesCount()

public int getReceivedMessagesCount()

Optional. Received Pub/Sub messages. The list will be empty if there are no more messages available in the backlog, or if no messages could be returned before the request timeout. For JSON, the response can be entirely empty. The Pub/Sub system may return fewer than the maxMessages requested even if there are more messages available in the backlog.

repeated .google.pubsub.v1.ReceivedMessage received_messages = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getReceivedMessagesList()

public List<ReceivedMessage> getReceivedMessagesList()

Optional. Received Pub/Sub messages. The list will be empty if there are no more messages available in the backlog, or if no messages could be returned before the request timeout. For JSON, the response can be entirely empty. The Pub/Sub system may return fewer than the maxMessages requested even if there are more messages available in the backlog.

repeated .google.pubsub.v1.ReceivedMessage received_messages = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<ReceivedMessage>

getReceivedMessagesOrBuilder(int index)

public ReceivedMessageOrBuilder getReceivedMessagesOrBuilder(int index)

Optional. Received Pub/Sub messages. The list will be empty if there are no more messages available in the backlog, or if no messages could be returned before the request timeout. For JSON, the response can be entirely empty. The Pub/Sub system may return fewer than the maxMessages requested even if there are more messages available in the backlog.

repeated .google.pubsub.v1.ReceivedMessage received_messages = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
ReceivedMessageOrBuilder

getReceivedMessagesOrBuilderList()

public List<? extends ReceivedMessageOrBuilder> getReceivedMessagesOrBuilderList()

Optional. Received Pub/Sub messages. The list will be empty if there are no more messages available in the backlog, or if no messages could be returned before the request timeout. For JSON, the response can be entirely empty. The Pub/Sub system may return fewer than the maxMessages requested even if there are more messages available in the backlog.

repeated .google.pubsub.v1.ReceivedMessage received_messages = 1 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.pubsub.v1.ReceivedMessageOrBuilder>

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(PullResponse other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

removeReceivedMessages(int index)

public PullResponse.Builder removeReceivedMessages(int index)

Optional. Received Pub/Sub messages. The list will be empty if there are no more messages available in the backlog, or if no messages could be returned before the request timeout. For JSON, the response can be entirely empty. The Pub/Sub system may return fewer than the maxMessages requested even if there are more messages available in the backlog.

repeated .google.pubsub.v1.ReceivedMessage received_messages = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
PullResponse.Builder

setField(Descriptors.FieldDescriptor field, Object value)

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

setReceivedMessages(int index, ReceivedMessage value)

public PullResponse.Builder setReceivedMessages(int index, ReceivedMessage value)

Optional. Received Pub/Sub messages. The list will be empty if there are no more messages available in the backlog, or if no messages could be returned before the request timeout. For JSON, the response can be entirely empty. The Pub/Sub system may return fewer than the maxMessages requested even if there are more messages available in the backlog.

repeated .google.pubsub.v1.ReceivedMessage received_messages = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value ReceivedMessage
Returns
Type Description
PullResponse.Builder

setReceivedMessages(int index, ReceivedMessage.Builder builderForValue)

public PullResponse.Builder setReceivedMessages(int index, ReceivedMessage.Builder builderForValue)

Optional. Received Pub/Sub messages. The list will be empty if there are no more messages available in the backlog, or if no messages could be returned before the request timeout. For JSON, the response can be entirely empty. The Pub/Sub system may return fewer than the maxMessages requested even if there are more messages available in the backlog.

repeated .google.pubsub.v1.ReceivedMessage received_messages = 1 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue ReceivedMessage.Builder
Returns
Type Description
PullResponse.Builder

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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