Skip to content

AttachmentDescriptor

Namespace AgentPrism · Assembly AgentPrism.Abstractions.dll

The metadata of an uploaded attachment.

public sealed record AttachmentDescriptor : IEquatable<AttachmentDescriptor>

objectAttachmentDescriptor

IEquatable<AttachmentDescriptor>

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

The binary content is not CARRIED here. It is read separately with IAttachmentStore.OpenReadAsync.

public AttachmentDescriptor()

Gets the size of the content in bytes.

public required long ByteSize { get; init; }

long

Gets the upload time.

public required DateTimeOffset CreatedAt { get; init; }

DateTimeOffset

Gets the actor that uploaded it, or null when it is unknown.

public string? CreatedBy { get; init; }

string?

Gets the original file name.

public required string FileName { get; init; }

string

Gets the attachment id.

public required Guid Id { get; init; }

Guid

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

public required string MediaType { get; init; }

string

Gets the run that produced the attachment. null for a user upload.

public Guid? RunId { get; init; }

Guid?

Gets the session the attachment was uploaded to. null for an upload without a session.

public string? SessionId { get; init; }

string?

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

public required string Sha256 { get; init; }

string

Gets the tenant the attachment belongs to.

public required string TenantId { get; init; }

string

public override bool Equals(object? obj)

obj object?

bool

public bool Equals(AttachmentDescriptor? other)

other AttachmentDescriptor?

bool

public override int GetHashCode()

int

public override string ToString()

string

operator ==(AttachmentDescriptor?, AttachmentDescriptor?)

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

left AttachmentDescriptor?

right AttachmentDescriptor?

bool

operator !=(AttachmentDescriptor?, AttachmentDescriptor?)

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

left AttachmentDescriptor?

right AttachmentDescriptor?

bool