Skip to content

QuotaUsageRecord

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

A scope’s consumption in the current period.

public sealed record QuotaUsageRecord : IEquatable<QuotaUsageRecord>

objectQuotaUsageRecord

IEquatable<QuotaUsageRecord>

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

public QuotaUsageRecord()

The agent name. An empty string ("") means the tenant-wide counter.

public required string AgentName { get; init; }

string

The total amount spent in the period. Runs with undefined pricing are not included in this total (not even added as zero).

public decimal Cost { get; init; }

decimal

The counter’s interval.

public required QuotaPeriod Period { get; init; }

QuotaPeriod

The first day of the period (in local time).

public required DateOnly PeriodStart { get; init; }

DateOnly

The number of runs completed in the period.

public long Runs { get; init; }

long

The tenant identifier.

public required string TenantId { get; init; }

string

The total tokens spent in the period.

public long Tokens { get; init; }

long

The last-updated time (UTC).

public required DateTimeOffset UpdatedAt { get; init; }

DateTimeOffset

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(QuotaUsageRecord? other)

other QuotaUsageRecord?

bool

public override int GetHashCode()

int

public override string ToString()

string

operator ==(QuotaUsageRecord?, QuotaUsageRecord?)

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

left QuotaUsageRecord?

right QuotaUsageRecord?

bool

operator !=(QuotaUsageRecord?, QuotaUsageRecord?)

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

left QuotaUsageRecord?

right QuotaUsageRecord?

bool