Class StreamingPullRequest.Builder (1.123.18)

public static final class StreamingPullRequest.Builder extends GeneratedMessageV3.Builder<StreamingPullRequest.Builder> implements StreamingPullRequestOrBuilder

Request for the StreamingPull streaming RPC method. This request is used to establish the initial stream as well as to stream acknowledgements and ack deadline modifications from the client to the server.

Protobuf type google.pubsub.v1.StreamingPullRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAckIds(String value)

public StreamingPullRequest.Builder addAckIds(String value)

List of acknowledgement IDs for acknowledging previously received messages (received on this stream or a different stream). If an ack ID has expired, the corresponding message may be redelivered later. Acknowledging a message more than once will not result in an error. If the acknowledgement ID is malformed, the stream will be aborted with status INVALID_ARGUMENT.

repeated string ack_ids = 2;

Parameter
NameDescription
valueString

The ackIds to add.

Returns
TypeDescription
StreamingPullRequest.Builder

This builder for chaining.

addAckIdsBytes(ByteString value)

public StreamingPullRequest.Builder addAckIdsBytes(ByteString value)

List of acknowledgement IDs for acknowledging previously received messages (received on this stream or a different stream). If an ack ID has expired, the corresponding message may be redelivered later. Acknowledging a message more than once will not result in an error. If the acknowledgement ID is malformed, the stream will be aborted with status INVALID_ARGUMENT.

repeated string ack_ids = 2;

Parameter
NameDescription
valueByteString

The bytes of the ackIds to add.

Returns
TypeDescription
StreamingPullRequest.Builder

This builder for chaining.

addAllAckIds(Iterable<String> values)

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

List of acknowledgement IDs for acknowledging previously received messages (received on this stream or a different stream). If an ack ID has expired, the corresponding message may be redelivered later. Acknowledging a message more than once will not result in an error. If the acknowledgement ID is malformed, the stream will be aborted with status INVALID_ARGUMENT.

repeated string ack_ids = 2;

Parameter
NameDescription
valuesIterable<String>

The ackIds to add.

Returns
TypeDescription
StreamingPullRequest.Builder

This builder for chaining.

addAllModifyDeadlineAckIds(Iterable<String> values)

public StreamingPullRequest.Builder addAllModifyDeadlineAckIds(Iterable<String> values)

List of acknowledgement IDs whose deadline will be modified based on the corresponding element in modify_deadline_seconds. This field can be used to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted.

repeated string modify_deadline_ack_ids = 4;

Parameter
NameDescription
valuesIterable<String>

The modifyDeadlineAckIds to add.

Returns
TypeDescription
StreamingPullRequest.Builder

This builder for chaining.

addAllModifyDeadlineSeconds(Iterable<? extends Integer> values)

public StreamingPullRequest.Builder addAllModifyDeadlineSeconds(Iterable<? extends Integer> values)

The list of new ack deadlines for the IDs listed in modify_deadline_ack_ids. The size of this list must be the same as the size of modify_deadline_ack_ids. If it differs the stream will be aborted with INVALID_ARGUMENT. Each element in this list is applied to the element in the same position in modify_deadline_ack_ids. The new ack deadline is with respect to the time this request was sent to the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack deadline will expire 10 seconds after this request is received. If the value is 0, the message is immediately made available for another streaming or non-streaming pull request. If the value is < 0 (an error), the stream will be aborted with status INVALID_ARGUMENT.

repeated int32 modify_deadline_seconds = 3;

Parameter
NameDescription
valuesIterable<? extends java.lang.Integer>

The modifyDeadlineSeconds to add.

Returns
TypeDescription
StreamingPullRequest.Builder

This builder for chaining.

addModifyDeadlineAckIds(String value)

public StreamingPullRequest.Builder addModifyDeadlineAckIds(String value)

List of acknowledgement IDs whose deadline will be modified based on the corresponding element in modify_deadline_seconds. This field can be used to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted.

repeated string modify_deadline_ack_ids = 4;

Parameter
NameDescription
valueString

The modifyDeadlineAckIds to add.

Returns
TypeDescription
StreamingPullRequest.Builder

