# AttachmentDescriptor

> 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.attachmentdescriptor/
> Summary: AttachmentDescriptor: The metadata of an uploaded attachment.

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

The metadata of an uploaded attachment.

```csharp
public sealed record AttachmentDescriptor : IEquatable<AttachmentDescriptor>
```

<dl class="api-relations"><dt>Inheritance</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.object">object</a> ← <a href="/api/tracon.attachmentdescriptor/">AttachmentDescriptor</a></dd><dt>Implements</dt><dd><a href="https://learn.microsoft.com/dotnet/api/system.iequatable-1">IEquatable&lt;AttachmentDescriptor&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>

## Remarks

The binary content is not CARRIED here. It is read separately with
[IAttachmentStore.OpenReadAsync](/api/tracon.iattachmentstore/#Tracon_IAttachmentStore_OpenReadAsync_System_String_System_Guid_System_Threading_CancellationToken_).

## Constructors

### <a id="Tracon_AttachmentDescriptor__ctor"></a> AttachmentDescriptor\(\)

```csharp
public AttachmentDescriptor()
```

## Properties

### <a id="Tracon_AttachmentDescriptor_ByteSize"></a> ByteSize

Gets the size of the content in bytes.

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

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

Gets the upload time.

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

 [DateTimeOffset](https://learn.microsoft.com/dotnet/api/system.datetimeoffset)

### <a id="Tracon_AttachmentDescriptor_CreatedBy"></a> CreatedBy

Gets the actor that uploaded it, or [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) when it is unknown.

```csharp
public string? CreatedBy { get; init; }
```

#### Property Value

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

Gets the original file name.

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

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

Gets the attachment id.

```csharp
public required Guid Id { get; init; }
```

#### Property Value

 [Guid](https://learn.microsoft.com/dotnet/api/system.guid)

### <a id="Tracon_AttachmentDescriptor_MediaType"></a> MediaType

Gets the validated MIME type. It is the result of the magic-byte check, not the
`Content-Type` the client sent.

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

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

Gets the run that produced the attachment. [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) for a user upload.

```csharp
public Guid? RunId { get; init; }
```

#### Property Value

 [Guid](https://learn.microsoft.com/dotnet/api/system.guid)?

### <a id="Tracon_AttachmentDescriptor_SessionId"></a> SessionId

Gets the session the attachment was uploaded to. [null](https://learn.microsoft.com/dotnet/csharp/language-reference/keywords/null) for an
upload without a session.

```csharp
public string? SessionId { get; init; }
```

#### Property Value

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

Gets the SHA-256 digest of the content (hexadecimal, upper case).

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

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

Gets the tenant the attachment belongs to.

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

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

### <a id="Tracon_AttachmentDescriptor_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_AttachmentDescriptor_Equals_Tracon_AttachmentDescriptor_"></a> Equals\(AttachmentDescriptor?\)

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

`other` [AttachmentDescriptor](/api/tracon.attachmentdescriptor/)?

#### Returns

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

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

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

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

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

### <a id="Tracon_AttachmentDescriptor_op_Equality_Tracon_AttachmentDescriptor_Tracon_AttachmentDescriptor_"></a> operator ==\(AttachmentDescriptor?, AttachmentDescriptor?\)

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

`left` [AttachmentDescriptor](/api/tracon.attachmentdescriptor/)?

`right` [AttachmentDescriptor](/api/tracon.attachmentdescriptor/)?

#### Returns

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

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

`left` [AttachmentDescriptor](/api/tracon.attachmentdescriptor/)?

`right` [AttachmentDescriptor](/api/tracon.attachmentdescriptor/)?

#### Returns

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