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.
  • Constructor Details

  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • model

      public String model()
      Returns the value of the model record component.
      Returns:
      the value of the model record component
    • agent

      public String agent()
      Returns the value of the agent record component.
      Returns:
      the value of the agent record component
    • object

      public String object()
      Returns the value of the object record component.
      Returns:
      the value of the object record component
    • created

      public Instant created()
      Returns the value of the created record component.
      Returns:
      the value of the created record component
    • updated

      public Instant updated()
      Returns the value of the updated record component.
      Returns:
      the value of the updated record component
    • role

      public Interaction.Role role()
      Returns the value of the role record component.
      Returns:
      the value of the role record component
    • status

      public Interaction.Status status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • outputs

      public List<Content> outputs()
      Returns the value of the outputs record component.
      Returns:
      the value of the outputs record component
    • usage

      public Interaction.Usage usage()
      Returns the value of the usage record component.
      Returns:
      the value of the usage record component
    • previousInteractionId

      public String previousInteractionId()
      Returns the value of the previousInteractionId record component.
      Returns:
      the value of the previousInteractionId record component