Class RunUsageSummary.Builder
- java.lang.Object
-
- ai.extend.types.RunUsageSummary.Builder
-
- All Implemented Interfaces:
RunUsageSummary._FinalStage,RunUsageSummary.CreditsStage
- Enclosing class:
- RunUsageSummary
public static final class RunUsageSummary.Builder extends java.lang.Object implements RunUsageSummary.CreditsStage, RunUsageSummary._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RunUsageSummarybuild()RunUsageSummary._FinalStagecredits(double credits)The credits consumed by this run.RunUsageSummary.Builderfrom(RunUsageSummary other)RunUsageSummary._FinalStagetotalCredits(java.lang.Double totalCredits)The total credits accounted for under this run, including any other runs it was responsible for creating.RunUsageSummary._FinalStagetotalCredits(java.util.Optional<java.lang.Double> totalCredits)The total credits accounted for under this run, including any other runs it was responsible for creating.
-
-
-
Method Detail
-
from
public RunUsageSummary.Builder from(RunUsageSummary other)
- Specified by:
fromin interfaceRunUsageSummary.CreditsStage
-
credits
public RunUsageSummary._FinalStage credits(double credits)
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.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.- Specified by:
creditsin interfaceRunUsageSummary.CreditsStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
totalCredits
public RunUsageSummary._FinalStage totalCredits(java.lang.Double totalCredits)
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_run, andworkflow_run—totalCreditsequalscredits.Availability: Present on runs persisted on or after May 14, 2026. Runs persisted before that date will omit this field.
- Specified by:
totalCreditsin interfaceRunUsageSummary._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
totalCredits
public RunUsageSummary._FinalStage totalCredits(java.util.Optional<java.lang.Double> totalCredits)
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_run, andworkflow_run—totalCreditsequalscredits.Availability: Present on runs persisted on or after May 14, 2026. Runs persisted before that date will omit this field.
- Specified by:
totalCreditsin interfaceRunUsageSummary._FinalStage
-
build
public RunUsageSummary build()
- Specified by:
buildin interfaceRunUsageSummary._FinalStage
-
-