This builder for chaining.

addModifyDeadlineAckIdsBytes(ByteString value)

public StreamingPullRequest.Builder addModifyDeadlineAckIdsBytes(ByteString value)

List of acknowledgement IDs whose deadline will be modified based on the corresponding element in modify_deadline_seconds. This field can be used to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted.

repeated string modify_deadline_ack_ids = 4;

Parameter
NameDescription
valueByteString

The bytes of the modifyDeadlineAckIds to add.

Returns
TypeDescription
StreamingPullRequest.Builder

This builder for chaining.

addModifyDeadlineSeconds(int value)

public StreamingPullRequest.Builder addModifyDeadlineSeconds(int value)

The list of new ack deadlines for the IDs listed in modify_deadline_ack_ids. The size of this list must be the same as the size of modify_deadline_ack_ids. If it differs the stream will be aborted with INVALID_ARGUMENT. Each element in this list is applied to the element in the same position in modify_deadline_ack_ids. The new ack deadline is with respect to the time this request was sent to the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack deadline will expire 10 seconds after this request is received. If the value is 0, the message is immediately made available for another streaming or non-streaming pull request. If the value is < 0 (an error), the stream will be aborted with status INVALID_ARGUMENT.

repeated int32 modify_deadline_seconds = 3;

Parameter
NameDescription
valueint

The modifyDeadlineSeconds to add.

Returns
TypeDescription
StreamingPullRequest.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public StreamingPullRequest build()
Returns
TypeDescription
StreamingPullRequest

buildPartial()

public StreamingPullRequest buildPartial()
Returns
TypeDescription
StreamingPullRequest

clear()

public StreamingPullRequest.Builder clear()
Returns
TypeDescription
StreamingPullRequest.Builder
Overrides

clearAckIds()

public StreamingPullRequest.Builder clearAckIds()

List of acknowledgement IDs for acknowledging previously received messages (received on this stream or a different stream). If an ack ID has expired, the corresponding message may be redelivered later. Acknowledging a message more than once will not result in an error. If the acknowledgement ID is malformed, the stream will be aborted with status INVALID_ARGUMENT.

repeated string ack_ids = 2;

Returns
TypeDescription
StreamingPullRequest.Builder

This builder for chaining.

clearClientId()

public StreamingPullRequest.Builder clearClientId()

A unique identifier that is used to distinguish client instances from each other. Only needs to be provided on the initial request. When a stream disconnects and reconnects for the same stream, the client_id should be set to the same value so that state associated with the old stream can be transferred to the new stream. The same client_id should not be used for different client instances.

string client_id = 6;

Returns
TypeDescription
StreamingPullRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearMaxOutstandingBytes()

public StreamingPullRequest.Builder clearMaxOutstandingBytes()

Flow control settings for the maximum number of outstanding bytes. When there are max_outstanding_bytes or more worth of messages currently sent to the streaming pull client that have not yet been acked or nacked, the server will stop sending more messages. The sending of messages resumes once the number of outstanding bytes is less than this value. If the value is <= 0, there is no limit to the number of outstanding bytes. This property can only be set on the initial StreamingPullRequest. If it is set on a subsequent request, the stream will be aborted with status INVALID_ARGUMENT.

int64 max_outstanding_bytes = 8;

Returns
TypeDescription
StreamingPullRequest.Builder

This builder for chaining.

clearMaxOutstandingMessages()

public StreamingPullRequest.Builder clearMaxOutstandingMessages()

Flow control settings for the maximum number of outstanding messages. When there are max_outstanding_messages or more currently sent to the streaming pull client that have not yet been acked or nacked, the server stops sending more messages. The sending of messages resumes once the number of outstanding messages is less than this value. If the value is <= 0, there is no limit to the number of outstanding messages. This property can only be set on the initial StreamingPullRequest. If it is set on a subsequent request, the stream will be aborted with status INVALID_ARGUMENT.

int64 max_outstanding_messages = 7;

Returns
TypeDescription
StreamingPullRequest.Builder

This builder for chaining.

clearModifyDeadlineAckIds()

