Package com.github.copilot.sdk.events
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 Summary
ConstructorsConstructorDescriptionSessionShutdownData(SessionShutdownEvent.ShutdownType shutdownType, String errorReason, double totalPremiumRequests, double totalApiDurationMs, double sessionStartTime, SessionShutdownEvent.CodeChanges codeChanges, Map<String, Object> modelMetrics, String currentModel) Creates an instance of aSessionShutdownDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecodeChangesrecord component.Returns the value of thecurrentModelrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theerrorReasonrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of themodelMetricsrecord component.doubleReturns the value of thesessionStartTimerecord component.Returns the value of theshutdownTyperecord component.final StringtoString()Returns a string representation of this record class.doubleReturns the value of thetotalApiDurationMsrecord component.doubleReturns the value of thetotalPremiumRequestsrecord component.
-
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 aSessionShutdownDatarecord class.- Parameters:
shutdownType- the value for theshutdownTyperecord componenterrorReason- the value for theerrorReasonrecord componenttotalPremiumRequests- the value for thetotalPremiumRequestsrecord componenttotalApiDurationMs- the value for thetotalApiDurationMsrecord componentsessionStartTime- the value for thesessionStartTimerecord componentcodeChanges- the value for thecodeChangesrecord componentmodelMetrics- the value for themodelMetricsrecord componentcurrentModel- the value for thecurrentModelrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
shutdownType
Returns the value of theshutdownTyperecord component.- Returns:
- the value of the
shutdownTyperecord component
-
errorReason
Returns the value of theerrorReasonrecord component.- Returns:
- the value of the
errorReasonrecord component
-
totalPremiumRequests
public double totalPremiumRequests()Returns the value of thetotalPremiumRequestsrecord component.- Returns:
- the value of the
totalPremiumRequestsrecord component
-
totalApiDurationMs
public double totalApiDurationMs()Returns the value of thetotalApiDurationMsrecord component.- Returns:
- the value of the
totalApiDurationMsrecord component
-
sessionStartTime
public double sessionStartTime()Returns the value of thesessionStartTimerecord component.- Returns:
- the value of the
sessionStartTimerecord component
-
codeChanges
Returns the value of thecodeChangesrecord component.- Returns:
- the value of the
codeChangesrecord component
-
modelMetrics
Returns the value of themodelMetricsrecord component.- Returns:
- the value of the
modelMetricsrecord component
-
currentModel
Returns the value of thecurrentModelrecord component.- Returns:
- the value of the
currentModelrecord component
-