Class InitialPublishRequest.Builder (1.11.2)

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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public InitialPublishRequest build()
Returns
TypeDescription
InitialPublishRequest

buildPartial()

public InitialPublishRequest buildPartial()
Returns
TypeDescription
InitialPublishRequest

clear()

public InitialPublishRequest.Builder clear()
Returns
TypeDescription
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
TypeDescription
InitialPublishRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

public InitialPublishRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
InitialPublishRequest.Builder

This builder for chaining.

clearTopic()

public InitialPublishRequest.Builder clearTopic()

The topic to which messages will be written.

string topic = 1;

Returns
TypeDescription
InitialPublishRequest.Builder

This builder for chaining.

clone()

public InitialPublishRequest.Builder clone()
Returns
TypeDescription
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
TypeDescription
ByteString

The clientId.

getDefaultInstanceForType()

public InitialPublishRequest getDefaultInstanceForType()
Returns
TypeDescription
InitialPublishRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
long

The partition.

getTopic()

public String getTopic()

The topic to which messages will be written.

string topic = 1;

Returns
TypeDescription
String

The topic.

getTopicBytes()

public ByteString getTopicBytes()

The topic to which messages will be written.

string topic = 1;

Returns
TypeDescription
ByteString

The bytes for topic.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(InitialPublishRequest other)

public InitialPublishRequest.Builder mergeFrom(InitialPublishRequest other)
Parameter
NameDescription
otherInitialPublishRequest
Returns
TypeDescription
InitialPublishRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final InitialPublishRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueByteString

The clientId to set.

Returns
TypeDescription
InitialPublishRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public InitialPublishRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valuelong

The partition to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
InitialPublishRequest.Builder
Overrides

setTopic(String value)

public InitialPublishRequest.Builder setTopic(String value)

The topic to which messages will be written.

string topic = 1;

Parameter
NameDescription
valueString

The topic to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for topic to set.

Returns
TypeDescription
InitialPublishRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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