namespace Inspectron.Epson;

/// <summary>
/// Represents a discovered service via mDNS/Bonjour
/// </summary>
public class BonjourService
{
    public string ServiceName { get; set; }
    public string ServiceType { get; set; }
    public string Domain { get; set; }
    public string FullServiceName { get; set; }
    public string HostName { get; set; }
    public string IPAddress { get; set; }
    public int Port { get; set; }
    public Dictionary<string, string> TxtRecords { get; set; }
    public uint TTL { get; set; }
    public DateTime DiscoveredAt { get; set; }
    public byte[] RawResponse { get; set; }

    public BonjourService()
    {
        TxtRecords = new Dictionary<string, string>();
    }

    public override string ToString()
    {
        return $"{ServiceName}.{ServiceType}.{Domain} - {IPAddress}:{Port}";
    }
}