using LitJson;

public class UserFriend : HeaderData
{
	public int viewerId;

	public string name;

	public string countryCode;

	public int rank;

	public long emblemId;

	public int degreeId;

	public bool IsFriend { get; private set; }

	public bool IsSameGuildMember { get; private set; }

	public UserFriend(JsonData data)
	{
		viewerId = data["viewer_id"].ToInt();
		name = data["name"].ToString();
		countryCode = data["country_code"].ToString();
		rank = data["rank"].ToInt();
		emblemId = data["emblem_id"].ToLong();
		degreeId = data["degree_id"].ToInt();
		if (data.Keys.Contains("is_friend"))
		{
			IsFriend = data["is_friend"].ToBoolean();
		}
		if (data.Keys.Contains("is_guild_member"))
		{
			IsSameGuildMember = data["is_guild_member"].ToBoolean();
		}
	}
}
