//
#nullable enable
namespace WotBlitzStatisticsPro.Blazor.GraphQl
{
///
/// Account search result item
///
[global::System.CodeDom.Compiler.GeneratedCode("StrawberryShake", "11.2.2.0")]
public partial class FindPlayers_Players_AccountsSearchResponseItem : global::System.IEquatable, IFindPlayers_Players_AccountsSearchResponseItem
{
public FindPlayers_Players_AccountsSearchResponseItem(global::System.Int64 accountId, global::System.String? nickname, global::System.String? clanTag, global::System.DateTimeOffset lastBattle, global::System.Int64 battlesCount, global::System.Int32 winRate)
{
AccountId = accountId;
Nickname = nickname;
ClanTag = clanTag;
LastBattle = lastBattle;
BattlesCount = battlesCount;
WinRate = winRate;
}
///
/// Player accountId
///
public global::System.Int64 AccountId { get; }
///
/// Player nick
///
public global::System.String? Nickname { get; }
///
/// Clan tag. Null if player doesn't have clan membership
///
public global::System.String? ClanTag { get; }
///
/// Last battle time
///
public global::System.DateTimeOffset LastBattle { get; }
///
/// Player's battles count
///
public global::System.Int64 BattlesCount { get; }
///
/// Win rate from 0 to 100
///
public global::System.Int32 WinRate { get; }
public virtual global::System.Boolean Equals(FindPlayers_Players_AccountsSearchResponseItem? other)
{
if (ReferenceEquals(null, other))
{
return false;
}
if (ReferenceEquals(this, other))
{
return true;
}
if (other.GetType() != GetType())
{
return false;
}
return (AccountId == other.AccountId) && ((Nickname is null && other.Nickname is null) || Nickname != null && Nickname.Equals(other.Nickname)) && ((ClanTag is null && other.ClanTag is null) || ClanTag != null && ClanTag.Equals(other.ClanTag)) && LastBattle.Equals(other.LastBattle) && BattlesCount == other.BattlesCount && WinRate == other.WinRate;
}
public override global::System.Boolean Equals(global::System.Object? obj)
{
if (ReferenceEquals(null, obj))
{
return false;
}
if (ReferenceEquals(this, obj))
{
return true;
}
if (obj.GetType() != GetType())
{
return false;
}
return Equals((FindPlayers_Players_AccountsSearchResponseItem)obj);
}
public override global::System.Int32 GetHashCode()
{
unchecked
{
int hash = 5;
hash ^= 397 * AccountId.GetHashCode();
if (Nickname != null)
{
hash ^= 397 * Nickname.GetHashCode();
}
if (ClanTag != null)
{
hash ^= 397 * ClanTag.GetHashCode();
}
hash ^= 397 * LastBattle.GetHashCode();
hash ^= 397 * BattlesCount.GetHashCode();
hash ^= 397 * WinRate.GetHashCode();
return hash;
}
}
}
}