using System;

namespace skyscraper5.Skyscraper.Scraper.Storage.Utilities
{
	public class DatabaseKeyUntCompatibility
	{
		public byte CommonActionType { get; }
		public byte CommonOuiHash { get; }
		public string CommonOui { get; }
		public byte CommonProcessingOrder { get; }
		public byte CompatibilityDescriptorType { get; }

		public DatabaseKeyUntCompatibility(byte commonActionType, byte commonOuiHash, string commonOui, byte commonProcessingOrder, byte compatibilityDescriptorType)
		{
			CommonActionType = commonActionType;
			CommonOuiHash = commonOuiHash;
			CommonOui = commonOui;
			CommonProcessingOrder = commonProcessingOrder;
			CompatibilityDescriptorType = compatibilityDescriptorType;
		}

		protected bool Equals(DatabaseKeyUntCompatibility other)
		{
			return CommonActionType == other.CommonActionType && CommonOuiHash == other.CommonOuiHash && CommonOui == other.CommonOui && CommonProcessingOrder == other.CommonProcessingOrder && CompatibilityDescriptorType == other.CompatibilityDescriptorType;
		}

		public override bool Equals(object obj)
		{
			if (ReferenceEquals(null, obj)) return false;
			if (ReferenceEquals(this, obj)) return true;
			if (obj.GetType() != this.GetType()) return false;
			return Equals((DatabaseKeyUntCompatibility)obj);
		}

		public override int GetHashCode()
		{
			return HashCode.Combine(CommonActionType, CommonOuiHash, CommonOui, CommonProcessingOrder, CompatibilityDescriptorType);
		}
	}
}
