namespace AIStudio.Tools.Validation; /// /// The first character of an API key which cannot be sent. /// /// /// The key itself never goes in here: this value ends up in messages, and its kind in the log. /// Only a character the user can see is kept, so that a message can name it. /// /// What is wrong with the character. /// The character as the user sees it, or empty unless it is a visible character outside of ASCII. public readonly record struct APIKeyIssue(APIKeyIssueKind Kind, string Character) { public static readonly APIKeyIssue NONE = new(APIKeyIssueKind.NONE, string.Empty); /// /// Whether the key cannot be sent. /// public bool IsProblem => this.Kind is not APIKeyIssueKind.NONE; }