Class TurnCompletedEvent.Builder (0.19.0)

public static final class TurnCompletedEvent.Builder extends GeneratedMessage.Builder<TurnCompletedEvent.Builder> implements TurnCompletedEventOrBuilder

Terminal event of a turn (see StreamChatAiAssistantResponse.turn_completed).

Protobuf type google.cloud.ces.v1beta.TurnCompletedEvent

Static Methods

getDescriptor()

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

Methods

build()

public TurnCompletedEvent build()
Returns
Type Description
TurnCompletedEvent

buildPartial()

public TurnCompletedEvent buildPartial()
Returns
Type Description
TurnCompletedEvent

clear()

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

clearFinalSequenceNumber()

public TurnCompletedEvent.Builder clearFinalSequenceNumber()

Sequence number of the last event the turn produced. A client whose cursor is lower missed content and should reload the session to see it.

int64 final_sequence_number = 3;

Returns
Type Description
TurnCompletedEvent.Builder

This builder for chaining.

clearReason()

public TurnCompletedEvent.Builder clearReason()

Why the turn ended.

.google.cloud.ces.v1beta.TurnCompletedEvent.Reason reason = 2;

Returns
Type Description
TurnCompletedEvent.Builder

This builder for chaining.

clearTurnId()

public TurnCompletedEvent.Builder clearTurnId()

Identifier of the turn that ended; matches TurnResumeSnapshot.turn_id and ActiveTurnInfo.turn_id.

string turn_id = 1;

Returns
Type Description
TurnCompletedEvent.Builder

This builder for chaining.

getDefaultInstanceForType()

public TurnCompletedEvent getDefaultInstanceForType()
Returns
Type Description
TurnCompletedEvent

getDescriptorForType()

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

getFinalSequenceNumber()

public long getFinalSequenceNumber()

Sequence number of the last event the turn produced. A client whose cursor is lower missed content and should reload the session to see it.

int64 final_sequence_number = 3;

Returns
Type Description
long

The finalSequenceNumber.

getReason()

public TurnCompletedEvent.Reason getReason()

Why the turn ended.

.google.cloud.ces.v1beta.TurnCompletedEvent.Reason reason = 2;

Returns
Type Description
TurnCompletedEvent.Reason

The reason.

getReasonValue()

public int getReasonValue()

Why the turn ended.

.google.cloud.ces.v1beta.TurnCompletedEvent.Reason reason = 2;

Returns
Type Description
int

The enum numeric value on the wire for reason.

getTurnId()

public String getTurnId()

Identifier of the turn that ended; matches TurnResumeSnapshot.turn_id and ActiveTurnInfo.turn_id.

string turn_id = 1;

Returns
Type Description
String

The turnId.

getTurnIdBytes()

public ByteString getTurnIdBytes()

Identifier of the turn that ended; matches TurnResumeSnapshot.turn_id and ActiveTurnInfo.turn_id.

string turn_id = 1;

Returns
Type Description
ByteString

The bytes for turnId.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(TurnCompletedEvent other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

setFinalSequenceNumber(long value)

public TurnCompletedEvent.Builder setFinalSequenceNumber(long value)

Sequence number of the last event the turn produced. A client whose cursor is lower missed content and should reload the session to see it.

int64 final_sequence_number = 3;

Parameter
Name Description
value long

The finalSequenceNumber to set.

Returns
Type Description
TurnCompletedEvent.Builder

This builder for chaining.

setReason(TurnCompletedEvent.Reason value)

public TurnCompletedEvent.Builder setReason(TurnCompletedEvent.Reason value)

Why the turn ended.

.google.cloud.ces.v1beta.TurnCompletedEvent.Reason reason = 2;

Parameter
Name Description
value TurnCompletedEvent.Reason

The reason to set.

Returns
Type Description
TurnCompletedEvent.Builder

This builder for chaining.

setReasonValue(int value)

public TurnCompletedEvent.Builder setReasonValue(int value)

Why the turn ended.

.google.cloud.ces.v1beta.TurnCompletedEvent.Reason reason = 2;

Parameter
Name Description
value int

The enum numeric value on the wire for reason to set.

Returns
Type Description
TurnCompletedEvent.Builder

This builder for chaining.

setTurnId(String value)

public TurnCompletedEvent.Builder setTurnId(String value)

Identifier of the turn that ended; matches TurnResumeSnapshot.turn_id and ActiveTurnInfo.turn_id.

string turn_id = 1;

Parameter
Name Description
value String

The turnId to set.

Returns
Type Description
TurnCompletedEvent.Builder

This builder for chaining.

setTurnIdBytes(ByteString value)

public TurnCompletedEvent.Builder setTurnIdBytes(ByteString value)

Identifier of the turn that ended; matches TurnResumeSnapshot.turn_id and ActiveTurnInfo.turn_id.

string turn_id = 1;

Parameter
Name Description
value ByteString

The bytes for turnId to set.

Returns
Type Description
TurnCompletedEvent.Builder

This builder for chaining.