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
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > ReceivedMessage.BuilderImplements
ReceivedMessageOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public ReceivedMessage.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
ReceivedMessage.Builder |
build()
public ReceivedMessage build()
Type | Description |
ReceivedMessage |
buildPartial()
public ReceivedMessage buildPartial()
Type | Description |
ReceivedMessage |
clear()
public ReceivedMessage.Builder clear()
Type | Description |
ReceivedMessage.Builder |
clearAckId()
public ReceivedMessage.Builder clearAckId()
This ID can be used to acknowledge the received message.
string ack_id = 1;
Type | Description |
ReceivedMessage.Builder | This builder for chaining. |
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;
Type | Description |
ReceivedMessage.Builder | This builder for chaining. |
clearField(Descriptors.FieldDescriptor field)
public ReceivedMessage.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
ReceivedMessage.Builder |
clearMessage()
public ReceivedMessage.Builder clearMessage()
The message.
.google.pubsub.v1.PubsubMessage message = 2;
Type | Description |
ReceivedMessage.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public ReceivedMessage.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
ReceivedMessage.Builder |
clone()
public ReceivedMessage.Builder clone()
Type | Description |
ReceivedMessage.Builder |
getAckId()
public String getAckId()
This ID can be used to acknowledge the received message.
string ack_id = 1;
Type | Description |
String | The ackId. |
getAckIdBytes()
public ByteString getAckIdBytes()
This ID can be used to acknowledge the received message.
string ack_id = 1;
Type | Description |
ByteString | The bytes for ackId. |
getDefaultInstanceForType()
public ReceivedMessage getDefaultInstanceForType()
Type | Description |
ReceivedMessage |
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;
Type | Description |
int | The deliveryAttempt. |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
getMessage()
public PubsubMessage getMessage()
The message.
.google.pubsub.v1.PubsubMessage message = 2;
Type | Description |
PubsubMessage | The message. |
getMessageBuilder()
public PubsubMessage.Builder getMessageBuilder()
The message.
.google.pubsub.v1.PubsubMessage message = 2;
Type | Description |
PubsubMessage.Builder |
getMessageOrBuilder()
public PubsubMessageOrBuilder getMessageOrBuilder()
The message.
.google.pubsub.v1.PubsubMessage message = 2;
Type | Description |
PubsubMessageOrBuilder |
hasMessage()
public boolean hasMessage()
The message.
.google.pubsub.v1.PubsubMessage message = 2;
Type | Description |
boolean | Whether the message field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public ReceivedMessage.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
ReceivedMessage.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public ReceivedMessage.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
ReceivedMessage.Builder |
mergeFrom(ReceivedMessage other)
public ReceivedMessage.Builder mergeFrom(ReceivedMessage other)
Name | Description |
other | ReceivedMessage |
Type | Description |
ReceivedMessage.Builder |
mergeMessage(PubsubMessage value)
public ReceivedMessage.Builder mergeMessage(PubsubMessage value)
The message.
.google.pubsub.v1.PubsubMessage message = 2;
Name | Description |
value | PubsubMessage |
Type | Description |
ReceivedMessage.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final ReceivedMessage.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
ReceivedMessage.Builder |
setAckId(String value)
public ReceivedMessage.Builder setAckId(String value)
This ID can be used to acknowledge the received message.
string ack_id = 1;
Name | Description |
value | String The ackId to set. |
Type | Description |
ReceivedMessage.Builder | This builder for chaining. |
setAckIdBytes(ByteString value)
public ReceivedMessage.Builder setAckIdBytes(ByteString value)
This ID can be used to acknowledge the received message.
string ack_id = 1;
Name | Description |
value | ByteString The bytes for ackId to set. |
Type | Description |
ReceivedMessage.Builder | This builder for chaining. |
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;
Name | Description |
value | int The deliveryAttempt to set. |
Type | Description |
ReceivedMessage.Builder | This builder for chaining. |
setField(Descriptors.FieldDescriptor field, Object value)
public ReceivedMessage.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
ReceivedMessage.Builder |
setMessage(PubsubMessage value)
public ReceivedMessage.Builder setMessage(PubsubMessage value)
The message.
.google.pubsub.v1.PubsubMessage message = 2;
Name | Description |
value | PubsubMessage |
Type | Description |
ReceivedMessage.Builder |
setMessage(PubsubMessage.Builder builderForValue)
public ReceivedMessage.Builder setMessage(PubsubMessage.Builder builderForValue)
The message.
.google.pubsub.v1.PubsubMessage message = 2;
Name | Description |
builderForValue | PubsubMessage.Builder |
Type | Description |
ReceivedMessage.Builder |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public ReceivedMessage.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
ReceivedMessage.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final ReceivedMessage.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
ReceivedMessage.Builder |