using Microsoft.Extensions.Configuration; namespace Common.Configuration.DownloadClient; /// /// Configuration for a specific download client /// public sealed record ClientConfig { /// /// Unique identifier for this client /// [ConfigurationKeyName("ID")] public string Id { get; init; } = Guid.NewGuid().ToString("N"); /// /// Friendly name for this client /// [ConfigurationKeyName("NAME")] public string Name { get; init; } = string.Empty; /// /// Type of download client /// [ConfigurationKeyName("TYPE")] public Common.Enums.DownloadClient Type { get; init; } = Common.Enums.DownloadClient.None; /// /// Host address for the download client /// [ConfigurationKeyName("HOST")] public string Host { get; init; } = string.Empty; /// /// Port for the download client /// [ConfigurationKeyName("PORT")] public int Port { get; init; } /// /// Username for authentication /// [ConfigurationKeyName("USERNAME")] public string Username { get; init; } = string.Empty; /// /// Password for authentication /// [ConfigurationKeyName("PASSWORD")] public string Password { get; init; } = string.Empty; /// /// Default category to use /// [ConfigurationKeyName("CATEGORY")] public string Category { get; init; } = string.Empty; /// /// Path to download directory /// [ConfigurationKeyName("PATH")] public string Path { get; init; } = string.Empty; /// /// Whether this client is enabled /// [ConfigurationKeyName("ENABLED")] public bool Enabled { get; init; } = true; }