public static final class PublishRequest.Builder extends GeneratedMessageV3.Builder<PublishRequest.Builder> implements PublishRequestOrBuilder
Request for the Publish method.
Protobuf type google.pubsub.v1.PublishRequest
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addAllMessages(Iterable<? extends PubsubMessage> values)
public PublishRequest.Builder addAllMessages(Iterable<? extends PubsubMessage> values)
Required. The messages to publish.
repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED];
Parameter
Name | Description |
values | Iterable<? extends com.google.pubsub.v1.PubsubMessage>
|
Returns
addMessages(PubsubMessage value)
public PublishRequest.Builder addMessages(PubsubMessage value)
Required. The messages to publish.
repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED];
Parameter
Returns
addMessages(PubsubMessage.Builder builderForValue)
public PublishRequest.Builder addMessages(PubsubMessage.Builder builderForValue)
Required. The messages to publish.
repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED];
Parameter
Returns
addMessages(int index, PubsubMessage value)
public PublishRequest.Builder addMessages(int index, PubsubMessage value)
Required. The messages to publish.
repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED];
Parameters
Returns
addMessages(int index, PubsubMessage.Builder builderForValue)
public PublishRequest.Builder addMessages(int index, PubsubMessage.Builder builderForValue)
Required. The messages to publish.
repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED];
Parameters
Returns
addMessagesBuilder()
public PubsubMessage.Builder addMessagesBuilder()
Required. The messages to publish.
repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED];
Returns
addMessagesBuilder(int index)
public PubsubMessage.Builder addMessagesBuilder(int index)
Required. The messages to publish.
repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED];
Parameter
Returns
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public PublishRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
public PublishRequest build()
Returns
buildPartial()
public PublishRequest buildPartial()
Returns
clear()
public PublishRequest.Builder clear()
Returns
Overrides
clearField(Descriptors.FieldDescriptor field)
public PublishRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearMessages()
public PublishRequest.Builder clearMessages()
Required. The messages to publish.
repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED];
Returns
clearOneof(Descriptors.OneofDescriptor oneof)
public PublishRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clearTopic()
public PublishRequest.Builder clearTopic()
Required. The messages in the request will be published on this topic.
Format is projects/{project}/topics/{topic}
.
string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Returns
clone()
public PublishRequest.Builder clone()
Returns
Overrides
getDefaultInstanceForType()
public PublishRequest getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
getMessages(int index)
public PubsubMessage getMessages(int index)
Required. The messages to publish.
repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED];
Parameter
Returns
getMessagesBuilder(int index)
public PubsubMessage.Builder getMessagesBuilder(int index)
Required. The messages to publish.
repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED];
Parameter
Returns
getMessagesBuilderList()
public List<PubsubMessage.Builder> getMessagesBuilderList()
Required. The messages to publish.
repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED];
Returns
getMessagesCount()
public int getMessagesCount()
Required. The messages to publish.
repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED];
Returns
getMessagesList()
public List<PubsubMessage> getMessagesList()
Required. The messages to publish.
repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED];
Returns
getMessagesOrBuilder(int index)
public PubsubMessageOrBuilder getMessagesOrBuilder(int index)
Required. The messages to publish.
repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED];
Parameter
Returns
getMessagesOrBuilderList()
public List<? extends PubsubMessageOrBuilder> getMessagesOrBuilderList()
Required. The messages to publish.
repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED];
Returns
Type | Description |
List<? extends com.google.pubsub.v1.PubsubMessageOrBuilder> | |
getTopic()
Required. The messages in the request will be published on this topic.
Format is projects/{project}/topics/{topic}
.
string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Returns
Type | Description |
String | The topic.
|
getTopicBytes()
public ByteString getTopicBytes()
Required. The messages in the request will be published on this topic.
Format is projects/{project}/topics/{topic}
.
string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Returns
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
public PublishRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public PublishRequest.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeFrom(PublishRequest other)
public PublishRequest.Builder mergeFrom(PublishRequest other)
Parameter
Returns
mergeUnknownFields(UnknownFieldSet unknownFields)
public final PublishRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
removeMessages(int index)
public PublishRequest.Builder removeMessages(int index)
Required. The messages to publish.
repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED];
Parameter
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public PublishRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setMessages(int index, PubsubMessage value)
public PublishRequest.Builder setMessages(int index, PubsubMessage value)
Required. The messages to publish.
repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED];
Parameters
Returns
setMessages(int index, PubsubMessage.Builder builderForValue)
public PublishRequest.Builder setMessages(int index, PubsubMessage.Builder builderForValue)
Required. The messages to publish.
repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED];
Parameters
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public PublishRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setTopic(String value)
public PublishRequest.Builder setTopic(String value)
Required. The messages in the request will be published on this topic.
Format is projects/{project}/topics/{topic}
.
string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Parameter
Name | Description |
value | String
The topic to set.
|
Returns
setTopicBytes(ByteString value)
public PublishRequest.Builder setTopicBytes(ByteString value)
Required. The messages in the request will be published on this topic.
Format is projects/{project}/topics/{topic}
.
string topic = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
Parameter
Name | Description |
value | ByteString
The bytes for topic to set.
|
Returns
setUnknownFields(UnknownFieldSet unknownFields)
public final PublishRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides