Class PublishAction.Builder (0.45.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
Type Description
Descriptor

Methods

addAllMessages(Iterable<String> values)

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

Messages to be published.

repeated string messages = 2;

Parameter
Name Description
values Iterable<String>

The messages to add.

Returns
Type Description
PublishAction.Builder

This builder for chaining.

addMessages(String value)

public PublishAction.Builder addMessages(String value)

Messages to be published.

repeated string messages = 2;

Parameter
Name Description
value String

The messages to add.

Returns
Type Description
PublishAction.Builder

This builder for chaining.

addMessagesBytes(ByteString value)

public PublishAction.Builder addMessagesBytes(ByteString value)

Messages to be published.

repeated string messages = 2;

Parameter
Name Description
value ByteString

The bytes of the messages to add.

Returns
Type Description
PublishAction.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public PublishAction.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
PublishAction.Builder
Overrides

build()

public PublishAction build()
Returns
Type Description
PublishAction

buildPartial()

public PublishAction buildPartial()
Returns
Type Description
PublishAction

clear()

public PublishAction.Builder clear()
Returns
Type Description
PublishAction.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public PublishAction.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
PublishAction.Builder
Overrides

clearMessages()

public PublishAction.Builder clearMessages()

Messages to be published.

repeated string messages = 2;

Returns
Type Description
PublishAction.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public PublishAction.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
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
Type Description
PublishAction.Builder

This builder for chaining.

clone()

public PublishAction.Builder clone()
Returns
Type Description
PublishAction.Builder
Overrides

getDefaultInstanceForType()

public PublishAction getDefaultInstanceForType()
Returns
Type Description
PublishAction

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getMessages(int index)

public String getMessages(int index)

Messages to be published.

repeated string messages = 2;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The messages at the given index.

getMessagesBytes(int index)

public ByteString getMessagesBytes(int index)

Messages to be published.

repeated string messages = 2;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the messages at the given index.

getMessagesCount()

public int getMessagesCount()

Messages to be published.

repeated string messages = 2;

Returns
Type Description
int

The count of messages.

getMessagesList()

public ProtocolStringList getMessagesList()

Messages to be published.

repeated string messages = 2;

Returns
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for topicId.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(PublishAction other)

public PublishAction.Builder mergeFrom(PublishAction other)
Parameter
Name Description
other PublishAction
Returns
Type Description
PublishAction.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public PublishAction.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PublishAction.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public PublishAction.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
PublishAction.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final PublishAction.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
PublishAction.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public PublishAction.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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
Name Description
index int

The index to set the value at.

value String

The messages to set.

Returns
Type Description
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
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
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
Name Description
value String

The topicId to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for topicId to set.

Returns
Type Description
PublishAction.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final PublishAction.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
PublishAction.Builder
Overrides