.NET API
QuotaConsumption
Tracon.Abstractions.dllThe consumption of a completed run to add to the quota counters.
public sealed record QuotaConsumption : IEquatable<QuotaConsumption>- Inheritance
- object ← QuotaConsumption
- Implements
- IEquatable<QuotaConsumption>
- Inherited Members
- object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
Section titled “Constructors”QuotaConsumption()
Section titled “ QuotaConsumption()”public QuotaConsumption()Properties
Section titled “Properties”AgentName
Section titled “ AgentName”The name of the agent that ran.
public required string AgentName { get; init; }Property Value
Section titled “Property Value”The amount to add. null if pricing is undefined — not zero: Tracon does not invent a price.
public decimal? Cost { get; init; }Property Value
Section titled “Property Value”OccurredAt
Section titled “ OccurredAt”The moment the consumption occurred (UTC). The period is computed from this.
public required DateTimeOffset OccurredAt { get; init; }Property Value
Section titled “Property Value”The identifier of the run that spent this consumption: the root run, a child run of its call tree, or the run whose tool reported the amount. null when consumption is recorded outside a run (there is no such caller today, but the field stays optional rather than assume one always exists).
public string? RunId { get; init; }Property Value
Section titled “Property Value”The number of runs to add. 1 for a root run; 0 for an entry that adds only the tokens and cost of a run that belongs to a call tree already counted as one run (a child agent run, a tool amount that arrived after its run closed).
public long Runs { get; init; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”A store adds it as it is: an entry with 0 still creates a counter that does not exist yet.
TenantId
Section titled “ TenantId”The tenant identifier.
public required string TenantId { get; init; }Property Value
Section titled “Property Value”Tokens
Section titled “ Tokens”The total tokens to add.
public long Tokens { get; init; }Property Value
Section titled “Property Value”UserId
Section titled “ UserId”The user the run belongs to. null when the run carries no attribution — a run’s correlation is not guessed from another active user.
public string? UserId { get; init; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”Equals(object?)
Section titled “ Equals(object?)”public override bool Equals(object? obj)Parameters
Section titled “Parameters”obj object?
Returns
Section titled “Returns”Equals(QuotaConsumption?)
Section titled “ Equals(QuotaConsumption?)”public bool Equals(QuotaConsumption? other)Parameters
Section titled “Parameters”other QuotaConsumption?
Returns
Section titled “Returns”GetHashCode()
Section titled “ GetHashCode()”public override int GetHashCode()Returns
Section titled “Returns”ToString()
Section titled “ ToString()”public override string ToString()Returns
Section titled “Returns”Operators
Section titled “Operators”operator ==(QuotaConsumption?, QuotaConsumption?)
Section titled “ operator ==(QuotaConsumption?, QuotaConsumption?)”public static bool operator ==(QuotaConsumption? left, QuotaConsumption? right)Parameters
Section titled “Parameters”left QuotaConsumption?
right QuotaConsumption?
Returns
Section titled “Returns”operator !=(QuotaConsumption?, QuotaConsumption?)
Section titled “ operator !=(QuotaConsumption?, QuotaConsumption?)”public static bool operator !=(QuotaConsumption? left, QuotaConsumption? right)Parameters
Section titled “Parameters”left QuotaConsumption?
right QuotaConsumption?