Record Class SessionShutdownEvent.SessionShutdownData

java.lang.Object
java.lang.Record
com.github.copilot.sdk.events.SessionShutdownEvent.SessionShutdownData
Enclosing class:
SessionShutdownEvent

public static record SessionShutdownEvent.SessionShutdownData(SessionShutdownEvent.ShutdownType shutdownType, String errorReason, double totalPremiumRequests, double totalApiDurationMs, double sessionStartTime, SessionShutdownEvent.CodeChanges codeChanges, Map<String,Object> modelMetrics, String currentModel) extends Record
Data for the session shutdown event.
  • Constructor Details

    • SessionShutdownData

      public SessionShutdownData(SessionShutdownEvent.ShutdownType shutdownType, String errorReason, double totalPremiumRequests, double totalApiDurationMs, double sessionStartTime, SessionShutdownEvent.CodeChanges codeChanges, Map<String,Object> modelMetrics, String currentModel)
      Creates an instance of a SessionShutdownData record class.
      Parameters:
      shutdownType - the value for the shutdownType record component
      errorReason - the value for the errorReason record component
      totalPremiumRequests - the value for the totalPremiumRequests record component
      totalApiDurationMs - the value for the totalApiDurationMs record component
      sessionStartTime - the value for the sessionStartTime record component
      codeChanges - the value for the codeChanges record component
      modelMetrics - the value for the modelMetrics record component
      currentModel - the value for the currentModel record component
  • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • shutdownType

      public SessionShutdownEvent.ShutdownType shutdownType()
      Returns the value of the shutdownType record component.
      Returns:
      the value of the shutdownType record component
    • errorReason

      public String errorReason()
      Returns the value of the errorReason record component.
      Returns:
      the value of the errorReason record component
    • totalPremiumRequests

      public double totalPremiumRequests()
      Returns the value of the totalPremiumRequests record component.
      Returns:
      the value of the totalPremiumRequests record component
    • totalApiDurationMs

      public double totalApiDurationMs()
      Returns the value of the totalApiDurationMs record component.
      Returns:
      the value of the totalApiDurationMs record component
    • sessionStartTime

      public double sessionStartTime()
      Returns the value of the sessionStartTime record component.
      Returns:
      the value of the sessionStartTime record component
    • codeChanges

      public SessionShutdownEvent.CodeChanges codeChanges()
      Returns the value of the codeChanges record component.
      Returns:
      the value of the codeChanges record component
    • modelMetrics

      public Map<String,Object> modelMetrics()
      Returns the value of the modelMetrics record component.
      Returns:
      the value of the modelMetrics record component
    • currentModel

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