public bool DeepEquals(DestinyItemInstanceComponent?other)
 {
     return(other is not null &&
            DamageType == other.DamageType &&
            DamageTypeHash == other.DamageTypeHash &&
            (PrimaryStat is not null ? PrimaryStat.DeepEquals(other.PrimaryStat) : other.PrimaryStat is null) &&
            ItemLevel == other.ItemLevel &&
            Quality == other.Quality &&
            IsEquipped == other.IsEquipped &&
            CanEquip == other.CanEquip &&
            EquipRequiredLevel == other.EquipRequiredLevel &&
            UnlockHashesRequiredToEquip.DeepEqualsListNaive(other.UnlockHashesRequiredToEquip) &&
            CannotEquipReason == other.CannotEquipReason &&
            BreakerType == other.BreakerType &&
            BreakerTypeHash == other.BreakerTypeHash &&
            (Energy is not null ? Energy.DeepEquals(other.Energy) : other.Energy is null));
 }
 public void Update(DestinyItemInstanceComponent?other)
 {
     if (other is null)
     {
         return;
     }
     if (DamageType != other.DamageType)
     {
         DamageType = other.DamageType;
         OnPropertyChanged(nameof(DamageType));
     }
     if (DamageTypeHash != other.DamageTypeHash)
     {
         DamageTypeHash = other.DamageTypeHash;
         OnPropertyChanged(nameof(DamageTypeHash));
     }
     if (!PrimaryStat.DeepEquals(other.PrimaryStat))
     {
         PrimaryStat.Update(other.PrimaryStat);
         OnPropertyChanged(nameof(PrimaryStat));
     }
     if (ItemLevel != other.ItemLevel)
     {
         ItemLevel = other.ItemLevel;
         OnPropertyChanged(nameof(ItemLevel));
     }
     if (Quality != other.Quality)
     {
         Quality = other.Quality;
         OnPropertyChanged(nameof(Quality));
     }
     if (IsEquipped != other.IsEquipped)
     {
         IsEquipped = other.IsEquipped;
         OnPropertyChanged(nameof(IsEquipped));
     }
     if (CanEquip != other.CanEquip)
     {
         CanEquip = other.CanEquip;
         OnPropertyChanged(nameof(CanEquip));
     }
     if (EquipRequiredLevel != other.EquipRequiredLevel)
     {
         EquipRequiredLevel = other.EquipRequiredLevel;
         OnPropertyChanged(nameof(EquipRequiredLevel));
     }
     if (!UnlockHashesRequiredToEquip.DeepEqualsListNaive(other.UnlockHashesRequiredToEquip))
     {
         UnlockHashesRequiredToEquip = other.UnlockHashesRequiredToEquip;
         OnPropertyChanged(nameof(UnlockHashesRequiredToEquip));
     }
     if (CannotEquipReason != other.CannotEquipReason)
     {
         CannotEquipReason = other.CannotEquipReason;
         OnPropertyChanged(nameof(CannotEquipReason));
     }
     if (BreakerType != other.BreakerType)
     {
         BreakerType = other.BreakerType;
         OnPropertyChanged(nameof(BreakerType));
     }
     if (BreakerTypeHash != other.BreakerTypeHash)
     {
         BreakerTypeHash = other.BreakerTypeHash;
         OnPropertyChanged(nameof(BreakerTypeHash));
     }
     if (!Energy.DeepEquals(other.Energy))
     {
         Energy.Update(other.Energy);
         OnPropertyChanged(nameof(Energy));
     }
 }
        public bool Equals(DestinyItemInstanceComponent input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     DamageType == input.DamageType ||
                     (DamageType != null && DamageType.Equals(input.DamageType))
                     ) &&
                 (
                     DamageTypeHash == input.DamageTypeHash ||
                     (DamageTypeHash.Equals(input.DamageTypeHash))
                 ) &&
                 (
                     PrimaryStat == input.PrimaryStat ||
                     (PrimaryStat != null && PrimaryStat.Equals(input.PrimaryStat))
                 ) &&
                 (
                     ItemLevel == input.ItemLevel ||
                     (ItemLevel.Equals(input.ItemLevel))
                 ) &&
                 (
                     Quality == input.Quality ||
                     (Quality.Equals(input.Quality))
                 ) &&
                 (
                     IsEquipped == input.IsEquipped ||
                     (IsEquipped != null && IsEquipped.Equals(input.IsEquipped))
                 ) &&
                 (
                     CanEquip == input.CanEquip ||
                     (CanEquip != null && CanEquip.Equals(input.CanEquip))
                 ) &&
                 (
                     EquipRequiredLevel == input.EquipRequiredLevel ||
                     (EquipRequiredLevel.Equals(input.EquipRequiredLevel))
                 ) &&
                 (
                     UnlockHashesRequiredToEquip == input.UnlockHashesRequiredToEquip ||
                     (UnlockHashesRequiredToEquip != null && UnlockHashesRequiredToEquip.SequenceEqual(input.UnlockHashesRequiredToEquip))
                 ) &&
                 (
                     CannotEquipReason == input.CannotEquipReason ||
                     (CannotEquipReason != null && CannotEquipReason.Equals(input.CannotEquipReason))
                 ) &&
                 (
                     BreakerType == input.BreakerType ||
                     (BreakerType.Equals(input.BreakerType))
                 ) &&
                 (
                     BreakerTypeHash == input.BreakerTypeHash ||
                     (BreakerTypeHash.Equals(input.BreakerTypeHash))
                 ) &&
                 (
                     Energy == input.Energy ||
                     (Energy != null && Energy.Equals(input.Energy))
                 ));
        }