Class ConversationTurn.Builder (3.100.0)

public static final class ConversationTurn.Builder extends GeneratedMessage.Builder<ConversationTurn.Builder> implements ConversationTurnOrBuilder

Represents a single turn/invocation in the conversation.

Protobuf type google.cloud.aiplatform.v1beta1.ConversationTurn

Static Methods

getDescriptor()

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

Methods

addAllEvents(Iterable<? extends AgentEvent> values)

public ConversationTurn.Builder addAllEvents(Iterable<? extends AgentEvent> values)

Optional. The list of events that occurred during this turn.

repeated .google.cloud.aiplatform.v1beta1.AgentEvent events = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends com.google.cloud.aiplatform.v1beta1.AgentEvent>
Returns
Type Description
ConversationTurn.Builder

addEvents(AgentEvent value)

public ConversationTurn.Builder addEvents(AgentEvent value)

Optional. The list of events that occurred during this turn.

repeated .google.cloud.aiplatform.v1beta1.AgentEvent events = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value AgentEvent
Returns
Type Description
ConversationTurn.Builder

addEvents(AgentEvent.Builder builderForValue)

public ConversationTurn.Builder addEvents(AgentEvent.Builder builderForValue)

Optional. The list of events that occurred during this turn.

repeated .google.cloud.aiplatform.v1beta1.AgentEvent events = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue AgentEvent.Builder
Returns
Type Description
ConversationTurn.Builder

addEvents(int index, AgentEvent value)

public ConversationTurn.Builder addEvents(int index, AgentEvent value)

Optional. The list of events that occurred during this turn.

repeated .google.cloud.aiplatform.v1beta1.AgentEvent events = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value AgentEvent
Returns
Type Description
ConversationTurn.Builder

addEvents(int index, AgentEvent.Builder builderForValue)

public ConversationTurn.Builder addEvents(int index, AgentEvent.Builder builderForValue)

Optional. The list of events that occurred during this turn.

repeated .google.cloud.aiplatform.v1beta1.AgentEvent events = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue AgentEvent.Builder
Returns
Type Description
ConversationTurn.Builder

addEventsBuilder()

public AgentEvent.Builder addEventsBuilder()

Optional. The list of events that occurred during this turn.

repeated .google.cloud.aiplatform.v1beta1.AgentEvent events = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
AgentEvent.Builder

addEventsBuilder(int index)

public AgentEvent.Builder addEventsBuilder(int index)

Optional. The list of events that occurred during this turn.

repeated .google.cloud.aiplatform.v1beta1.AgentEvent events = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AgentEvent.Builder

build()

public ConversationTurn build()
Returns
Type Description
ConversationTurn

buildPartial()

public ConversationTurn buildPartial()
Returns
Type Description
ConversationTurn

clear()

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

clearEvents()

public ConversationTurn.Builder clearEvents()

Optional. The list of events that occurred during this turn.

repeated .google.cloud.aiplatform.v1beta1.AgentEvent events = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ConversationTurn.Builder

clearTurnId()

public ConversationTurn.Builder clearTurnId()

Optional. A unique identifier for the turn. Useful for referencing specific turns across systems.

string turn_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ConversationTurn.Builder

This builder for chaining.

clearTurnIndex()

public ConversationTurn.Builder clearTurnIndex()

Required. The 0-based index of the turn in the conversation sequence.

optional int32 turn_index = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ConversationTurn.Builder

This builder for chaining.

getDefaultInstanceForType()

public ConversationTurn getDefaultInstanceForType()
Returns
Type Description
ConversationTurn

getDescriptorForType()

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

getEvents(int index)

public AgentEvent getEvents(int index)

Optional. The list of events that occurred during this turn.

repeated .google.cloud.aiplatform.v1beta1.AgentEvent events = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AgentEvent

getEventsBuilder(int index)

public AgentEvent.Builder getEventsBuilder(int index)

Optional. The list of events that occurred during this turn.

repeated .google.cloud.aiplatform.v1beta1.AgentEvent events = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AgentEvent.Builder

getEventsBuilderList()

public List<AgentEvent.Builder> getEventsBuilderList()

Optional. The list of events that occurred during this turn.

repeated .google.cloud.aiplatform.v1beta1.AgentEvent events = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Builder>

getEventsCount()

public int getEventsCount()

Optional. The list of events that occurred during this turn.

repeated .google.cloud.aiplatform.v1beta1.AgentEvent events = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getEventsList()

public List<AgentEvent> getEventsList()

Optional. The list of events that occurred during this turn.

repeated .google.cloud.aiplatform.v1beta1.AgentEvent events = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<AgentEvent>

getEventsOrBuilder(int index)

public AgentEventOrBuilder getEventsOrBuilder(int index)

Optional. The list of events that occurred during this turn.

repeated .google.cloud.aiplatform.v1beta1.AgentEvent events = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
AgentEventOrBuilder

getEventsOrBuilderList()

public List<? extends AgentEventOrBuilder> getEventsOrBuilderList()

Optional. The list of events that occurred during this turn.

repeated .google.cloud.aiplatform.v1beta1.AgentEvent events = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.cloud.aiplatform.v1beta1.AgentEventOrBuilder>

getTurnId()

public String getTurnId()

Optional. A unique identifier for the turn. Useful for referencing specific turns across systems.

string turn_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The turnId.

getTurnIdBytes()

public ByteString getTurnIdBytes()

Optional. A unique identifier for the turn. Useful for referencing specific turns across systems.

string turn_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for turnId.

getTurnIndex()

public int getTurnIndex()

Required. The 0-based index of the turn in the conversation sequence.

optional int32 turn_index = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The turnIndex.

hasTurnIndex()

public boolean hasTurnIndex()

Required. The 0-based index of the turn in the conversation sequence.

optional int32 turn_index = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
boolean

Whether the turnIndex field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ConversationTurn other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

removeEvents(int index)

public ConversationTurn.Builder removeEvents(int index)

Optional. The list of events that occurred during this turn.

repeated .google.cloud.aiplatform.v1beta1.AgentEvent events = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
ConversationTurn.Builder

setEvents(int index, AgentEvent value)

public ConversationTurn.Builder setEvents(int index, AgentEvent value)

Optional. The list of events that occurred during this turn.

repeated .google.cloud.aiplatform.v1beta1.AgentEvent events = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value AgentEvent
Returns
Type Description
ConversationTurn.Builder

setEvents(int index, AgentEvent.Builder builderForValue)

public ConversationTurn.Builder setEvents(int index, AgentEvent.Builder builderForValue)

Optional. The list of events that occurred during this turn.

repeated .google.cloud.aiplatform.v1beta1.AgentEvent events = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue AgentEvent.Builder
Returns
Type Description
ConversationTurn.Builder

setTurnId(String value)

public ConversationTurn.Builder setTurnId(String value)

Optional. A unique identifier for the turn. Useful for referencing specific turns across systems.

string turn_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The turnId to set.

Returns
Type Description
ConversationTurn.Builder

This builder for chaining.

setTurnIdBytes(ByteString value)

public ConversationTurn.Builder setTurnIdBytes(ByteString value)

Optional. A unique identifier for the turn. Useful for referencing specific turns across systems.

string turn_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for turnId to set.

Returns
Type Description
ConversationTurn.Builder

This builder for chaining.

setTurnIndex(int value)

public ConversationTurn.Builder setTurnIndex(int value)

Required. The 0-based index of the turn in the conversation sequence.

optional int32 turn_index = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The turnIndex to set.

Returns
Type Description
ConversationTurn.Builder

This builder for chaining.