public StreamingPullRequest.Builder clearModifyDeadlineAckIds()

List of acknowledgement IDs whose deadline will be modified based on the corresponding element in modify_deadline_seconds. This field can be used to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted.

repeated string modify_deadline_ack_ids = 4;

Returns
TypeDescription
StreamingPullRequest.Builder

This builder for chaining.

clearModifyDeadlineSeconds()

public StreamingPullRequest.Builder clearModifyDeadlineSeconds()

The list of new ack deadlines for the IDs listed in modify_deadline_ack_ids. The size of this list must be the same as the size of modify_deadline_ack_ids. If it differs the stream will be aborted with INVALID_ARGUMENT. Each element in this list is applied to the element in the same position in modify_deadline_ack_ids. The new ack deadline is with respect to the time this request was sent to the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack deadline will expire 10 seconds after this request is received. If the value is 0, the message is immediately made available for another streaming or non-streaming pull request. If the value is < 0 (an error), the stream will be aborted with status INVALID_ARGUMENT.

repeated int32 modify_deadline_seconds = 3;

Returns
TypeDescription
StreamingPullRequest.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public StreamingPullRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
StreamingPullRequest.Builder
Overrides

clearStreamAckDeadlineSeconds()

public StreamingPullRequest.Builder clearStreamAckDeadlineSeconds()

Required. The ack deadline to use for the stream. This must be provided in the first request on the stream, but it can also be updated on subsequent requests from client to server. The minimum deadline you can specify is 10 seconds. The maximum deadline you can specify is 600 seconds (10 minutes).

int32 stream_ack_deadline_seconds = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
StreamingPullRequest.Builder

This builder for chaining.

clearSubscription()

public StreamingPullRequest.Builder clearSubscription()

Required. The subscription for which to initialize the new stream. This must be provided in the first request on the stream, and must not be set in subsequent requests from client to server. Format is projects/{project}/subscriptions/{sub}.

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

Returns
TypeDescription
StreamingPullRequest.Builder

This builder for chaining.

clone()

public StreamingPullRequest.Builder clone()
Returns
TypeDescription
StreamingPullRequest.Builder
Overrides

getAckIds(int index)

public String getAckIds(int index)

List of acknowledgement IDs for acknowledging previously received messages (received on this stream or a different stream). If an ack ID has expired, the corresponding message may be redelivered later. Acknowledging a message more than once will not result in an error. If the acknowledgement ID is malformed, the stream will be aborted with status INVALID_ARGUMENT.

repeated string ack_ids = 2;

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)

List of acknowledgement IDs for acknowledging previously received messages (received on this stream or a different stream). If an ack ID has expired, the corresponding message may be redelivered later. Acknowledging a message more than once will not result in an error. If the acknowledgement ID is malformed, the stream will be aborted with status INVALID_ARGUMENT.

repeated string ack_ids = 2;

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()

List of acknowledgement IDs for acknowledging previously received messages (received on this stream or a different stream). If an ack ID has expired, the corresponding message may be redelivered later. Acknowledging a message more than once will not result in an error. If the acknowledgement ID is malformed, the stream will be aborted with status INVALID_ARGUMENT.

repeated string ack_ids = 2;

Returns
TypeDescription
int

The count of ackIds.

getAckIdsList()

public ProtocolStringList getAckIdsList()

List of acknowledgement IDs for acknowledging previously received messages (received on this stream or a different stream). If an ack ID has expired, the corresponding message may be redelivered later. Acknowledging a message more than once will not result in an error. If the acknowledgement ID is malformed, the stream will be aborted with status INVALID_ARGUMENT.

repeated string ack_ids = 2;

Returns
TypeDescription
ProtocolStringList

A list containing the ackIds.

getClientId()

public String getClientId()

A unique identifier that is used to distinguish client instances from each other. Only needs to be provided on the initial request. When a stream disconnects and reconnects for the same stream, the client_id should be set to the same value so that state associated with the old stream can be transferred to the new stream. The same client_id should not be used for different client instances.

string client_id = 6;

Returns
TypeDescription
String

The clientId.

getClientIdBytes()

