Class PublishAction.Builder (0.27.0)

public static final class PublishAction.Builder extends GeneratedMessageV3.Builder<PublishAction.Builder> implements PublishActionOrBuilder

Represents the action responsible for publishing messages to a Pub/Sub topic.

Protobuf type google.cloud.contentwarehouse.v1.PublishAction

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addAllMessages(Iterable<String> values)

public PublishAction.Builder addAllMessages(Iterable<String> values)

Messages to be published.

repeated string messages = 2;

Parameter
NameDescription
valuesIterable<String>

The messages to add.

Returns
TypeDescription
PublishAction.Builder

This builder for chaining.

addMessages(String value)

public PublishAction.Builder addMessages(String value)

Messages to be published.

repeated string messages = 2;

Parameter
NameDescription
valueString

The messages to add.

Returns
TypeDescription
PublishAction.Builder

This builder for chaining.

addMessagesBytes(ByteString value)

public PublishAction.Builder addMessagesBytes(ByteString value)

Messages to be published.

repeated string messages = 2;

Parameter
NameDescription
valueByteString

The bytes of the messages to add.

Returns
TypeDescription
PublishAction.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public PublishAction build()
Returns
TypeDescription
PublishAction

buildPartial()

public PublishAction buildPartial()
Returns
TypeDescription
PublishAction

clear()

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

clearField(Descriptors.FieldDescriptor field)

public PublishAction.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
PublishAction.Builder
Overrides

clearMessages()

public PublishAction.Builder clearMessages()

Messages to be published.

repeated string messages = 2;

Returns
TypeDescription
PublishAction.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearTopicId()

public PublishAction.Builder clearTopicId()

The topic id in the Pub/Sub service for which messages will be published to.

string topic_id = 1;

Returns
TypeDescription
PublishAction.Builder

This builder for chaining.

clone()

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

getDefaultInstanceForType()

public PublishAction getDefaultInstanceForType()
Returns
TypeDescription
PublishAction

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMessages(int index)

public String getMessages(int index)

Messages to be published.

repeated string messages = 2;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The messages at the given index.

getMessagesBytes(int index)

public ByteString getMessagesBytes(int index)

Messages to be published.

repeated string messages = 2;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the messages at the given index.

getMessagesCount()

public int getMessagesCount()

Messages to be published.

repeated string messages = 2;

Returns
TypeDescription
int

The count of messages.

getMessagesList()

public ProtocolStringList getMessagesList()

Messages to be published.

repeated string messages = 2;

Returns
TypeDescription
ProtocolStringList

A list containing the messages.

getTopicId()

public String getTopicId()

The topic id in the Pub/Sub service for which messages will be published to.

string topic_id = 1;

Returns
TypeDescription
String

The topicId.

getTopicIdBytes()

public ByteString getTopicIdBytes()

The topic id in the Pub/Sub service for which messages will be published to.

string topic_id = 1;

Returns
TypeDescription
ByteString

The bytes for topicId.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(PublishAction other)

public PublishAction.Builder mergeFrom(PublishAction other)
Parameter
NameDescription
otherPublishAction
Returns
TypeDescription
PublishAction.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public PublishAction.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
PublishAction.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setMessages(int index, String value)

public PublishAction.Builder setMessages(int index, String value)

Messages to be published.

repeated string messages = 2;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The messages to set.

Returns
TypeDescription
PublishAction.Builder

This builder for chaining.

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

public PublishAction.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
PublishAction.Builder
Overrides

setTopicId(String value)

public PublishAction.Builder setTopicId(String value)

The topic id in the Pub/Sub service for which messages will be published to.

string topic_id = 1;

Parameter
NameDescription
valueString

The topicId to set.

Returns
TypeDescription
PublishAction.Builder

This builder for chaining.

setTopicIdBytes(ByteString value)

public PublishAction.Builder setTopicIdBytes(ByteString value)

The topic id in the Pub/Sub service for which messages will be published to.

string topic_id = 1;

Parameter
NameDescription
valueByteString

The bytes for topicId to set.

Returns
TypeDescription
PublishAction.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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