Class AcknowledgeRequest.Builder (1.123.18)

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
TypeDescription
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
NameDescription
valueString

The ackIds to add.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes of the ackIds to add.

Returns
TypeDescription
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
NameDescription
valuesIterable<String>

The ackIds to add.

Returns
TypeDescription
AcknowledgeRequest.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public AcknowledgeRequest build()
Returns
TypeDescription
AcknowledgeRequest

buildPartial()

public AcknowledgeRequest buildPartial()
Returns
TypeDescription
AcknowledgeRequest

clear()

public AcknowledgeRequest.Builder clear()
Returns
TypeDescription
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
TypeDescription
AcknowledgeRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

This builder for chaining.

clone()

public AcknowledgeRequest.Builder clone()
Returns
TypeDescription
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
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
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
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ProtocolStringList

A list containing the ackIds.

getDefaultInstanceForType()

public AcknowledgeRequest getDefaultInstanceForType()
Returns
TypeDescription
AcknowledgeRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for subscription.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(AcknowledgeRequest other)

public AcknowledgeRequest.Builder mergeFrom(AcknowledgeRequest other)
Parameter
NameDescription
otherAcknowledgeRequest
Returns
TypeDescription
AcknowledgeRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

The index to set the value at.

valueString

The ackIds to set.

Returns
TypeDescription
AcknowledgeRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

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

public AcknowledgeRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueString

The subscription to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for subscription to set.

Returns
TypeDescription
AcknowledgeRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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