Skip to content

QuotaConsumption

Namespace AgentPrism · Assembly AgentPrism.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: AgentPrism 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 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

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