public ByteString getClientIdBytes()

A unique identifier that is used to distinguish client instances from each other. Only needs to be provided on the initial request. When a stream disconnects and reconnects for the same stream, the client_id should be set to the same value so that state associated with the old stream can be transferred to the new stream. The same client_id should not be used for different client instances.

string client_id = 6;

Returns
TypeDescription
ByteString

The bytes for clientId.

getDefaultInstanceForType()

public StreamingPullRequest getDefaultInstanceForType()
Returns
TypeDescription
StreamingPullRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMaxOutstandingBytes()

public long getMaxOutstandingBytes()

Flow control settings for the maximum number of outstanding bytes. When there are max_outstanding_bytes or more worth of messages currently sent to the streaming pull client that have not yet been acked or nacked, the server will stop sending more messages. The sending of messages resumes once the number of outstanding bytes is less than this value. If the value is <= 0, there is no limit to the number of outstanding bytes. This property can only be set on the initial StreamingPullRequest. If it is set on a subsequent request, the stream will be aborted with status INVALID_ARGUMENT.

int64 max_outstanding_bytes = 8;

Returns
TypeDescription
long

The maxOutstandingBytes.

getMaxOutstandingMessages()

public long getMaxOutstandingMessages()

Flow control settings for the maximum number of outstanding messages. When there are max_outstanding_messages or more currently sent to the streaming pull client that have not yet been acked or nacked, the server stops sending more messages. The sending of messages resumes once the number of outstanding messages is less than this value. If the value is <= 0, there is no limit to the number of outstanding messages. This property can only be set on the initial StreamingPullRequest. If it is set on a subsequent request, the stream will be aborted with status INVALID_ARGUMENT.

int64 max_outstanding_messages = 7;

Returns
TypeDescription
long

The maxOutstandingMessages.

getModifyDeadlineAckIds(int index)

public String getModifyDeadlineAckIds(int index)

List of acknowledgement IDs whose deadline will be modified based on the corresponding element in modify_deadline_seconds. This field can be used to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted.

repeated string modify_deadline_ack_ids = 4;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The modifyDeadlineAckIds at the given index.

getModifyDeadlineAckIdsBytes(int index)

public ByteString getModifyDeadlineAckIdsBytes(int index)

List of acknowledgement IDs whose deadline will be modified based on the corresponding element in modify_deadline_seconds. This field can be used to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted.

repeated string modify_deadline_ack_ids = 4;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the modifyDeadlineAckIds at the given index.

getModifyDeadlineAckIdsCount()

public int getModifyDeadlineAckIdsCount()

List of acknowledgement IDs whose deadline will be modified based on the corresponding element in modify_deadline_seconds. This field can be used to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted.

repeated string modify_deadline_ack_ids = 4;

Returns
TypeDescription
int

The count of modifyDeadlineAckIds.

getModifyDeadlineAckIdsList()

public ProtocolStringList getModifyDeadlineAckIdsList()

List of acknowledgement IDs whose deadline will be modified based on the corresponding element in modify_deadline_seconds. This field can be used to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted.

repeated string modify_deadline_ack_ids = 4;

Returns
TypeDescription
ProtocolStringList

A list containing the modifyDeadlineAckIds.

getModifyDeadlineSeconds(int index)

public int getModifyDeadlineSeconds(int index)

The list of new ack deadlines for the IDs listed in modify_deadline_ack_ids. The size of this list must be the same as the size of modify_deadline_ack_ids. If it differs the stream will be aborted with INVALID_ARGUMENT. Each element in this list is applied to the element in the same position in modify_deadline_ack_ids. The new ack deadline is with respect to the time this request was sent to the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack deadline will expire 10 seconds after this request is received. If the value is 0, the message is immediately made available for another streaming or non-streaming pull request. If the value is < 0 (an error), the stream will be aborted with status INVALID_ARGUMENT.

repeated int32 modify_deadline_seconds = 3;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
int

The modifyDeadlineSeconds at the given index.

getModifyDeadlineSecondsCount()

public int getModifyDeadlineSecondsCount()

