namespace AIStudio.Models.Matching;
///
/// One statement about a set of model names: which names, and what holds for them.
///
/// Which names this rule answers for.
/// Whether the rule chooses the model or adjusts the choice.
/// What the rule states.
/// Who wrote the rule, so that a conflict can name both sides.
public sealed class ModelRule(MatchPattern pattern, ModelRuleKind kind, ModelProfileChange change, string origin)
{
///
/// Which names this rule answers for.
///
public MatchPattern Pattern { get; } = pattern;
///
/// Whether the rule chooses the model or adjusts the choice.
///
public ModelRuleKind Kind { get; } = kind;
///
/// What the rule states.
///
public ModelProfileChange Change { get; } = change;
///
/// Who wrote the rule: a family, a host, or a plugin.
///
public string Origin { get; } = origin;
///
/// How much this rule claims to know, worked out once when the rule is built.
///
public RuleSpecificity Specificity { get; } = RuleSpecificity.Of(pattern);
///
/// Names the rule in one line, for conflict reports and for breaking ties the same way twice.
///
public string Description { get; } = $"{origin}: {kind} {pattern.Kind} \"{pattern.Text}\"";
public override string ToString() => this.Description;
}