namespace StabilityMatrix.Core.Models; /// /// Defines a remote downloadable resource. /// public readonly record struct RemoteResource { public required Uri Url { get; init; } public Uri[]? FallbackUrls { get; init; } public string? FileNameOverride { get; init; } public string FileName => FileNameOverride ?? Path.GetFileName(Url.ToString()); public string? HashSha256 { get; init; } /// /// Type info, for remote models this is of the model. /// public object? ContextType { get; init; } public Uri? InfoUrl { get; init; } public string? LicenseType { get; init; } public Uri? LicenseUrl { get; init; } public string? Author { get; init; } public string? ByAuthor => string.IsNullOrEmpty(Author) ? null : $"by {Author}"; }