The list of new ack deadlines for the IDs listed in modify_deadline_ack_ids. The size of this list must be the same as the size of modify_deadline_ack_ids. If it differs the stream will be aborted with INVALID_ARGUMENT. Each element in this list is applied to the element in the same position in modify_deadline_ack_ids. The new ack deadline is with respect to the time this request was sent to the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack deadline will expire 10 seconds after this request is received. If the value is 0, the message is immediately made available for another streaming or non-streaming pull request. If the value is < 0 (an error), the stream will be aborted with status INVALID_ARGUMENT.

repeated int32 modify_deadline_seconds = 3;

Returns
TypeDescription
int

The count of modifyDeadlineSeconds.

getModifyDeadlineSecondsList()

public List<Integer> getModifyDeadlineSecondsList()

The list of new ack deadlines for the IDs listed in modify_deadline_ack_ids. The size of this list must be the same as the size of modify_deadline_ack_ids. If it differs the stream will be aborted with INVALID_ARGUMENT. Each element in this list is applied to the element in the same position in modify_deadline_ack_ids. The new ack deadline is with respect to the time this request was sent to the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack deadline will expire 10 seconds after this request is received. If the value is 0, the message is immediately made available for another streaming or non-streaming pull request. If the value is < 0 (an error), the stream will be aborted with status INVALID_ARGUMENT.

repeated int32 modify_deadline_seconds = 3;

Returns
TypeDescription
List<Integer>

A list containing the modifyDeadlineSeconds.

getStreamAckDeadlineSeconds()

public int getStreamAckDeadlineSeconds()

Required. The ack deadline to use for the stream. This must be provided in the first request on the stream, but it can also be updated on subsequent requests from client to server. The minimum deadline you can specify is 10 seconds. The maximum deadline you can specify is 600 seconds (10 minutes).

int32 stream_ack_deadline_seconds = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
int

The streamAckDeadlineSeconds.

getSubscription()

public String getSubscription()

Required. The subscription for which to initialize the new stream. This must be provided in the first request on the stream, and must not be set in subsequent requests from client to server. 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 for which to initialize the new stream. This must be provided in the first request on the stream, and must not be set in subsequent requests from client to server. 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 StreamingPullRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StreamingPullRequest.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

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

mergeFrom(StreamingPullRequest other)

public StreamingPullRequest.Builder mergeFrom(StreamingPullRequest other)
Parameter
NameDescription
otherStreamingPullRequest
Returns
TypeDescription
StreamingPullRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final StreamingPullRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
StreamingPullRequest.Builder
Overrides

setAckIds(int index, String value)

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

List of acknowledgement IDs for acknowledging previously received messages (received on this stream or a different stream). If an ack ID has expired, the corresponding message may be redelivered later. Acknowledging a message more than once will not result in an error. If the acknowledgement ID is malformed, the stream will be aborted with status INVALID_ARGUMENT.

repeated string ack_ids = 2;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The ackIds to set.

Returns
TypeDescription
StreamingPullRequest.Builder

This builder for chaining.

setClientId(String value)

public StreamingPullRequest.Builder setClientId(String value)

A unique identifier that is used to distinguish client instances from each other. Only needs to be provided on the initial request. When a stream disconnects and reconnects for the same stream, the client_id should be set to the same value so that state associated with the old stream can be transferred to the new stream. The same client_id should not be used for different client instances.

string client_id = 6;

Parameter
NameDescription
valueString

The clientId to set.

Returns
TypeDescription
StreamingPullRequest.Builder

This builder for chaining.

setClientIdBytes(ByteString value)

public StreamingPullRequest.Builder setClientIdBytes(ByteString value)

A unique identifier that is used to distinguish client instances from each other. Only needs to be provided on the initial request. When a stream disconnects and reconnects for the same stream, the client_id should be set to the same value so that state associated with the old stream can be transferred to the new stream. The same client_id should not be used for different client instances.

string client_id = 6;

Parameter
NameDescription
valueByteString

The bytes for clientId to set.

Returns
TypeDescription
StreamingPullRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setMaxOutstandingBytes(long value)

