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
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public PullRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
public PullRequest build()
Returns
buildPartial()
public PullRequest buildPartial()
Returns
clear()
public PullRequest.Builder clear()
Returns
Overrides
clearField(Descriptors.FieldDescriptor field)
public PullRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
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
clearOneof(Descriptors.OneofDescriptor oneof)
public PullRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
public PullRequest.Builder clearReturnImmediately()
Deprecated. google.pubsub.v1.PullRequest.return_immediately is deprecated. See
google/pubsub/v1/pubsub.proto;l=1035
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
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
clone()
public PullRequest.Builder clone()
Returns
Overrides
getDefaultInstanceForType()
public PullRequest getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
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.
|
public boolean getReturnImmediately()
Deprecated. google.pubsub.v1.PullRequest.return_immediately is deprecated. See
google/pubsub/v1/pubsub.proto;l=1035
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
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
public PullRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public PullRequest.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeFrom(PullRequest other)
public PullRequest.Builder mergeFrom(PullRequest other)
Parameter
Returns
mergeUnknownFields(UnknownFieldSet unknownFields)
public final PullRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
setField(Descriptors.FieldDescriptor field, Object value)
public PullRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
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
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public PullRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
public PullRequest.Builder setReturnImmediately(boolean value)
Deprecated. google.pubsub.v1.PullRequest.return_immediately is deprecated. See
google/pubsub/v1/pubsub.proto;l=1035
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
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
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
setUnknownFields(UnknownFieldSet unknownFields)
public final PullRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides