Class InitialPublishRequest.Builder (1.13.5)

public static final class InitialPublishRequest.Builder extends GeneratedMessageV3.Builder<InitialPublishRequest.Builder> implements InitialPublishRequestOrBuilder

The first request that must be sent on a newly-opened stream.

Protobuf type google.cloud.pubsublite.v1.InitialPublishRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public InitialPublishRequest build()
Returns
Type Description
InitialPublishRequest

buildPartial()

public InitialPublishRequest buildPartial()
Returns
Type Description
InitialPublishRequest

clear()

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

clearClientId()

public InitialPublishRequest.Builder clearClientId()

Unique identifier for a publisher client. If set, enables publish idempotency within a publisher client session.

The length of this field must be exactly 16 bytes long and should be populated with a 128 bit uuid, generated by standard uuid algorithms like uuid1 or uuid4. The same identifier should be reused following disconnections with retryable stream errors.

bytes client_id = 3;

Returns
Type Description
InitialPublishRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

public InitialPublishRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
InitialPublishRequest.Builder
Overrides

clearPartition()

public InitialPublishRequest.Builder clearPartition()

The partition within the topic to which messages will be written. Partitions are zero indexed, so partition must be in the range [0, topic.num_partitions).

int64 partition = 2;

Returns
Type Description
InitialPublishRequest.Builder

This builder for chaining.

clearTopic()

public InitialPublishRequest.Builder clearTopic()

The topic to which messages will be written.

string topic = 1;

Returns
Type Description
InitialPublishRequest.Builder

This builder for chaining.

clone()

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

getClientId()

public ByteString getClientId()

Unique identifier for a publisher client. If set, enables publish idempotency within a publisher client session.

The length of this field must be exactly 16 bytes long and should be populated with a 128 bit uuid, generated by standard uuid algorithms like uuid1 or uuid4. The same identifier should be reused following disconnections with retryable stream errors.

bytes client_id = 3;

Returns
Type Description
ByteString

The clientId.

getDefaultInstanceForType()

public InitialPublishRequest getDefaultInstanceForType()
Returns
Type Description
InitialPublishRequest

getDescriptorForType()

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

getPartition()

public long getPartition()

The partition within the topic to which messages will be written. Partitions are zero indexed, so partition must be in the range [0, topic.num_partitions).

int64 partition = 2;

Returns
Type Description
long

The partition.

getTopic()

public String getTopic()

The topic to which messages will be written.

string topic = 1;

Returns
Type Description
String

The topic.

getTopicBytes()

public ByteString getTopicBytes()

The topic to which messages will be written.

string topic = 1;

Returns
Type Description
ByteString

The bytes for topic.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(InitialPublishRequest other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setClientId(ByteString value)

public InitialPublishRequest.Builder setClientId(ByteString value)

Unique identifier for a publisher client. If set, enables publish idempotency within a publisher client session.

The length of this field must be exactly 16 bytes long and should be populated with a 128 bit uuid, generated by standard uuid algorithms like uuid1 or uuid4. The same identifier should be reused following disconnections with retryable stream errors.

bytes client_id = 3;

Parameter
Name Description
value ByteString

The clientId to set.

Returns
Type Description
InitialPublishRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setPartition(long value)

public InitialPublishRequest.Builder setPartition(long value)

The partition within the topic to which messages will be written. Partitions are zero indexed, so partition must be in the range [0, topic.num_partitions).

int64 partition = 2;

Parameter
Name Description
value long

The partition to set.

Returns
Type Description
InitialPublishRequest.Builder

This builder for chaining.

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

public InitialPublishRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
InitialPublishRequest.Builder
Overrides

setTopic(String value)

public InitialPublishRequest.Builder setTopic(String value)

The topic to which messages will be written.

string topic = 1;

Parameter
Name Description
value String

The topic to set.

Returns
Type Description
InitialPublishRequest.Builder

This builder for chaining.

setTopicBytes(ByteString value)

public InitialPublishRequest.Builder setTopicBytes(ByteString value)

The topic to which messages will be written.

string topic = 1;

Parameter
Name Description
value ByteString

The bytes for topic to set.

Returns
Type Description
InitialPublishRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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