using System;

namespace StellaOps.Feedser.Merge.Identity;

/// <summary>
/// Normalized alias representation used within identity clusters.
/// </summary>
public sealed class AliasIdentity
{
    public AliasIdentity(string value, string? scheme)
    {
        if (string.IsNullOrWhiteSpace(value))
        {
            throw new ArgumentException("Alias value must be provided.", nameof(value));
        }

        Value = value.Trim();
        Scheme = string.IsNullOrWhiteSpace(scheme) ? null : scheme.Trim();
    }

    public string Value { get; }

    public string? Scheme { get; }
}
