Record Class ClientResponseMetadata
java.lang.Object
java.lang.Record
org.tavall.gemini.clients.response.metadata.ClientResponseMetadata
public record ClientResponseMetadata(GeminiModel modelUsed, int totalTokenCount, Duration latency, ResponseStatus responseStatus)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionClientResponseMetadata(GeminiModel modelUsed, int totalTokenCount, Duration latency, ResponseStatus responseStatus) Creates an instance of aClientResponseMetadatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.latency()Returns the value of thelatencyrecord component.Returns the value of themodelUsedrecord component.Returns the value of theresponseStatusrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalTokenCountrecord component.
-
Constructor Details
-
ClientResponseMetadata
public ClientResponseMetadata(GeminiModel modelUsed, int totalTokenCount, Duration latency, ResponseStatus responseStatus) Creates an instance of aClientResponseMetadatarecord class.- Parameters:
modelUsed- the value for themodelUsedrecord componenttotalTokenCount- the value for thetotalTokenCountrecord componentlatency- the value for thelatencyrecord componentresponseStatus- the value for theresponseStatusrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
modelUsed
Returns the value of themodelUsedrecord component.- Returns:
- the value of the
modelUsedrecord component
-
totalTokenCount
public int totalTokenCount()Returns the value of thetotalTokenCountrecord component.- Returns:
- the value of the
totalTokenCountrecord component
-
latency
Returns the value of thelatencyrecord component.- Returns:
- the value of the
latencyrecord component
-
responseStatus
Returns the value of theresponseStatusrecord component.- Returns:
- the value of the
responseStatusrecord component
-