Record Class DashScopeTranscriptionApiSpec.DashScopeAudioTranscriptionResponse.Usage
java.lang.Object
java.lang.Record
com.alibaba.cloud.ai.dashscope.audio.transcription.DashScopeTranscriptionApiSpec.DashScopeAudioTranscriptionResponse.Usage
- Enclosing class:
- DashScopeTranscriptionApiSpec.DashScopeAudioTranscriptionResponse
public static record DashScopeTranscriptionApiSpec.DashScopeAudioTranscriptionResponse.Usage(Integer promptTokens, Integer completionTokens, Integer totalTokens, DashScopeTranscriptionApiSpec.DashScopeAudioTranscriptionResponse.CompletionTokensDetails completionTokensDetails, DashScopeTranscriptionApiSpec.DashScopeAudioTranscriptionResponse.PromptTokensDetails promptTokensDetails, Integer seconds)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionUsage(Integer promptTokens, Integer completionTokens, Integer totalTokens, DashScopeTranscriptionApiSpec.DashScopeAudioTranscriptionResponse.CompletionTokensDetails completionTokensDetails, DashScopeTranscriptionApiSpec.DashScopeAudioTranscriptionResponse.PromptTokensDetails promptTokensDetails, Integer seconds) Creates an instance of aUsagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecompletionTokensrecord component.Returns the value of thecompletionTokensDetailsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thepromptTokensrecord component.Returns the value of thepromptTokensDetailsrecord component.seconds()Returns the value of thesecondsrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetotalTokensrecord component.
-
Constructor Details
-
Usage
public Usage(Integer promptTokens, Integer completionTokens, Integer totalTokens, DashScopeTranscriptionApiSpec.DashScopeAudioTranscriptionResponse.CompletionTokensDetails completionTokensDetails, DashScopeTranscriptionApiSpec.DashScopeAudioTranscriptionResponse.PromptTokensDetails promptTokensDetails, Integer seconds) Creates an instance of aUsagerecord class.- Parameters:
promptTokens- the value for thepromptTokensrecord componentcompletionTokens- the value for thecompletionTokensrecord componenttotalTokens- the value for thetotalTokensrecord componentcompletionTokensDetails- the value for thecompletionTokensDetailsrecord componentpromptTokensDetails- the value for thepromptTokensDetailsrecord componentseconds- the value for thesecondsrecord 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). -
promptTokens
Returns the value of thepromptTokensrecord component.- Returns:
- the value of the
promptTokensrecord component
-
completionTokens
Returns the value of thecompletionTokensrecord component.- Returns:
- the value of the
completionTokensrecord component
-
totalTokens
Returns the value of thetotalTokensrecord component.- Returns:
- the value of the
totalTokensrecord component
-
completionTokensDetails
public DashScopeTranscriptionApiSpec.DashScopeAudioTranscriptionResponse.CompletionTokensDetails completionTokensDetails()Returns the value of thecompletionTokensDetailsrecord component.- Returns:
- the value of the
completionTokensDetailsrecord component
-
promptTokensDetails
public DashScopeTranscriptionApiSpec.DashScopeAudioTranscriptionResponse.PromptTokensDetails promptTokensDetails()Returns the value of thepromptTokensDetailsrecord component.- Returns:
- the value of the
promptTokensDetailsrecord component
-
seconds
Returns the value of thesecondsrecord component.- Returns:
- the value of the
secondsrecord component
-