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

namespace Valg.EVA.Skanning.Services.Security
{
	public class SecurityComplianceResult
	{
		public bool IsFirewallEnabled { get; set; }
		public bool IsInternetAvailable { get; set; }
		public bool IsUserAdministrator { get; set; }
		public bool IsKnownPasswordUsed { get; set; }
		public bool IsConnectedWithWifi { get; set; }
		public bool IsConnectedWithBluetooth { get; set; }
		public bool IsBitLockerActivated { get; set; }
        public bool IsDatabasePermissionSetRestricted {get; set; }

        public override bool Equals(object obj)
        {
            if (obj is SecurityComplianceResult other)
            {
                return Equals(other);
            }
            return base.Equals(obj);
        }

        protected bool Equals(SecurityComplianceResult other)
        {
            return IsFirewallEnabled == other.IsFirewallEnabled && IsInternetAvailable == other.IsInternetAvailable && IsUserAdministrator == other.IsUserAdministrator && IsKnownPasswordUsed == other.IsKnownPasswordUsed && IsConnectedWithWifi == other.IsConnectedWithWifi && IsConnectedWithBluetooth == other.IsConnectedWithBluetooth && IsBitLockerActivated == other.IsBitLockerActivated && IsDatabasePermissionSetRestricted == other.IsDatabasePermissionSetRestricted;
        }

        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = IsFirewallEnabled.GetHashCode();
                hashCode = (hashCode * 397) ^ IsInternetAvailable.GetHashCode();
                hashCode = (hashCode * 397) ^ IsUserAdministrator.GetHashCode();
                hashCode = (hashCode * 397) ^ IsKnownPasswordUsed.GetHashCode();
                hashCode = (hashCode * 397) ^ IsConnectedWithWifi.GetHashCode();
                hashCode = (hashCode * 397) ^ IsConnectedWithBluetooth.GetHashCode();
                hashCode = (hashCode * 397) ^ IsBitLockerActivated.GetHashCode();
                hashCode = (hashCode * 397) ^ IsDatabasePermissionSetRestricted.GetHashCode();
                return hashCode;
            }
        }
    }
}

