Record Class Interaction
java.lang.Object
java.lang.Record
io.github.glaforge.gemini.interactions.model.Interaction
- Record Components:
id- The unique identifier for the interaction.model- The model used for the interaction.agent- The agent used for the interaction.object- The object type (always "interaction").created- Creation timestamp.updated- Last update timestamp.role- The role of the interaction participant.status- The status of the interaction.outputs- List of content outputs.usage- Token usage details.previousInteractionId- ID of the previous interaction in the conversation.
public record Interaction(String id, String model, String agent, String object, Instant created, Instant updated, Interaction.Role role, Interaction.Status status, List<Content> outputs, Interaction.Usage usage, String previousInteractionId)
extends Record
Represents the Interaction resource.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumInteraction modalities.static final recordTokens broken down by modality.static enumInteraction participant role.static enumInteraction status.static final recordRepresents a single turn in an interaction.static final recordToken usage details. -
Constructor Summary
ConstructorsConstructorDescriptionInteraction(String id, String model, String agent, String object, Instant created, Instant updated, Interaction.Role role, Interaction.Status status, List<Content> outputs, Interaction.Usage usage, String previousInteractionId) Creates an instance of aInteractionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionagent()Returns the value of theagentrecord component.created()Returns the value of thecreatedrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.model()Returns the value of themodelrecord component.object()Returns the value of theobjectrecord component.outputs()Returns the value of theoutputsrecord component.Returns the value of thepreviousInteractionIdrecord component.role()Returns the value of therolerecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.updated()Returns the value of theupdatedrecord component.usage()Returns the value of theusagerecord component.
-
Constructor Details
-
Interaction
public Interaction(String id, String model, String agent, String object, Instant created, Instant updated, Interaction.Role role, Interaction.Status status, List<Content> outputs, Interaction.Usage usage, String previousInteractionId) Creates an instance of aInteractionrecord class.- Parameters:
id- the value for theidrecord componentmodel- the value for themodelrecord componentagent- the value for theagentrecord componentobject- the value for theobjectrecord componentcreated- the value for thecreatedrecord componentupdated- the value for theupdatedrecord componentrole- the value for therolerecord componentstatus- the value for thestatusrecord componentoutputs- the value for theoutputsrecord componentusage- the value for theusagerecord componentpreviousInteractionId- the value for thepreviousInteractionIdrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
model
Returns the value of themodelrecord component.- Returns:
- the value of the
modelrecord component
-
agent
Returns the value of theagentrecord component.- Returns:
- the value of the
agentrecord component
-
object
Returns the value of theobjectrecord component.- Returns:
- the value of the
objectrecord component
-
created
Returns the value of thecreatedrecord component.- Returns:
- the value of the
createdrecord component
-
updated
Returns the value of theupdatedrecord component.- Returns:
- the value of the
updatedrecord component
-
role
Returns the value of therolerecord component.- Returns:
- the value of the
rolerecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
outputs
Returns the value of theoutputsrecord component.- Returns:
- the value of the
outputsrecord component
-
usage
Returns the value of theusagerecord component.- Returns:
- the value of the
usagerecord component
-
previousInteractionId
Returns the value of thepreviousInteractionIdrecord component.- Returns:
- the value of the
previousInteractionIdrecord component
-