Class PullRequest.Builder (1.116.4)

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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public PullRequest build()
Returns
TypeDescription
PullRequest

buildPartial()

public PullRequest buildPartial()
Returns
TypeDescription
PullRequest

clear()

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

clearField(Descriptors.FieldDescriptor field)

public PullRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
PullRequest.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearReturnImmediately()

public PullRequest.Builder clearReturnImmediately()

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
TypeDescription
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
TypeDescription
PullRequest.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public PullRequest getDefaultInstanceForType()
Returns
TypeDescription
PullRequest

getDescriptorForType()

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

The maxMessages.

getReturnImmediately()

public boolean getReturnImmediately()

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
TypeDescription
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
TypeDescription
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
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 PullRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PullRequest.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

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

mergeFrom(PullRequest other)

public PullRequest.Builder mergeFrom(PullRequest other)
Parameter
NameDescription
otherPullRequest
Returns
TypeDescription
PullRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

public PullRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueint

The maxMessages to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
PullRequest.Builder
Overrides

setReturnImmediately(boolean value)

public PullRequest.Builder setReturnImmediately(boolean value)

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
NameDescription
valueboolean

The returnImmediately to set.

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

The subscription to set.

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

The bytes for subscription to set.

Returns
TypeDescription
PullRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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