Skip to content
Tracon

QuotaConsumption

Namespace Tracon · Assembly Tracon.Abstractions.dll

The consumption of a completed run to add to the quota counters.

public sealed record QuotaConsumption : IEquatable<QuotaConsumption>

objectQuotaConsumption

IEquatable<QuotaConsumption>

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

public QuotaConsumption()

The name of the agent that ran.

public required string AgentName { get; init; }

string

The amount to add. null if pricing is undefined — not zero: Tracon does not invent a price.

public decimal? Cost { get; init; }

decimal?

The moment the consumption occurred (UTC). The period is computed from this.

public required DateTimeOffset OccurredAt { get; init; }

DateTimeOffset

The identifier of the root run whose completion produced this consumption. 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; }

string?

The number of runs to add. Normally 1.

public long Runs { get; init; }

long

The tenant identifier.

public required string TenantId { get; init; }

string

The total tokens to add.

public long Tokens { get; init; }

long

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; }

string?

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(QuotaConsumption? other)

other QuotaConsumption?

bool

public override int GetHashCode()

int

public override string ToString()

string

operator ==(QuotaConsumption?, QuotaConsumption?)

Section titled “ operator ==(QuotaConsumption?, QuotaConsumption?)”
public static bool operator ==(QuotaConsumption? left, QuotaConsumption? right)

left QuotaConsumption?

right QuotaConsumption?

bool

operator !=(QuotaConsumption?, QuotaConsumption?)

Section titled “ operator !=(QuotaConsumption?, QuotaConsumption?)”
public static bool operator !=(QuotaConsumption? left, QuotaConsumption? right)

left QuotaConsumption?

right QuotaConsumption?

bool