public static final class ReceivedMessage.Builder extends GeneratedMessageV3.Builder<ReceivedMessage.Builder> implements ReceivedMessageOrBuilder
A message and its corresponding acknowledgment ID.
Protobuf type google.pubsub.v1.ReceivedMessage
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public ReceivedMessage.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
public ReceivedMessage build()
Returns
buildPartial()
public ReceivedMessage buildPartial()
Returns
clear()
public ReceivedMessage.Builder clear()
Returns
Overrides
clearAckId()
public ReceivedMessage.Builder clearAckId()
This ID can be used to acknowledge the received message.
string ack_id = 1;
Returns
clearDeliveryAttempt()
public ReceivedMessage.Builder clearDeliveryAttempt()
The approximate number of times that Cloud Pub/Sub has attempted to deliver
the associated message to a subscriber.
More precisely, this is 1 + (number of NACKs) +
(number of ack_deadline exceeds) for this message.
A NACK is any call to ModifyAckDeadline with a 0 deadline. An ack_deadline
exceeds event is whenever a message is not acknowledged within
ack_deadline. Note that ack_deadline is initially
Subscription.ackDeadlineSeconds, but may get extended automatically by
the client library.
Upon the first delivery of a given message, delivery_attempt
will have a
value of 1. The value is calculated at best effort and is approximate.
If a DeadLetterPolicy is not set on the subscription, this will be 0.
int32 delivery_attempt = 3;
Returns
clearField(Descriptors.FieldDescriptor field)
public ReceivedMessage.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearMessage()
public ReceivedMessage.Builder clearMessage()
The message.
.google.pubsub.v1.PubsubMessage message = 2;
Returns
clearOneof(Descriptors.OneofDescriptor oneof)
public ReceivedMessage.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clone()
public ReceivedMessage.Builder clone()
Returns
Overrides
getAckId()
This ID can be used to acknowledge the received message.
string ack_id = 1;
Returns
Type | Description |
String | The ackId.
|
getAckIdBytes()
public ByteString getAckIdBytes()
This ID can be used to acknowledge the received message.
string ack_id = 1;
Returns
getDefaultInstanceForType()
public ReceivedMessage getDefaultInstanceForType()
Returns
getDeliveryAttempt()
public int getDeliveryAttempt()
The approximate number of times that Cloud Pub/Sub has attempted to deliver
the associated message to a subscriber.
More precisely, this is 1 + (number of NACKs) +
(number of ack_deadline exceeds) for this message.
A NACK is any call to ModifyAckDeadline with a 0 deadline. An ack_deadline
exceeds event is whenever a message is not acknowledged within
ack_deadline. Note that ack_deadline is initially
Subscription.ackDeadlineSeconds, but may get extended automatically by
the client library.
Upon the first delivery of a given message, delivery_attempt
will have a
value of 1. The value is calculated at best effort and is approximate.
If a DeadLetterPolicy is not set on the subscription, this will be 0.
int32 delivery_attempt = 3;
Returns
Type | Description |
int | The deliveryAttempt.
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
getMessage()
public PubsubMessage getMessage()
The message.
.google.pubsub.v1.PubsubMessage message = 2;
Returns
getMessageBuilder()
public PubsubMessage.Builder getMessageBuilder()
The message.
.google.pubsub.v1.PubsubMessage message = 2;
Returns
getMessageOrBuilder()
public PubsubMessageOrBuilder getMessageOrBuilder()
The message.
.google.pubsub.v1.PubsubMessage message = 2;
Returns
hasMessage()
public boolean hasMessage()
The message.
.google.pubsub.v1.PubsubMessage message = 2;
Returns
Type | Description |
boolean | Whether the message field is set.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
public ReceivedMessage.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public ReceivedMessage.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeFrom(ReceivedMessage other)
public ReceivedMessage.Builder mergeFrom(ReceivedMessage other)
Parameter
Returns
mergeMessage(PubsubMessage value)
public ReceivedMessage.Builder mergeMessage(PubsubMessage value)
The message.
.google.pubsub.v1.PubsubMessage message = 2;
Parameter
Returns
mergeUnknownFields(UnknownFieldSet unknownFields)
public final ReceivedMessage.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
setAckId(String value)
public ReceivedMessage.Builder setAckId(String value)
This ID can be used to acknowledge the received message.
string ack_id = 1;
Parameter
Name | Description |
value | String
The ackId to set.
|
Returns
setAckIdBytes(ByteString value)
public ReceivedMessage.Builder setAckIdBytes(ByteString value)
This ID can be used to acknowledge the received message.
string ack_id = 1;
Parameter
Name | Description |
value | ByteString
The bytes for ackId to set.
|
Returns
setDeliveryAttempt(int value)
public ReceivedMessage.Builder setDeliveryAttempt(int value)
The approximate number of times that Cloud Pub/Sub has attempted to deliver
the associated message to a subscriber.
More precisely, this is 1 + (number of NACKs) +
(number of ack_deadline exceeds) for this message.
A NACK is any call to ModifyAckDeadline with a 0 deadline. An ack_deadline
exceeds event is whenever a message is not acknowledged within
ack_deadline. Note that ack_deadline is initially
Subscription.ackDeadlineSeconds, but may get extended automatically by
the client library.
Upon the first delivery of a given message, delivery_attempt
will have a
value of 1. The value is calculated at best effort and is approximate.
If a DeadLetterPolicy is not set on the subscription, this will be 0.
int32 delivery_attempt = 3;
Parameter
Name | Description |
value | int
The deliveryAttempt to set.
|
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public ReceivedMessage.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setMessage(PubsubMessage value)
public ReceivedMessage.Builder setMessage(PubsubMessage value)
The message.
.google.pubsub.v1.PubsubMessage message = 2;
Parameter
Returns
setMessage(PubsubMessage.Builder builderForValue)
public ReceivedMessage.Builder setMessage(PubsubMessage.Builder builderForValue)
The message.
.google.pubsub.v1.PubsubMessage message = 2;
Parameter
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public ReceivedMessage.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final ReceivedMessage.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides