namespace AIStudio.Provider;
///
/// The API key for loading the models of a provider, ready for a header.
///
///
/// A plain struct instead of a record on purpose: the generated ToString of a record would print the
/// key wherever somebody logs this value by mistake.
///
/// The key without the whitespace around it, or null when there is none or it cannot be sent.
/// Whether the key contains a character which an HTTP header cannot carry.
public readonly struct ModelLoadingSecretKey(string? key, bool isUnusable)
{
///
/// No key at all, e.g., because none is stored.
///
public static readonly ModelLoadingSecretKey NONE = new(null, false);
///
/// A key which cannot be sent, and which therefore is not handed out.
///
public static readonly ModelLoadingSecretKey UNUSABLE = new(null, true);
///
/// The key without the whitespace around it, or null when there is none or it cannot be sent.
///
public string? Key { get; } = key;
///
/// Whether the key contains a character which an HTTP header cannot carry.
///
public bool IsUnusable { get; } = isUnusable;
}