# QuotaUsageRecord

> Tracon documentation. Tracon is a .NET package family that adds a control
> plane on Microsoft Agent Framework, published as NuGet packages that run
> inside your own ASP.NET Core application.
>
> Page: https://tracon.dev/api/tracon.quotausagerecord/
> Summary: QuotaUsageRecord: A scope's consumption in the current period.

<div class="api-provenance">Namespace Tracon · Assembly <code>Tracon.Abstractions.dll</code></div>

A scope's consumption in the current period.

```csharp
public sealed record QuotaUsageRecord : IEquatable<QuotaUsageRecord>
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.quotausagerecord/">QuotaUsageRecord</a></dd><dt>Implements</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable&lt;QuotaUsageRecord&gt;</a></dd><dt>Inherited Members</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object.gettype">object.GetType()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.tostring">object.ToString()</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)">object.Equals(object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)">object.Equals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.referenceequals">object.ReferenceEquals(object?, object?)</a>, <a href="https://learn.microsoft.com/dotnet/api/system.object.gethashcode">object.GetHashCode()</a></dd></dl>

## Constructors

### <a id="Tracon_QuotaUsageRecord__ctor"></a> QuotaUsageRecord\(\)

```csharp
public QuotaUsageRecord()
```

## Properties

### <a id="Tracon_QuotaUsageRecord_AgentName"></a> AgentName

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

```csharp
public required string AgentName { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_QuotaUsageRecord_Cost"></a> Cost

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

```csharp
public decimal Cost { get; init; }
```

#### Property Value

 [decimal](https://learn.microsoft.com/dotnet/api/system.decimal)

### <a id="Tracon_QuotaUsageRecord_Period"></a> Period

The counter's interval.

```csharp
public required QuotaPeriod Period { get; init; }
```

#### Property Value

 [QuotaPeriod](/api/tracon.quotaperiod/)

### <a id="Tracon_QuotaUsageRecord_PeriodStart"></a> PeriodStart

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

```csharp
public required DateOnly PeriodStart { get; init; }
```

#### Property Value

 [DateOnly](https://learn.microsoft.com/dotnet/api/system.dateonly)

### <a id="Tracon_QuotaUsageRecord_Runs"></a> Runs

The number of runs completed in the period.

```csharp
public long Runs { get; init; }
```

#### Property Value

 [long](https://learn.microsoft.com/dotnet/api/system.int64)

### <a id="Tracon_QuotaUsageRecord_TenantId"></a> TenantId

The tenant identifier.

```csharp
public required string TenantId { get; init; }
```

#### Property Value

 [string](https://learn.microsoft.com/dotnet/api/system.string)

### <a id="Tracon_QuotaUsageRecord_Tokens"></a> Tokens

The total tokens spent in the period.

```csharp
public long Tokens { get; init; }
```

#### Property Value

 [long](https://learn.microsoft.com/dotnet/api/system.int64)

### <a id="Tracon_QuotaUsageRecord_UpdatedAt"></a> UpdatedAt

The last-updated time (UTC).

```csharp
public required DateTimeOffset UpdatedAt { get; init; }
```

#### Property Value

 [DateTimeOffset](https://learn.microsoft.com/dotnet/api/system.datetimeoffset)

## Methods

### <a id="Tracon_QuotaUsageRecord_Equals_System_Object_"></a> Equals\(object?\)

```csharp
public override bool Equals(object? obj)
```

#### Parameters

`obj` [object](https://learn.microsoft.com/dotnet/api/system.object)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_QuotaUsageRecord_Equals_Tracon_QuotaUsageRecord_"></a> Equals\(QuotaUsageRecord?\)

```csharp
public bool Equals(QuotaUsageRecord? other)
```

#### Parameters

`other` [QuotaUsageRecord](/api/tracon.quotausagerecord/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_QuotaUsageRecord_GetHashCode"></a> GetHashCode\(\)

```csharp
public override int GetHashCode()
```

#### Returns

 [int](https://learn.microsoft.com/dotnet/api/system.int32)

### <a id="Tracon_QuotaUsageRecord_ToString"></a> ToString\(\)

```csharp
public override string ToString()
```

#### Returns

 [string](https://learn.microsoft.com/dotnet/api/system.string)

## Operators

### <a id="Tracon_QuotaUsageRecord_op_Equality_Tracon_QuotaUsageRecord_Tracon_QuotaUsageRecord_"></a> operator ==\(QuotaUsageRecord?, QuotaUsageRecord?\)

```csharp
public static bool operator ==(QuotaUsageRecord? left, QuotaUsageRecord? right)
```

#### Parameters

`left` [QuotaUsageRecord](/api/tracon.quotausagerecord/)?

`right` [QuotaUsageRecord](/api/tracon.quotausagerecord/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)

### <a id="Tracon_QuotaUsageRecord_op_Inequality_Tracon_QuotaUsageRecord_Tracon_QuotaUsageRecord_"></a> operator \!=\(QuotaUsageRecord?, QuotaUsageRecord?\)

```csharp
public static bool operator !=(QuotaUsageRecord? left, QuotaUsageRecord? right)
```

#### Parameters

`left` [QuotaUsageRecord](/api/tracon.quotausagerecord/)?

`right` [QuotaUsageRecord](/api/tracon.quotausagerecord/)?

#### Returns

 [bool](https://learn.microsoft.com/dotnet/api/system.boolean)
