Package ai.extend.types
Class RunUsage
- java.lang.Object
-
- ai.extend.types.RunUsage
-
public final class RunUsage extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceRunUsage._FinalStagestatic classRunUsage.Builderstatic interfaceRunUsage.CreditsStage
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RunUsage.CreditsStagebuilder()booleanequals(java.lang.Object other)java.util.Map<java.lang.String,java.lang.Object>getAdditionalProperties()java.util.Optional<java.util.List<RunUsageBreakdownEntry>>getBreakdown()doublegetCredits()java.util.Optional<java.lang.Double>getTotalCredits()inthashCode()java.lang.StringtoString()
-
-
-
Method Detail
-
getCredits
public double getCredits()
- Returns:
- The credits consumed by this run. For most run types this is the line item for the run's own work; for
workflow_runthis is the aggregate across all child runs.
-
getTotalCredits
public java.util.Optional<java.lang.Double> getTotalCredits()
- Returns:
- The total credits accounted for under this run, including any other runs it was responsible for creating. For example, an extract run on a fresh upload triggers a parse run, so
totalCreditsincludes both line items. For runs that didn't trigger any other work — likeparse_run,edit_runandworkflow_run—totalCreditsequalscredits.Availability: Present on runs persisted on or after May 14, 2026. Runs persisted before that date will omit this field.
-
getBreakdown
public java.util.Optional<java.util.List<RunUsageBreakdownEntry>> getBreakdown()
- Returns:
- The chargeable resources that make up
totalCredits, including this run itself when it has its own line item. Forworkflow_run, lists every contributing child run sorted by creation time (the workflow itself isn't chargeable and has no line item).Availability: Present on runs persisted on or after May 14, 2026. Runs persisted before that date will omit this field.
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
getAdditionalProperties
public java.util.Map<java.lang.String,java.lang.Object> getAdditionalProperties()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
builder
public static RunUsage.CreditsStage builder()
-
-