Package ai.extend.types
Class RunUsageBreakdownCharge.Builder
- java.lang.Object
-
- ai.extend.types.RunUsageBreakdownCharge.Builder
-
- All Implemented Interfaces:
RunUsageBreakdownCharge._FinalStage,RunUsageBreakdownCharge.CreditsStage,RunUsageBreakdownCharge.ProductStage,RunUsageBreakdownCharge.QuantityStage,RunUsageBreakdownCharge.UnitStage
- Enclosing class:
- RunUsageBreakdownCharge
public static final class RunUsageBreakdownCharge.Builder extends java.lang.Object implements RunUsageBreakdownCharge.ProductStage, RunUsageBreakdownCharge.UnitStage, RunUsageBreakdownCharge.QuantityStage, RunUsageBreakdownCharge.CreditsStage, RunUsageBreakdownCharge._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RunUsageBreakdownChargebuild()RunUsageBreakdownCharge._FinalStagecredits(double credits)Credits consumed by this charge.RunUsageBreakdownCharge.Builderfrom(RunUsageBreakdownCharge other)RunUsageBreakdownCharge._FinalStagepages(java.util.List<java.lang.Integer> pages)1-indexed page numbers that incurred this charge.RunUsageBreakdownCharge._FinalStagepages(java.util.Optional<java.util.List<java.lang.Integer>> pages)1-indexed page numbers that incurred this charge.RunUsageBreakdownCharge.UnitStageproduct(java.lang.String product)Identifier for the billable cost driver.RunUsageBreakdownCharge.CreditsStagequantity(double quantity)How many units this charge was billed for.RunUsageBreakdownCharge.QuantityStageunit(java.lang.String unit)The unitquantityis measured in.
-
-
-
Method Detail
-
from
public RunUsageBreakdownCharge.Builder from(RunUsageBreakdownCharge other)
- Specified by:
fromin interfaceRunUsageBreakdownCharge.ProductStage
-
product
public RunUsageBreakdownCharge.UnitStage product(@NotNull java.lang.String product)
Identifier for the billable cost driver.
Identifier for the billable cost driver.
- Specified by:
productin interfaceRunUsageBreakdownCharge.ProductStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
unit
public RunUsageBreakdownCharge.QuantityStage unit(@NotNull java.lang.String unit)
The unit
quantityis measured in.The unit
quantityis measured in.- Specified by:
unitin interfaceRunUsageBreakdownCharge.UnitStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
quantity
public RunUsageBreakdownCharge.CreditsStage quantity(double quantity)
How many units this charge was billed for.
How many units this charge was billed for.
- Specified by:
quantityin interfaceRunUsageBreakdownCharge.QuantityStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
credits
public RunUsageBreakdownCharge._FinalStage credits(double credits)
Credits consumed by this charge.
Credits consumed by this charge.
- Specified by:
creditsin interfaceRunUsageBreakdownCharge.CreditsStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
pages
public RunUsageBreakdownCharge._FinalStage pages(java.util.List<java.lang.Integer> pages)
1-indexed page numbers that incurred this charge. Present on usage-based add-ons that are only billed for the pages where they actually applied (e.g.
agentic_text_correction,agentic_table_correction).- Specified by:
pagesin interfaceRunUsageBreakdownCharge._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
pages
public RunUsageBreakdownCharge._FinalStage pages(java.util.Optional<java.util.List<java.lang.Integer>> pages)
1-indexed page numbers that incurred this charge. Present on usage-based add-ons that are only billed for the pages where they actually applied (e.g.
agentic_text_correction,agentic_table_correction).- Specified by:
pagesin interfaceRunUsageBreakdownCharge._FinalStage
-
build
public RunUsageBreakdownCharge build()
- Specified by:
buildin interfaceRunUsageBreakdownCharge._FinalStage
-
-