public StreamingPullRequest.Builder setMaxOutstandingBytes(long value)

Flow control settings for the maximum number of outstanding bytes. When there are max_outstanding_bytes or more worth of messages currently sent to the streaming pull client that have not yet been acked or nacked, the server will stop sending more messages. The sending of messages resumes once the number of outstanding bytes is less than this value. If the value is <= 0, there is no limit to the number of outstanding bytes. This property can only be set on the initial StreamingPullRequest. If it is set on a subsequent request, the stream will be aborted with status INVALID_ARGUMENT.

int64 max_outstanding_bytes = 8;

Parameter
NameDescription
valuelong

The maxOutstandingBytes to set.

Returns
TypeDescription
StreamingPullRequest.Builder

This builder for chaining.

setMaxOutstandingMessages(long value)

public StreamingPullRequest.Builder setMaxOutstandingMessages(long value)

Flow control settings for the maximum number of outstanding messages. When there are max_outstanding_messages or more currently sent to the streaming pull client that have not yet been acked or nacked, the server stops sending more messages. The sending of messages resumes once the number of outstanding messages is less than this value. If the value is <= 0, there is no limit to the number of outstanding messages. This property can only be set on the initial StreamingPullRequest. If it is set on a subsequent request, the stream will be aborted with status INVALID_ARGUMENT.

int64 max_outstanding_messages = 7;

Parameter
NameDescription
valuelong

The maxOutstandingMessages to set.

Returns
TypeDescription
StreamingPullRequest.Builder

This builder for chaining.

setModifyDeadlineAckIds(int index, String value)

public StreamingPullRequest.Builder setModifyDeadlineAckIds(int index, String value)

List of acknowledgement IDs whose deadline will be modified based on the corresponding element in modify_deadline_seconds. This field can be used to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted.

repeated string modify_deadline_ack_ids = 4;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The modifyDeadlineAckIds to set.

Returns
TypeDescription
StreamingPullRequest.Builder

This builder for chaining.

setModifyDeadlineSeconds(int index, int value)

public StreamingPullRequest.Builder setModifyDeadlineSeconds(int index, int value)

The list of new ack deadlines for the IDs listed in modify_deadline_ack_ids. The size of this list must be the same as the size of modify_deadline_ack_ids. If it differs the stream will be aborted with INVALID_ARGUMENT. Each element in this list is applied to the element in the same position in modify_deadline_ack_ids. The new ack deadline is with respect to the time this request was sent to the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack deadline will expire 10 seconds after this request is received. If the value is 0, the message is immediately made available for another streaming or non-streaming pull request. If the value is < 0 (an error), the stream will be aborted with status INVALID_ARGUMENT.

repeated int32 modify_deadline_seconds = 3;

Parameters
NameDescription
indexint

The index to set the value at.

valueint

The modifyDeadlineSeconds to set.

Returns
TypeDescription
StreamingPullRequest.Builder

This builder for chaining.

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

public StreamingPullRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
StreamingPullRequest.Builder
Overrides

setStreamAckDeadlineSeconds(int value)

public StreamingPullRequest.Builder setStreamAckDeadlineSeconds(int value)

Required. The ack deadline to use for the stream. This must be provided in the first request on the stream, but it can also be updated on subsequent requests from client to server. The minimum deadline you can specify is 10 seconds. The maximum deadline you can specify is 600 seconds (10 minutes).

int32 stream_ack_deadline_seconds = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueint

The streamAckDeadlineSeconds to set.

Returns
TypeDescription
StreamingPullRequest.Builder

This builder for chaining.

setSubscription(String value)

public StreamingPullRequest.Builder setSubscription(String value)

Required. The subscription for which to initialize the new stream. This must be provided in the first request on the stream, and must not be set in subsequent requests from client to server. 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
StreamingPullRequest.Builder

This builder for chaining.

setSubscriptionBytes(ByteString value)

public StreamingPullRequest.Builder setSubscriptionBytes(ByteString value)

Required. The subscription for which to initialize the new stream. This must be provided in the first request on the stream, and must not be set in subsequent requests from client to server. 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
StreamingPullRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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