QuotaDecision
AgentPrism.Abstractions.dllThe result of a quota check.
public sealed record QuotaDecision : IEquatable<QuotaDecision>Inheritance
Section titled “Inheritance”Implements
Section titled “Implements”Inherited Members
Section titled “Inherited Members”object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”The check happens before the run starts; consumption is written after the run ends. This means concurrent runs can push a quota slightly over — the quota is approximate.
Constructors
Section titled “Constructors”QuotaDecision()
Section titled “ QuotaDecision()”public QuotaDecision()Properties
Section titled “Properties”AgentName
Section titled “ AgentName”The exceeded rule’s scope: the agent name, or null for tenant-wide.
public string? AgentName { get; init; }Property Value
Section titled “Property Value”Allowed
Section titled “ Allowed”The result reporting that no rule was exceeded.
public static QuotaDecision Allowed { get; }Property Value
Section titled “Property Value”CostFellBackToTokens
Section titled “ CostFellBackToTokens”true if a monetary rule fell back to tokens because pricing was undefined.
public bool CostFellBackToTokens { get; init; }Property Value
Section titled “Property Value”IsAllowed
Section titled “ IsAllowed”Whether the run is allowed.
public required bool IsAllowed { get; init; }Property Value
Section titled “Property Value”The exceeded limit value.
public decimal? Limit { get; init; }Property Value
Section titled “Property Value”Metric
Section titled “ Metric”The exceeded metric. null if allowed.
public QuotaMetric? Metric { get; init; }Property Value
Section titled “Property Value”Period
Section titled “ Period”The exceeded rule’s period. null if allowed.
public QuotaPeriod? Period { get; init; }Property Value
Section titled “Property Value”Reason
Section titled “ Reason”The explanation shown to the user. null if allowed.
public string? Reason { get; init; }Property Value
Section titled “Property Value”ResetsAt
Section titled “ ResetsAt”The time the counter resets (UTC). Reflected to the client as Retry-After.
public DateTimeOffset? ResetsAt { get; init; }Property Value
Section titled “Property Value”The consumption at check time.
public decimal? Used { 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(QuotaDecision?)
Section titled “ Equals(QuotaDecision?)”public bool Equals(QuotaDecision? other)Parameters
Section titled “Parameters”other QuotaDecision?
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 ==(QuotaDecision?, QuotaDecision?)
Section titled “ operator ==(QuotaDecision?, QuotaDecision?)”public static bool operator ==(QuotaDecision? left, QuotaDecision? right)Parameters
Section titled “Parameters”left QuotaDecision?
right QuotaDecision?
Returns
Section titled “Returns”operator !=(QuotaDecision?, QuotaDecision?)
Section titled “ operator !=(QuotaDecision?, QuotaDecision?)”public static bool operator !=(QuotaDecision? left, QuotaDecision? right)Parameters
Section titled “Parameters”left QuotaDecision?
right QuotaDecision?