Class AcknowledgeRequest.Builder (1.129.1)

public static final class AcknowledgeRequest.Builder extends GeneratedMessageV3.Builder<AcknowledgeRequest.Builder> implements AcknowledgeRequestOrBuilder

Request for the Acknowledge method.

Protobuf type google.pubsub.v1.AcknowledgeRequest

Static Methods

getDescriptor()

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

Methods

addAckIds(String value)

public AcknowledgeRequest.Builder addAckIds(String value)

Required. The acknowledgment ID for the messages being acknowledged that was returned by the Pub/Sub system in the Pull response. Must not be empty.

repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The ackIds to add.

Returns
Type Description
AcknowledgeRequest.Builder

This builder for chaining.

addAckIdsBytes(ByteString value)

public AcknowledgeRequest.Builder addAckIdsBytes(ByteString value)

Required. The acknowledgment ID for the messages being acknowledged that was returned by the Pub/Sub system in the Pull response. Must not be empty.

repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes of the ackIds to add.

Returns
Type Description
AcknowledgeRequest.Builder

This builder for chaining.

addAllAckIds(Iterable<String> values)

public AcknowledgeRequest.Builder addAllAckIds(Iterable<String> values)

Required. The acknowledgment ID for the messages being acknowledged that was returned by the Pub/Sub system in the Pull response. Must not be empty.

repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
values Iterable<String>

The ackIds to add.

Returns
Type Description
AcknowledgeRequest.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public AcknowledgeRequest build()
Returns
Type Description
AcknowledgeRequest

buildPartial()

public AcknowledgeRequest buildPartial()
Returns
Type Description
AcknowledgeRequest

clear()

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

clearAckIds()

public AcknowledgeRequest.Builder clearAckIds()

Required. The acknowledgment ID for the messages being acknowledged that was returned by the Pub/Sub system in the Pull response. Must not be empty.

repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
AcknowledgeRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSubscription()

public AcknowledgeRequest.Builder clearSubscription()

Required. The subscription whose message is being acknowledged. Format is projects/{project}/subscriptions/{sub}.

string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
AcknowledgeRequest.Builder

This builder for chaining.

clone()

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

getAckIds(int index)

public String getAckIds(int index)

Required. The acknowledgment ID for the messages being acknowledged that was returned by the Pub/Sub system in the Pull response. Must not be empty.

repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The ackIds at the given index.

getAckIdsBytes(int index)

public ByteString getAckIdsBytes(int index)

Required. The acknowledgment ID for the messages being acknowledged that was returned by the Pub/Sub system in the Pull response. Must not be empty.

repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the ackIds at the given index.

getAckIdsCount()

public int getAckIdsCount()

Required. The acknowledgment ID for the messages being acknowledged that was returned by the Pub/Sub system in the Pull response. Must not be empty.

repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The count of ackIds.

getAckIdsList()

public ProtocolStringList getAckIdsList()

Required. The acknowledgment ID for the messages being acknowledged that was returned by the Pub/Sub system in the Pull response. Must not be empty.

repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ProtocolStringList

A list containing the ackIds.

getDefaultInstanceForType()

public AcknowledgeRequest getDefaultInstanceForType()
Returns
Type Description
AcknowledgeRequest

getDescriptorForType()

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

getSubscription()

public String getSubscription()

Required. The subscription whose message is being acknowledged. Format is projects/{project}/subscriptions/{sub}.

string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The subscription.

getSubscriptionBytes()

public ByteString getSubscriptionBytes()

Required. The subscription whose message is being acknowledged. Format is projects/{project}/subscriptions/{sub}.

string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for subscription.

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 AcknowledgeRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AcknowledgeRequest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

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

mergeFrom(AcknowledgeRequest other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setAckIds(int index, String value)

public AcknowledgeRequest.Builder setAckIds(int index, String value)

Required. The acknowledgment ID for the messages being acknowledged that was returned by the Pub/Sub system in the Pull response. Must not be empty.

repeated string ack_ids = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int

The index to set the value at.

value String

The ackIds to set.

Returns
Type Description
AcknowledgeRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setSubscription(String value)

public AcknowledgeRequest.Builder setSubscription(String value)

Required. The subscription whose message is being acknowledged. Format is projects/{project}/subscriptions/{sub}.

string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The subscription to set.

Returns
Type Description
AcknowledgeRequest.Builder

This builder for chaining.

setSubscriptionBytes(ByteString value)

public AcknowledgeRequest.Builder setSubscriptionBytes(ByteString value)

Required. The subscription whose message is being acknowledged. Format is projects/{project}/subscriptions/{sub}.

string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for subscription to set.

Returns
Type Description
AcknowledgeRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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