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.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
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()
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>
|
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];
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];
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];
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];
addMessagesBuilder()
public PubsubMessage.Builder addMessagesBuilder()
Required. The messages to publish.
repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED];
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 |
Name |
Description |
index |
int
|
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public PublishRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public PublishRequest build()
buildPartial()
public PublishRequest buildPartial()
clear()
public PublishRequest.Builder clear()
Overrides
clearField(Descriptors.FieldDescriptor field)
public PublishRequest.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearMessages()
public PublishRequest.Builder clearMessages()
Required. The messages to publish.
repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED];
clearOneof(Descriptors.OneofDescriptor oneof)
public PublishRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
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) = { ... }
clone()
public PublishRequest.Builder clone()
Overrides
getDefaultInstanceForType()
public PublishRequest getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
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 |
Name |
Description |
index |
int
|
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 |
Name |
Description |
index |
int
|
getMessagesBuilderList()
public List<PubsubMessage.Builder> getMessagesBuilderList()
Required. The messages to publish.
repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED];
getMessagesCount()
public int getMessagesCount()
Required. The messages to publish.
repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED];
Returns |
Type |
Description |
int |
|
getMessagesList()
public List<PubsubMessage> getMessagesList()
Required. The messages to publish.
repeated .google.pubsub.v1.PubsubMessage messages = 2 [(.google.api.field_behavior) = REQUIRED];
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 |
Name |
Description |
index |
int
|
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 |
Type |
Description |
ByteString |
The bytes for topic.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
public PublishRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public PublishRequest.Builder mergeFrom(Message other)
Parameter |
Name |
Description |
other |
Message
|
Overrides
mergeFrom(PublishRequest other)
public PublishRequest.Builder mergeFrom(PublishRequest other)
mergeUnknownFields(UnknownFieldSet unknownFields)
public final PublishRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
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 |
Name |
Description |
index |
int
|
setField(Descriptors.FieldDescriptor field, Object value)
public PublishRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
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];
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];
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public PublishRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
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.
|
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.
|
setUnknownFields(UnknownFieldSet unknownFields)
public final PublishRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides