Class PublishResponse.Builder (1.123.9)

public static final class PublishResponse.Builder extends GeneratedMessageV3.Builder<PublishResponse.Builder> implements PublishResponseOrBuilder

Response for the Publish method.

Protobuf type google.pubsub.v1.PublishResponse

Static Methods

getDescriptor()

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

Methods

addAllMessageIds(Iterable<String> values)

public PublishResponse.Builder addAllMessageIds(Iterable<String> values)

The server-assigned ID of each published message, in the same order as the messages in the request. IDs are guaranteed to be unique within the topic.

repeated string message_ids = 1;

Parameter
NameDescription
valuesIterable<String>

The messageIds to add.

Returns
TypeDescription
PublishResponse.Builder

This builder for chaining.

addMessageIds(String value)

public PublishResponse.Builder addMessageIds(String value)

The server-assigned ID of each published message, in the same order as the messages in the request. IDs are guaranteed to be unique within the topic.

repeated string message_ids = 1;

Parameter
NameDescription
valueString

The messageIds to add.

Returns
TypeDescription
PublishResponse.Builder

This builder for chaining.

addMessageIdsBytes(ByteString value)

public PublishResponse.Builder addMessageIdsBytes(ByteString value)

The server-assigned ID of each published message, in the same order as the messages in the request. IDs are guaranteed to be unique within the topic.

repeated string message_ids = 1;

Parameter
NameDescription
valueByteString

The bytes of the messageIds to add.

Returns
TypeDescription
PublishResponse.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public PublishResponse build()
Returns
TypeDescription
PublishResponse

buildPartial()

public PublishResponse buildPartial()
Returns
TypeDescription
PublishResponse

clear()

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

clearField(Descriptors.FieldDescriptor field)

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

clearMessageIds()

public PublishResponse.Builder clearMessageIds()

The server-assigned ID of each published message, in the same order as the messages in the request. IDs are guaranteed to be unique within the topic.

repeated string message_ids = 1;

Returns
TypeDescription
PublishResponse.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

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

getDefaultInstanceForType()

public PublishResponse getDefaultInstanceForType()
Returns
TypeDescription
PublishResponse

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getMessageIds(int index)

public String getMessageIds(int index)

The server-assigned ID of each published message, in the same order as the messages in the request. IDs are guaranteed to be unique within the topic.

repeated string message_ids = 1;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The messageIds at the given index.

getMessageIdsBytes(int index)

public ByteString getMessageIdsBytes(int index)

The server-assigned ID of each published message, in the same order as the messages in the request. IDs are guaranteed to be unique within the topic.

repeated string message_ids = 1;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the messageIds at the given index.

getMessageIdsCount()

public int getMessageIdsCount()

The server-assigned ID of each published message, in the same order as the messages in the request. IDs are guaranteed to be unique within the topic.

repeated string message_ids = 1;

Returns
TypeDescription
int

The count of messageIds.

getMessageIdsList()

public ProtocolStringList getMessageIdsList()

The server-assigned ID of each published message, in the same order as the messages in the request. IDs are guaranteed to be unique within the topic.

repeated string message_ids = 1;

Returns
TypeDescription
ProtocolStringList

A list containing the messageIds.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(PublishResponse other)

public PublishResponse.Builder mergeFrom(PublishResponse other)
Parameter
NameDescription
otherPublishResponse
Returns
TypeDescription
PublishResponse.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setMessageIds(int index, String value)

public PublishResponse.Builder setMessageIds(int index, String value)

The server-assigned ID of each published message, in the same order as the messages in the request. IDs are guaranteed to be unique within the topic.

repeated string message_ids = 1;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The messageIds to set.

Returns
TypeDescription
PublishResponse.Builder

This builder for chaining.

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

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

setUnknownFields(UnknownFieldSet unknownFields)

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