using Library.Ifx.Eaf.Common.Configuration;
using System;
using System.Collections.Generic;

namespace Library.Ifx.Eaf.EquipmentConnector.File.Configuration
{
    [System.Runtime.Serialization.DataContractAttribute]
    public class FileConnectorConfiguration
    {
        public const ulong IDLE_EVENT_WAIT_TIME_DEFAULT = 360;
        public const ulong FILE_HANDLE_TIMEOUT_DEFAULT = 15;

        [System.Runtime.Serialization.DataMemberAttribute]
        public virtual bool? TriggerOnChanged { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public virtual long? PostProcessingRetries { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public virtual bool? CopySourceFolderStructure { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public IfPostProcessingFailsEnum? IfPostProcessingFailsAction { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public string AlternateTargetFolder { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public long? FileHandleTimeout { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public bool? DeleteEmptySourceSubFolders { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public long? IdleEventWaitTimeInSeconds { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public string FileAgeThreshold { get; set; }
        public bool? FolderAgeCheckIndividualSubFolders { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public virtual ZipModeEnum? ZipMode { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public FileAgeFilterEnum? FileAgeFilterMode { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public string ZipTargetFileName { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public string ZipErrorTargetFileName { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public long? ZipFileSubFolderLevel { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public string DefaultPlaceHolderValue { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public bool? UseZip64Mode { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public List<ConnectionSetting> ConnectionSettings { get; set; }
        public string SourceDirectoryCloaking { get; set; }
        public string FolderAgeThreshold { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public virtual long? FileScanningIntervalInSeconds { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public virtual bool? TriggerOnCreated { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public virtual long? ZipFileTime { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public string SourceFileLocation { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public string SourceFileFilter { get; set; }
        public List<string> SourceFileFilters { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public virtual bool? IncludeSubDirectories { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public virtual FileScanningOptionEnum? FileScanningOption { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public string TargetFileLocation { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public string ErrorTargetFileLocation { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public string TargetFileName { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public virtual long? FileHandleWaitTime { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public IfFileExistEnum? IfFileExistAction { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public long? ConnectionRetryInterval { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public PreProcessingModeEnum? PreProcessingMode { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public PostProcessingModeEnum? PostProcessingMode { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public PostProcessingModeEnum? ErrorPostProcessingMode { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public virtual long? ZipFileAmount { get; set; }
        [System.Runtime.Serialization.DataMemberAttribute]
        public string ErrorTargetFileName { get; set; }

        public void Initialize() { throw new NotImplementedException(); }

        public enum PostProcessingModeEnum
        {
            None = 0,
            Move = 1,
            Copy = 2,
            Rename = 3,
            Zip = 4,
            Delete = 5,
            MoveFolder = 6,
            CopyFolder = 7,
            DeleteFolder = 8
        }
        public enum PreProcessingModeEnum
        {
            None = 0,
            Process = 1
        }
        public enum IfFileExistEnum
        {
            Overwrite = 0,
            LeaveFiles = 1,
            Delete = 2
        }
        public enum IfPostProcessingFailsEnum
        {
            LeaveFiles = 0,
            Delete = 1
        }
        public enum FileScanningOptionEnum
        {
            FileWatcher = 0,
            TimeBased = 1
        }
        public enum ZipModeEnum
        {
            ZipByAmountOrTime = 0,
            ZipByFileName = 1,
            ZipBySubFolderName = 2
        }
        public enum FileAgeFilterEnum
        {
            IgnoreNewer = 0,
            IgnoreOlder = 1
        }
    }
}