Class PullResponse.Builder (1.127.3)

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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.pubsub.v1.ReceivedMessage>
Returns
TypeDescription
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
NameDescription
valueReceivedMessage
Returns
TypeDescription
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
NameDescription
builderForValueReceivedMessage.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueReceivedMessage
Returns
TypeDescription
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
NameDescription
indexint
builderForValueReceivedMessage.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
ReceivedMessage.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public PullResponse build()
Returns
TypeDescription
PullResponse

buildPartial()

public PullResponse buildPartial()
Returns
TypeDescription
PullResponse

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

public PullResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
PullResponse.Builder

clone()

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

getDefaultInstanceForType()

public PullResponse getDefaultInstanceForType()
Returns
TypeDescription
PullResponse

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
List<? extends com.google.pubsub.v1.ReceivedMessageOrBuilder>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(PullResponse other)

public PullResponse.Builder mergeFrom(PullResponse other)
Parameter
NameDescription
otherPullResponse
Returns
TypeDescription
PullResponse.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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