using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IOB_UT_NEXT
{
    public class GenActConf
    {
        /// <summary>
        /// ID azione configurata
        /// </summary>
        public string ActionId { get; set; } = "000";

        /// <summary>
        /// Tempo di attesa in SEC standard prima della prossima ri-esecuzione
        /// </summary>
        public int ReExecVeto { get; set; } = 60;

        /// <summary>
        /// Note opzionali
        /// </summary>
        public string Note { get; set; } = "";

        /// <summary>
        /// Elenco step da eseguire
        /// </summary>
        public List<ActionConfig> StepsList { get; set; }

        /// <summary>
        /// Configurazione di un singolo step FTP
        /// </summary>
        public class ActionConfig
        {
            /// <summary>
            /// ID azione (per ordinamento)
            /// </summary>
            public string Id { get; set; } = "00";

            /// <summary>
            /// Descrizione step
            /// </summary>
            public string Description { get; set; } = "00";

            /// <summary>
            /// Azione richiesta
            /// </summary>
            public ActType Action { get; set; } = ActType.CheckDir;

            /// <summary>
            /// Dizionario parametri specifici per azione richiesta (dipendenti da azione...)
            /// </summary>
            public Dictionary<string, string> ParamList { get; set; } = new Dictionary<string, string>();
        }

        /// <summary>
        /// Enum azioni gestite/da gestire
        /// </summary>
        public enum ActType
        {
            CheckDir,
            CheckFile,
            CreateDir,
            DelDir,
            DelFile,
            //DelFileList,
            DownloadDir,
            DownloadFile,
            GenRandomDir,
            ListContent,
            MirrorDirL2R,
            MirrorDirR2L,
            PingServer,
            RemoveFileByName,
            UploadDir,
            UploadFile
        }
    }
}
