Class AcknowledgeRequest.Builder (1.147.0)

public static final class AcknowledgeRequest.Builder extends GeneratedMessage.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.

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.

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.

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 GeneratedMessage.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

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.

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.