Class PullRequest.Builder (1.132.2)

public static final class PullRequest.Builder extends GeneratedMessageV3.Builder<PullRequest.Builder> implements PullRequestOrBuilder

Request for the Pull method.

Protobuf type google.pubsub.v1.PullRequest

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public PullRequest build()
Returns
Type Description
PullRequest

buildPartial()

public PullRequest buildPartial()
Returns
Type Description
PullRequest

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearMaxMessages()

public PullRequest.Builder clearMaxMessages()

Required. The maximum number of messages to return for this request. Must be a positive integer. The Pub/Sub system may return fewer than the number specified.

int32 max_messages = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
PullRequest.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearReturnImmediately() (deprecated)

public PullRequest.Builder clearReturnImmediately()

Deprecated. google.pubsub.v1.PullRequest.return_immediately is deprecated. See google/pubsub/v1/pubsub.proto;l=1391

Optional. If this field set to true, the system will respond immediately even if it there are no messages available to return in the Pull response. Otherwise, the system may wait (for a bounded amount of time) until at least one message is available, rather than returning no messages. Warning: setting this field to true is discouraged because it adversely impacts the performance of Pull operations. We recommend that users do not set this field.

bool return_immediately = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
PullRequest.Builder

This builder for chaining.

clearSubscription()

public PullRequest.Builder clearSubscription()

Required. The subscription from which messages should be pulled. Format is projects/{project}/subscriptions/{sub}.

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

Returns
Type Description
PullRequest.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public PullRequest getDefaultInstanceForType()
Returns
Type Description
PullRequest

getDescriptorForType()

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

getMaxMessages()

public int getMaxMessages()

Required. The maximum number of messages to return for this request. Must be a positive integer. The Pub/Sub system may return fewer than the number specified.

int32 max_messages = 3 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The maxMessages.

getReturnImmediately() (deprecated)

public boolean getReturnImmediately()

Deprecated. google.pubsub.v1.PullRequest.return_immediately is deprecated. See google/pubsub/v1/pubsub.proto;l=1391

Optional. If this field set to true, the system will respond immediately even if it there are no messages available to return in the Pull response. Otherwise, the system may wait (for a bounded amount of time) until at least one message is available, rather than returning no messages. Warning: setting this field to true is discouraged because it adversely impacts the performance of Pull operations. We recommend that users do not set this field.

bool return_immediately = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The returnImmediately.

getSubscription()

public String getSubscription()

Required. The subscription from which messages should be pulled. 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 from which messages should be pulled. 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 PullRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PullRequest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

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

mergeFrom(PullRequest other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setMaxMessages(int value)

public PullRequest.Builder setMaxMessages(int value)

Required. The maximum number of messages to return for this request. Must be a positive integer. The Pub/Sub system may return fewer than the number specified.

int32 max_messages = 3 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The maxMessages to set.

Returns
Type Description
PullRequest.Builder

This builder for chaining.

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

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

setReturnImmediately(boolean value) (deprecated)

public PullRequest.Builder setReturnImmediately(boolean value)

Deprecated. google.pubsub.v1.PullRequest.return_immediately is deprecated. See google/pubsub/v1/pubsub.proto;l=1391

Optional. If this field set to true, the system will respond immediately even if it there are no messages available to return in the Pull response. Otherwise, the system may wait (for a bounded amount of time) until at least one message is available, rather than returning no messages. Warning: setting this field to true is discouraged because it adversely impacts the performance of Pull operations. We recommend that users do not set this field.

bool return_immediately = 2 [deprecated = true, (.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The returnImmediately to set.

Returns
Type Description
PullRequest.Builder

This builder for chaining.

setSubscription(String value)

public PullRequest.Builder setSubscription(String value)

Required. The subscription from which messages should be pulled. 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
PullRequest.Builder

This builder for chaining.

setSubscriptionBytes(ByteString value)

public PullRequest.Builder setSubscriptionBytes(ByteString value)

Required. The subscription from which messages should be pulled. 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
PullRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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