Table of Contents

Class RederiveStoredMailJobPayload

Namespace
MailFathom.Application.Jobs.Payloads
Assembly
MailFathom.Application.dll

Points one job at the stored mail of an account, or of one folder of it, and at nothing inside a message.

public sealed record RederiveStoredMailJobPayload : IJobPayload, IEquatable<RederiveStoredMailJobPayload>
Inheritance
RederiveStoredMailJobPayload
Implements
Inherited Members

Remarks

Every property is one of MailFathom's own identifiers: the identifier this deployment generated for the mailbox, and its own name for a folder of it. The document therefore carries nothing derived from a message and has no property one could be put in, and what the work reads about that mail it reads from committed local state.

An absent folder is every folder the account holds mail in rather than a folder named by an empty string, which is the same distinction StoredMailScope draws and the reason the property is nullable rather than defaulted.

The properties are primitives rather than the domain value objects they came from, because this record is the stored document — one jsonb column an operator reads when they ask what a queued job is. Rebuilding the identities is ToAccountId() and ToFolderAlias(), which validate them the way the domain types do.

Properties

AccountId

Gets the account whose stored mail the work covers.

FolderAlias

Gets MailFathom's own name for the one folder to cover, or null for every folder the account holds mail in.

JobType

Gets the job type this payload is the one contract of.

Methods

For(MailAccountId, MailFolderAlias?)

Describes one scope of stored mail as the document a job carries.

ToAccountId()

Rebuilds the generated account identifier this payload names.

ToFolderAlias()

Rebuilds the folder alias this payload names, which is absent for a whole-account scope.