public MessageOptions(string type, string code = null, Utility.ClientColor color = Utility.ClientColor.none, string packageType = null) { this.type = type; this.code = code; this.color = color; this.packageType = packageType; }
public void fromJson(JSONNode json) { type = json["type"].Value; if (json["code"] != null) { code = json["code"].Value; } if (json["color"] != null) { var colorInt = json["color"].AsInt; color = (Utility.ClientColor)colorInt; } if (json["packageType"] != null) { packageType = json["packageType"].Value; } }