using PARR.BLL.Contracts.Interfaces;

namespace PARR.API.Settings
{
    public class MqSettings
    {
        public MqGenerateTemplates GenerateTemplates { get; set; } = new MqGenerateTemplates();
        public MqTemplateDistributor TemplateDistributor { get; set; } = new MqTemplateDistributor();
        public MqTemplateActivator TemplateActivator { get; set; } = new MqTemplateActivator();
        public MqStatistics Statistics { get; set; } = new MqStatistics();
        public MqTemplatesMatcher TemplatesMatcher { get; set; } = new MqTemplatesMatcher();
        public MqTemplatesUpdater TemplatesUpdater { get; set; } = new MqTemplatesUpdater();
    }

    public class MqGenerateTemplates : IMqSettings
    {
        public string HostName { get; set; } = string.Empty;
        public string QueueName { get; set; } = string.Empty;
        public string User { get; set; } = string.Empty;
        public string Password { get; set; } = string.Empty;
        public ushort? PrefetchCount { get; set; } = 0;
    }

    public class MqTemplateDistributor : IMqSettings
    {
        public string HostName { get; set; } = string.Empty;
        public string QueueName { get; set; } = string.Empty;
        public string User { get; set; } = string.Empty;
        public string Password { get; set; } = string.Empty;
        public ushort? PrefetchCount { get; set; } = 0;
    }

    public class MqTemplateActivator : IMqSettings
    {
        public string HostName { get; set; } = string.Empty;
        public string QueueName { get; set; } = string.Empty;
        public string User { get; set; } = string.Empty;
        public string Password { get; set; } = string.Empty;
        public ushort? PrefetchCount { get; set; } = 0;
    }

    public class MqStatistics
    {
        public StatMqAuth StatMqAuth { get; set; } = new StatMqAuth();
    }

    public class StatMqAuth : IMqSettings
    {
        public string HostName { get; set; } = string.Empty;
        public string QueueName { get; set; } = string.Empty;
        public string User { get; set; } = string.Empty;
        public string Password { get; set; } = string.Empty;
        public ushort? PrefetchCount { get; set; } = 0;
    }

    public class MqTemplatesMatcher : IMqSettings
    {
        public string HostName { get; set; } = string.Empty;
        public string QueueName { get; set; } = string.Empty;
        public string User { get; set; } = string.Empty;
        public string Password { get; set; } = string.Empty;
        public ushort? PrefetchCount { get; set; } = 0;
    }

    public class MqTemplatesUpdater : IMqSettings
    {
        public string HostName { get; set; } = string.Empty;
        public string QueueName { get; set; } = string.Empty;
        public string User { get; set; } = string.Empty;
        public string Password { get; set; } = string.Empty;
        public ushort? PrefetchCount { get; set; } = 0;
    }
}
